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



  • 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


  • Developer

    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…


 

440
Online

41.8k
Users

12.4k
Topics

116.7k
Posts