summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-04-04 13:25:16 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-04-04 13:25:16 +0200
commit49060262210fa1c610d25695336c08b8d4948fd0 (patch)
tree60da6ffb406e8eabed3253a059f7faac1161b977 /src/core
parent254504decd68cbbd30c14eaacc4a821c08628524 (diff)
fix for ntp stuff take 2
Diffstat (limited to 'src/core')
-rw-r--r--src/core/libs/lib-ui-interactive.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 1c58e8d..4020bd9 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -92,13 +92,12 @@ interactive_time () {
current=`date`
default=no
[ -n "$NEXTITEM" ] && default="$NEXTITEM"
- EXTRA_1=
- EXTRA_2=
#TODO: only propose if network ok
- which ntpdate &>/dev/null && EXTRA_1='ntp' && EXTRA_2='Set time and date using ntp'
+ EXTRA=()
+ 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_1 $EXTRA_2 "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"
if [ "$ANSWER_OPTION" = ntp ]
then
if ntpdate pool.ntp.org >/dev/null