diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-12-29 17:03:51 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-12-29 17:03:51 +0100 |
commit | e5e4eec43cc04cd99648c8b6826af4b9e5c58b10 (patch) | |
tree | 0042b7e60da4935a2366afeb692e60532ff8951c /src/core/procedures/base | |
parent | 65679f839e6b7f1a136d1e7359fc67a029cae717 (diff) |
simplify "default item"-logic in various menus
Diffstat (limited to 'src/core/procedures/base')
-rw-r--r-- | src/core/procedures/base | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/procedures/base b/src/core/procedures/base index 099beeb..a7cd382 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -100,16 +100,14 @@ worker_runtime_packages () worker_set_clock () { - NEXTITEM= while true; do - default=no - [ -n "$NEXTITEM" ] && default="$NEXTITEM" + local default=no ask_option $default "Date/time configuration" '' required \ "1" "Select region and timezone" \ "2" "Set time and date" \ "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" = 1 ] && execute worker interactive_timezone && default=2 + [ "$ANSWER_OPTION" = 2 ] && check_depend worker interactive_timezone && execute worker interactive_time && default=3 [ "$ANSWER_OPTION" = 3 ] && break done } |