From 4ad04ca98456523ec35a11e50fe8e01d7c58cd24 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Wed, 25 Feb 2009 22:36:46 +0100 Subject: syntax fix --- src/core/libs/lib-ui-interactive.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index f99518e..e8f52c2 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -74,15 +74,15 @@ interactive_time () { dohwclock - which ntpdate >/dev/null && ask_option yes "'ntpdate' was detected on your system.\n\nDo you want to use 'ntpdate' for syncing your clock,\nby using the internet clock pool?" "(You need a working internet connection for doing this!)" #TODO: only propose if network ok. - if [ $? -eq 0 ]; then + if which ntpdate >/dev/null && ask_option yes "'ntpdate' was detected on your system.\n\nDo you want to use 'ntpdate' for syncing your clock,\nby using the internet clock pool?" "(You need a working internet connection for doing this!)" #TODO: only propose if network ok. + then if ntpdate pool.ntp.org >/dev/null then notify "Synced clock with internet pool successfully.\n\nYour current time is now:\n$(date)" else show_warning 'Ntp failure' "An error has occured, time was not changed!" fi - else + if # display and ask to set date/time ask_datetime -- cgit v1.2.3-54-g00ecf