diff --git a/man/freedombone.1.gz b/man/freedombone.1.gz index ef24b6be..9dfc94dd 100644 Binary files a/man/freedombone.1.gz and b/man/freedombone.1.gz differ diff --git a/src/freedombone b/src/freedombone index fb10ed8e..0939211d 100755 --- a/src/freedombone +++ b/src/freedombone @@ -58,6 +58,9 @@ DOMAIN_NAME= MY_USERNAME= SYSTEM_TYPE=$VARIANT_FULL +# whether the system is being installed from a pre-created configuration file +INSTALLING_FROM_CONFIGURATION_FILE="no" + # An optional configuration file which overrides some of these variables CONFIGURATION_FILE="freedombone.cfg" @@ -354,6 +357,7 @@ function show_help { echo '' echo ' -h --help Show help' echo ' menuconfig Easy interactive installation' + echo ' -c --config Installing from a configuration file' echo ' --bbb Installing on Beaglebone Black' echo ' -u --user User to install the system as' echo ' -d --domain Default domain name' @@ -508,6 +512,13 @@ else -h|--help) show_help ;; + # load a configuration file + -c|--config) + shift + CONFIGURATION_FILE="$1" + INSTALLING_FROM_CONFIGURATION_FILE="yes" + break + ;; # username within /home -u|--user) shift @@ -696,6 +707,13 @@ function read_configuration { fi fi + if [[ $INSTALLING_FROM_CONFIGURATION_FILE == "yes" ]]; then + if [ ! -f $CONFIGURATION_FILE ]; then + echo "The configuration file $CONFIGURATION_FILE was not found" + exit 8935 + fi + fi + if [ -f $CONFIGURATION_FILE ]; then if grep -q "SSL_PROTOCOLS" $CONFIGURATION_FILE; then SSL_PROTOCOLS=$(grep "SSL_PROTOCOLS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')