summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMatthias Dienstbier <mdienstbier@googlemail.com>2009-07-21 10:42:02 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-07-21 10:42:02 +0200
commitf8668b64c025dd2899d4b98f3a369b716dd30aa9 (patch)
treed31d4f85525de927a8b26a3c83db4af624f5bff2 /src/core
parent77f5f91892fb9cc98f321206230f321e6a057727 (diff)
fix the dead cancel buttons of some menus
Diffstat (limited to 'src/core')
-rw-r--r--src/core/libs/lib-ui-interactive.sh4
-rw-r--r--src/core/libs/lib-ui.sh17
-rw-r--r--src/core/procedures/base2
3 files changed, 11 insertions, 12 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 63e2a87..712f1ac 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -123,7 +123,7 @@ interactive_time () {
type ntpdate &>/dev/null && EXTRA=('ntp' 'Set time and date using ntp')
ask_option $default "Date/time configuration" "According to your settings and your hardwareclock, the date should now be $current. If this is incorrect, you can correct this now" required \
- "${EXTRA[@]}" "manual" "Set time and date manually" "return" "Looks good. back to main menu"
+ "${EXTRA[@]}" "manual" "Set time and date manually" "return" "Looks good. back to main menu" || return 1
if [ "$ANSWER_OPTION" = ntp ]
then
if ntpdate pool.ntp.org >/dev/null
@@ -1038,7 +1038,7 @@ select_source_extras_menu ()
ask_option no "FTP Installation" "Make sure the network is ok and you've selected a mirror before continuing the installer" required \
"1" "$worker_runtime_network_title" \
"2" "$worker_select_mirror_title" \
- "3" "Return to Main Menu"
+ "3" "Return to Main Menu" || return 1
[ "$ANSWER_OPTION" = 1 ] && execute worker runtime_network
[ "$ANSWER_OPTION" = 2 ] && execute worker select_mirror
[ "$ANSWER_OPTION" = 3 ] && break
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh
index 82d11f3..2f49304 100644
--- a/src/core/libs/lib-ui.sh
+++ b/src/core/libs/lib-ui.sh
@@ -169,16 +169,15 @@ ask_timezone ()
REGIONS="$REGIONS $i -"
done
while true; do
- ask_option no "Please select a region" '' required $REGIONS
+ ask_option no "Please select a region" '' required $REGIONS || return 1
region=$ANSWER_OPTION
- if [ $? -eq 0 ]; then
- ZONES=""
- for i in $(grep '^[A-Z]' /usr/share/zoneinfo/zone.tab | grep $region/ | cut -f 3 | sed -e "s#$region/##g"| sort -u); do
- ZONES="$ZONES $i -"
- done
- ask_option no "Please select a timezone" '' required $ZONES
- zone=$ANSWER_OPTION
- [ $? -eq 0 ] && ANSWER_TIMEZONE="$region/$zone" && return
+ ZONES=""
+ for i in $(grep '^[A-Z]' /usr/share/zoneinfo/zone.tab | grep $region/ | cut -f 3 | sed -e "s#$region/##g"| sort -u); do
+ ZONES="$ZONES $i -"
+ done
+ ask_option no "Please select a timezone" '' required $ZONES || return 1
+ zone=$ANSWER_OPTION
+ ANSWER_TIMEZONE="$region/$zone" && return
fi
done
}
diff --git a/src/core/procedures/base b/src/core/procedures/base
index 7d56b09..1c5156d 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -115,7 +115,7 @@ worker_set_clock ()
ask_option $default "Date/time configuration" '' required \
"1" "Select region and timezone" \
"2" "Set time and date" \
- "3" "Return to Main Menu"
+ "3" "Return to Main Menu" || return 1
[ "$ANSWER_OPTION" = 1 ] && execute worker interactive_timezone && NEXTITEM=2
[ "$ANSWER_OPTION" = 2 ] && check_depend worker interactive_timezone && execute worker interactive_time && NEXTITEM=3
[ "$ANSWER_OPTION" = 3 ] && break