From e74fce956b15176ff6f7855306de919d971237c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Feb 2015 18:19:11 +0000 Subject: [PATCH] Tidying --- src/freedombone | 17 +++++++---------- src/freedombone-config | 3 +-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/freedombone b/src/freedombone index 156de133..a3b21902 100755 --- a/src/freedombone +++ b/src/freedombone @@ -473,7 +473,6 @@ function interactive_configuration { fi freedombone-config \ - -u $MY_USERNAME \ -f $CONFIGURATION_FILE \ -w $FREEDOMBONE_WEBSITE \ -b $FREEDOMBONE_BITMESSAGE \ @@ -501,13 +500,11 @@ function interactive_configuration { if [[ $1 == "menuconfig" ]]; then interactive_configuration else + while [[ $# > 1 ]] + do + key="$1" -# Oddly it appears that command line parsing cannot be done inside of a function -while [[ $# > 1 ]] -do -key="$1" - -case $key in + case $key in -h|--help) show_help ;; @@ -648,9 +645,9 @@ case $key in *) # unknown option ;; -esac -shift -done + esac + shift + done fi function parse_args { diff --git a/src/freedombone-config b/src/freedombone-config index dbfabb2e..8fd5dc31 100755 --- a/src/freedombone-config +++ b/src/freedombone-config @@ -136,14 +136,13 @@ function save_configuration_file { echo "MY_USERNAME=$MY_USERNAME" > $CONFIGURATION_FILE echo "DOMAIN_NAME=$DOMAIN_NAME" >> $CONFIGURATION_FILE - echo "MY_EMAIL_ADDRESS=$MY_EMAIL_ADDRESS" >> $CONFIGURATION_FILE echo "SYSTEM_TYPE=$SYSTEM_TYPE" >> $CONFIGURATION_FILE echo "INSTALLING_ON_BBB=$INSTALLING_ON_BBB" >> $CONFIGURATION_FILE echo "DDNS_PROVIDER=$DDNS_PROVIDER" >> $CONFIGURATION_FILE echo "DDNS_USERNAME=$DDNS_USERNAME" >> $CONFIGURATION_FILE - # does this need to be saved? echo "DDNS_PASSWORD=$DDNS_PASSWORD" >> $CONFIGURATION_FILE echo "MY_NAME=$MY_NAME" >> $CONFIGURATION_FILE + echo "MY_EMAIL_ADDRESS=$MY_EMAIL_ADDRESS" >> $CONFIGURATION_FILE echo "LOCAL_NETWORK_STATIC_IP_ADDRESS=$LOCAL_NETWORK_STATIC_IP_ADDRESS" >> $CONFIGURATION_FILE echo "ROUTER_IP_ADDRESS=$ROUTER_IP_ADDRESS" >> $CONFIGURATION_FILE echo "ENABLE_CJDNS=$ENABLE_CJDNS" >> $CONFIGURATION_FILE