3 # rdate This shell script takes care of setting date from ntp server on startup
5 # chkconfig: 2345 11 89
6 # description: set time with rdate
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 if is_no "${NETWORKING}"; then
17 msg_network_down rdate
24 if [ -f /etc/sysconfig/rdate ] ; then
25 . /etc/sysconfig/rdate
28 # See how we were called.
31 # Check if we have to do anything:
32 if [ "$SET_TIME" = "yes" ]; then
33 if [ -n "$RDATE_SERVER" ]; then
34 run_cmd "Setting time from remote server: $RDATE_SERVER" rdate -s -l $RDATE_SERVER
42 if [ -n "$RDATE_SERVER" ]; then
44 echo -n "Local time: "
46 echo -n "Local machine hardware clock: "
51 msg_usage "$0 {start|stop|restart|status}"