installfog.sh (fogproject-1.5.8) | : | installfog.sh (fogproject-1.5.9) | ||
---|---|---|---|---|
skipping to change at line 28 | skipping to change at line 28 | |||
# | # | |||
bindir=$(dirname $(readlink -f "$BASH_SOURCE") ) | bindir=$(dirname $(readlink -f "$BASH_SOURCE") ) | |||
cd $bindir | cd $bindir | |||
workingdir=$(pwd) | workingdir=$(pwd) | |||
if [[ ! $EUID -eq 0 ]]; then | if [[ ! $EUID -eq 0 ]]; then | |||
echo "FOG Installation must be run as root user" | echo "FOG Installation must be run as root user" | |||
exit 1 | exit 1 | |||
fi | fi | |||
which useradd >/dev/null 2>&1 | which useradd >/dev/null 2>&1 | |||
if [[ $? -eq 1 || $(echo $PATH | grep -o "sbin" | wc -l) -lt 2 ]]; then | if [[ $? -eq 1 || $(echo $PATH | grep -o "sbin" | wc -l) -lt 2 ]]; then | |||
echo "Please switch to a proper root environment to run the installer (e.g. | echo "Please switch to a proper root environment to run the installer!" | |||
sudo -i)" | echo "Use 'sudo -i' or 'su -' (skip the ' and note the hyphen at the end" | |||
echo "of the su command as it is important to load root's environment)." | ||||
exit 1 | exit 1 | |||
fi | fi | |||
timestamp=$(date +%s) | ||||
backupconfig="" | ||||
. ../lib/common/functions.sh | . ../lib/common/functions.sh | |||
help() { | help() { | |||
echo -e "Usage: $0 [-h?dEUuHSCKYXTFA] [-f <filename>] [-N <databasename>]" | echo -e "Usage: $0 [-h?dEUuHSCKYXTFA] [-f <filename>] [-N <databasename>]" | |||
echo -e "\t\t[-D </directory/to/document/root/>] [-c <ssl-path>]" | echo -e "\t\t[-D </directory/to/document/root/>] [-c <ssl-path>]" | |||
echo -e "\t\t[-W <webroot/to/fog/after/docroot/>] [-B </backup/path/>]" | echo -e "\t\t[-W <webroot/to/fog/after/docroot/>] [-B </backup/path/>]" | |||
echo -e "\t\t[-s <192.168.1.10>] [-e <192.168.1.254>] [-b <undionly.kpxe>]" | echo -e "\t\t[-s <192.168.1.10>] [-e <192.168.1.254>] [-b <undionly.kpxe>]" | |||
echo -e "\t-h -? --help\t\t\tDisplay this info" | echo -e "\t-h -? --help\t\t\tDisplay this info" | |||
echo -e "\t-o --oldcopy\t\t\tCopy back old data" | echo -e "\t-o --oldcopy\t\t\tCopy back old data" | |||
echo -e "\t-d --no-defaults\t\tDon't guess defaults" | echo -e "\t-d --no-defaults\t\tDon't guess defaults" | |||
echo -e "\t-U --no-upgrade\t\tDon't attempt to upgrade" | echo -e "\t-U --no-upgrade\t\tDon't attempt to upgrade" | |||
skipping to change at line 660 | skipping to change at line 664 | |||
exit 0 | exit 0 | |||
;; | ;; | |||
*) | *) | |||
echo | echo | |||
echo " * Sorry, answer not recognized" | echo " * Sorry, answer not recognized" | |||
echo | echo | |||
exit 1 | exit 1 | |||
;; | ;; | |||
esac | esac | |||
done | done | |||
if [[ -n "${backupconfig}" ]]; then | ||||
echo " * Changed configurations:" | ||||
echo | ||||
echo " The FOG installer changed configuration files and created the" | ||||
echo " following backup files from your origional files:" | ||||
for conffile in ${backupconfig}; do | ||||
echo " * ${conffile} <=> ${conffile}.${timestamp}" | ||||
done | ||||
echo | ||||
fi | ||||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added |