3 # ntp This shell script takes care of starting and stopping
6 # chkconfig: 2345 55 10
7 # description: ntp is the NTP client.
9 # Source function library.
10 . /etc/rc.d/init.d/functions
12 # Source networking configuration.
13 . /etc/sysconfig/network
15 # Source ntp configuration
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 # nls "ERROR: Networking is down. %s can't be run." <service>
29 [ -x /usr/sbin/ntpdate ] || exit 0
32 # See how we were called.
35 is_yes "$NTPDATE_CRON" && /usr/sbin/ntpdate -s $NTPDATE_OPTIONS $NTPDATE_SERVERS > /dev/null 2>&1
39 run_cmd "Syncing time for ntp" /usr/sbin/ntpdate $NTPDATE_OPTIONS $NTPDATE_SERVERS
50 msg_usage "$0 {start|restart|force-reload}"