From 28a30437a766edfadbf0befee8701e803febd9e9 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 9 Dec 2008 16:31:29 +0100 Subject: endless loop fix --- src/core/libs/lib-ui-interactive.sh | 2 +- src/core/libs/lib-ui.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 3652610..4f32338 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -139,7 +139,7 @@ interactive_autoprepare() CHOSEN_FS="" while [ "$CHOSEN_FS" = "" ] do - ask_option "Select a filesystem for / and /home:" $FSOPTS || return 1 + ask_option no "Select a filesystem for / and /home:" $FSOPTS || return 1 FSTYPE=$ANSWER_OPTION ask_yesno "$FSTYPE will be used for / and /home. Is this OK?" yes && CHOSEN_FS=1 done diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index eb3f727..f056583 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -441,7 +441,7 @@ _cli_ask_option () #TODO: strip out color codes #TODO: if user entered incorrect choice, ask him again DEFAULT="" - [ "$1" != 'no' ] && DEFAULT=$1 + [ "$1" != 'no' ] && DEFAULT=$1 #TODO: if user forgot to specify a default (eg all args are 1 pos to the left, we can end up in an endless loop :s) [ -z "$2" ] && die_error "ask_option \$2 must be the title" [ -z "$6" ] && debug "_cli_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" -- cgit v1.2.3-54-g00ecf