• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Suggestion] add a check to installer to make sure it isn't run from /var/www/fog/bin

    Scheduled Pinned Locked Moved
    FOG Problems
    2
    2
    668
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      I had all kinds of headaches (gdisk missing, scripts not working) because i pulled the fog installation directly into /var/www/fog.

      The script then moves /var/www/fog to fog.prev which makes totally sense (moving an old fog installation) but breaks things when /var/www/fog is your download-directory.

      I’m not sure i’m the only one stupid enough to over-“make-things-right-from-the-start” and trying to install it like any LAMP software, but maybe a check whether the script is run from /var/www/fog/bin could prevent others from scratching their head bald.

      Wonderful piece of software btw

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        Don’t know if anyone ever ran into this before. But I guess it wouldn’t hurt if we check this first. Here is a yet untested piece of shell script which might do it…
        [CODE]Index: lib/common/functions.sh

        — lib/common/functions.sh(Revision 3187)
        +++ lib/common/functions.sh(Arbeitskopie)
        @@ -226,6 +226,22 @@
        osid=“”;
        ;;
        esac
        +CWD=$(pwd)
        +if [[ $CWD == “${webdirdest}” ]]
        +then
        +echo “Seems like you are trying to run …”
        +exit 1;
        +fi
        +if [[ $CWD == “${storage}” ]]
        +then
        +echo “Seems like you are trying to run …”
        +exit 1;
        +fi
        +if [[ $CWD == “${tftpdirdst}” ]]
        +then
        +echo “Seems like you are trying to run …”
        +exit 1;
        +fi
        }

        configureSnapins()[/CODE]

        Edit: Not sure what happens to the indenting here. It’s all there when I paste but disapears when saving the message…

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        137

        Online

        12.1k

        Users

        17.3k

        Topics

        155.3k

        Posts
        Copyright © 2012-2024 FOG Project