diff --git a/src/freedombone b/src/freedombone index f2db3ba1..9aebd436 100755 --- a/src/freedombone +++ b/src/freedombone @@ -42,6 +42,18 @@ fi source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars +UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* +for f in $UTILS_FILES +do + source $f +done + +APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* +for f in $APP_FILES +do + source $f +done + command_options=$1 if [[ $command_options == "menuconfig-full" ]]; then @@ -237,6 +249,10 @@ function parse_args { exit 0 fi + read_config_param 'DEFAULT_DOMAIN_NAME' + read_config_param 'MY_USERNAME' + read_config_param 'SYSTEM_TYPE' + if [ ! -d /home/$MY_USERNAME ]; then echo $"There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user." exit 1 diff --git a/src/freedombone-utils-config b/src/freedombone-utils-config index b68a3e90..90876d7a 100755 --- a/src/freedombone-utils-config +++ b/src/freedombone-utils-config @@ -31,9 +31,11 @@ function read_config_param { param_name="$1" - if [ -f $CONFIGURATION_FILE ]; then - if grep -q "$param_name" $CONFIGURATION_FILE; then - $param_name=$(grep "$param_name" $CONFIGURATION_FILE | head -n 1 | awk -F '=' '{print $2}') + if [ $CONFIGURATION_FILE ]; then + if [ -f $CONFIGURATION_FILE ]; then + if grep -q "${param_name}" $CONFIGURATION_FILE; then + ${param_name}=$(cat $CONFIGURATION_FILE | grep "${param_name}=" | head -n 1 | awk -F '=' '{print $2}') + fi fi fi }