diff options
-rwxr-xr-x | scripts/netcfg-daemon | 2 | ||||
-rwxr-xr-x | scripts/netcfg-menu | 15 |
2 files changed, 6 insertions, 11 deletions
diff --git a/scripts/netcfg-daemon b/scripts/netcfg-daemon index d0b6f7c..98f96d6 100755 --- a/scripts/netcfg-daemon +++ b/scripts/netcfg-daemon @@ -19,7 +19,7 @@ case "$1" in [[ -e $LAST_STATE ]] || exit_err "No recorded netcfg state to restore" # The order in LAST_STATE is meaningless so we can just as - # well start the profiles in the background. + # well start the profiles in parallel. while read profile; do if /usr/bin/netcfg up "$profile"; then echo "$profile" >> "$STATE_FILE" diff --git a/scripts/netcfg-menu b/scripts/netcfg-menu index 86b5d09..9a875ae 100755 --- a/scripts/netcfg-menu +++ b/scripts/netcfg-menu @@ -8,10 +8,12 @@ if ! type dialog &> /dev/null; then fi check_make_state_dir - # JP: we'll use $STATE_DIR/menu to record what profile is being connected in this way rm -f "$STATE_DIR/menu" +# Set timeout +TIMEOUT=${1-0} + # Scan all profiles i=0 # JP: change for prof to while read prof to avoid assumption that profile names are always single tokens (no spaces etc.) @@ -30,13 +32,6 @@ fi # if no default yet, use the first entry [[ -z "$DEFAULT" ]] && DEFAULT="${profiles[0]}" -# Set timeout -if [[ -z "$1" ]]; then - TIMEOUT="0" -else - TIMEOUT="$1" -fi - # Display Dialog PROFILE=$(dialog --timeout "$TIMEOUT" --default-item "$DEFAULT" --stdout \ --menu 'Select the network profile you wish to use' \ @@ -50,8 +45,8 @@ case $ret in ret=$? (( ret == 0 )) && echo "$PROFILE" > "$STATE_DIR/menu" ;; - *) # Shouldnt happen - exit_err "Abnormal ret code from dialog: $ret" + *) # Should not happen + exit_err "Abnormal return code from dialog: $ret" ;; esac |