3 # ntp This shell script takes care of starting and stopping
7 # description: ntp is the NTP daemon.
9 # Source function library.
10 . /etc/rc.d/init.d/functions
12 # Source networking configuration.
13 . /etc/sysconfig/network
15 # Check that networking is up.
16 [ "${NETWORKING}" = "no" ] && exit 0
18 [ -x /usr/sbin/ntpd -a -f /etc/ntp/ntp.conf ] || exit 0
20 # See how we were called.
23 # Check if the service is already running?
24 if [ ! -f /var/lock/subsys/ntp ]; then
25 # Adjust time to make life easy for ntp
26 # echo -n "Syncing time for ntp"
27 # /usr/sbin/ntpdate -o 1 clock.llnl.gov norad.arc.nasa.gov
30 daemon ntpd -c /etc/ntp/ntp.conf
32 msg_Already_Running ntp
35 touch /var/lock/subsys/ntp
41 rm -f /var/lock/subsys/ntp
51 echo "Usage: $0 {start|stop|restart|status}"