summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-04-15 11:51:43 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-04-15 11:51:43 +0200
commit6ed6803d0dd8cd3fc93208d614c3558b962a654e (patch)
tree2cdb4c71787965334f7be6352c5a12c757d30c1b /scripts
parentc96f443ea84f8041c4b1bdea56f36d9a0d827cf6 (diff)
downloadnetctl-6ed6803d0dd8cd3fc93208d614c3558b962a654e.tar.gz
netctl-6ed6803d0dd8cd3fc93208d614c3558b962a654e.tar.xz
Restore support for kernel command line
It is once again possible to use NET= at the kernel command line when using net-profiles.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/netcfg-menu11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/netcfg-menu b/scripts/netcfg-menu
index a62838a..b6aa402 100755
--- a/scripts/netcfg-menu
+++ b/scripts/netcfg-menu
@@ -48,14 +48,13 @@ ret=$?
case $ret in
1) ;; # Cancel - do nothing
255) # timeout - use default
- profile_up "$DEFAULT" # JP: use profile_up and catch $?
- ret=$?
- (( ret == 0 )) && echo "$DEFAULT" > "$STATE_DIR/menu"
- ;;
+ PROFILE=$DEFAULT;;&
0) # User selection
- profile_up "$(< "$ANSWER")"
+ PROFILE=$(< "$ANSWER");;&
+ 255|0)
+ profile_up "$PROFILE"
ret=$?
- (( ret == 0 )) && mv "$ANSWER" "$STATE_DIR/menu"
+ (( ret == 0 )) && echo "$PROFILE" > "$STATE_DIR/menu"
;;
*) # Shouldnt happen
exit_err "Abnormal ret code from dialog: $ret"