Option to install only from a configuration file

This commit is contained in:
Bob Mottram 2015-02-01 21:18:25 +00:00
parent 6e77aa1217
commit 8721560098
2 changed files with 18 additions and 0 deletions

Binary file not shown.

View File

@ -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}')