#! /bin/bash
#
# netdate	set date and time by ARPA Internet RFC 868
#
# chkconfig: 345 90 60
# description: netdate - set date and time by ARPA Internet RFC 868
# processname: netdate
# config: /etc/sysconfig/netdate
# pidfile: /var/run/netdate.pid

# Source function library.
WITHOUT_RC_COMPAT=1
. /etc/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/netdate

LOCKFILE=/var/lock/subsys/netdate
RETVAL=0

start()
{
	#test -z "$NETDATE_HOSTS" || { echo_passed; exit 0; }
	action "Synchronizing network time" "/usr/sbin/netdate ${NETDATE_LIMIT:+-l $NETDATE_LIMIT} ${NETDATE_PROTO} ${NETDATE_HOSTS}"
	RETVAL=$?
	return $RETVAL
}

stop()
{
  true
}

restart()
{
  	stop
	start
}

# See how we were called.
case "$1" in
	start)
		start
		;;
	stop)
		stop
		;;
	reload|restart)
		restart
		;;
	*)
		msg_usage "${0##*/} {start|stop|restart}"
		RETVAL=1
esac

exit $RETVAL
