]> git.pld-linux.org Git - packages/ntp.git/commitdiff
- restore the background feature
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 1 Feb 2010 17:14:31 +0000 (17:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ntp-client.init -> 1.10

ntp-client.init

index 81d3563a5a214b49e0882f5f8ec1923b881746b5..ae9a05c4b23d79ba772072b3489d183e1d925051 100644 (file)
@@ -27,19 +27,21 @@ else
        exit 0
 fi
 
-start() {
-       show "Syncing time with ntpdate"
-       daemon /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS
-       RETVAL=$?
-       if [ $RETVAL -eq 0 ]; then
-               touch /var/lock/subsys/ntpdate
-               if is_yes "$SYNC_HWCLOCK"; then
-                       show "Syncing hardware clock to system time"
-                   /sbin/hwclock --systohc && ok || fail
-               fi
+ntpdate_background() {
+       /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS || return $?
+
+       if is_yes "$SYNC_HWCLOCK"; then
+               /sbin/hwclock --systohc
        fi
 }
 
+start() {
+       show "Syncing time with ntpdate (backgrounding)"
+       ntpdate_background &
+       touch /var/lock/subsys/ntpdate
+       ok
+}
+
 stop() {
        rm -f /var/lock/subsys/ntpdate
 }
@@ -58,7 +60,7 @@ restart|force-reload)
        start
        ;;
 cronsettime)
-       is_yes "$NTPDATE_CRON" && /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS > /dev/null 2>&1
+       is_yes "$NTPDATE_CRON" && /usr/sbin/ntpdate -s ${NTPDATE_USER:+-U $NTPDATE_USER} $NTPDATE_OPTIONS $NTPDATE_SERVERS
        RETVAL=$?
        ;;
 *)
This page took 0.040198 seconds and 4 git commands to generate.