]> git.pld-linux.org Git - packages/ntp.git/commitdiff
- cleaning
authorankry <ankry@pld-linux.org>
Mon, 5 May 2003 00:06:57 +0000 (00:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ntp.init -> 1.9

ntp.init

index c2002d223e2566beae58a12317b74e0d16bb338f..5a6b80a2ef4b8844f3a7214ada87a2cc3f3cbe4f 100644 (file)
--- a/ntp.init
+++ b/ntp.init
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
-# ntp           This shell script takes care of starting and stopping
-#               ntp (NTP daemon).
+# ntp          This shell script takes care of starting and stopping
+#              ntp (NTP daemon).
 #
 # chkconfig:   2345 55 10
 # description: ntp is the NTP daemon.
 . /etc/sysconfig/ntp
 
 # Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               # nls "ERROR: Networking is down. %s can't be run." <service>
+               msg_network_down ntp
+               exit 1
+       fi
+else
+       exit 0
+fi
 
 [ -x /usr/sbin/ntpd -a -f /etc/ntp/ntp.conf ] || exit 0
 
@@ -27,7 +35,7 @@ case "$1" in
         if [ ! -f /var/lock/subsys/ntp ]; then
                if is_yes "$SYNC_TIME"; then
                        # Adjust time to make life easy for ntp
-                               run_cmd "Syncing time for ntp" /usr/sbin/ntpdate $NTPDATE_OPTIONS $NTPDATE_SERVERS
+                               run_cmd "Syncing time for ntp" "/usr/sbin/ntpdate $NTPDATE_OPTIONS $NTPDATE_SERVERS"
                fi
                msg_starting ntp
                daemon ntpd -c /etc/ntp/ntp.conf
@@ -56,8 +64,8 @@ case "$1" in
        $0 start
        ;;
   *)
-        echo "Usage: $0 {start|stop|restart|status}"
+        msg_usage "$0 {start|stop|restart|reload|status}"
         exit 1
 esac
 
-exit 0
+exit $RETVAL
This page took 0.056667 seconds and 4 git commands to generate.