diff options
author | Jim Pryor <profjim@jimpryor.net> | 2009-09-14 05:43:35 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-09-14 08:22:45 +0200 |
commit | 55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc (patch) | |
tree | 3146bf6a577d43f91145674f397fca31064ba1a6 /src/netcfg-menu | |
parent | 67f1b8fae53ebe22ad1a0557c0d7a1371b96cb0b (diff) | |
download | netctl-55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc.tar.gz netctl-55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc.tar.xz |
tabs->spaces, vim modelines
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/netcfg-menu')
-rw-r--r-- | src/netcfg-menu | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/netcfg-menu b/src/netcfg-menu index 40f20b2..a054fe7 100644 --- a/src/netcfg-menu +++ b/src/netcfg-menu @@ -41,24 +41,24 @@ dialog --timeout "$TIMEOUT" --default-item "$DEFAULT" \ 13 50 6 "${profiles[@]}" 2> "$ANSWER" ret=$? - + case $ret in 1) ;; # Cancel - do nothing - 255) # timeout - use default + 255) # timeout - use default profile_up "$DEFAULT" # JP: use profile_up and catch $? ret=$? if [[ $ret -eq 0 ]]; then echo "$DEFAULT" > "$STATE_DIR/menu"; fi - ;; + ;; 0) # User selection profile_up "$(cat "$ANSWER")" ret=$? if [[ $ret -eq 0 ]]; then mv "$ANSWER" "$STATE_DIR/menu"; fi - ;; + ;; *) # Shouldnt happen exit_err "Abnormal ret code from dialog: $ret" - ;; + ;; esac rm -f "$ANSWER" # JP: add -f exit $ret # JP: exit with caught $? -# vim: set ts=4 et sw=4: +# vim: ft=sh ts=4 et sw=4: |