3 # openntpd This shell script takes care of starting and stopping
6 # chkconfig: 2345 55 10
7 # description: openntpd is the NTP daemon.
9 # Source function library.
10 . /etc/rc.d/init.d/functions
12 # Source networking configuration.
13 . /etc/sysconfig/network
15 # Source ntp configuration
16 . /etc/sysconfig/openntpd
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>
22 msg_network_down openntpd
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/openntpd ]; then
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/openntpd
40 msg_already_running openntpd
44 if [ -f /var/lock/subsys/openntpd ]; then
47 rm -f /var/lock/subsys/openntpd
49 msg_not_running openntpd
62 msg_usage "$0 {start|stop|restart|force-reload|status}"