#!/sbin/runscript depend() { before cron need net use dns } checkconfig() { if [ -z "${RDATE_SERVER}" ] ; then eerror "Please edit /etc/conf.d/rdate" eerror "I need to know what server to use!" return 1 fi if [ -z "${RDATE_OPTS}" ] ; then eerror "Please edit /etc/conf.d/rdate" eerror "I need to know what options to use!" return 1 fi return 0 } start() { checkconfig || return $? ebegin "Setting clock via rdate" /usr/bin/rdate -s ${RDATE_OPTS} ${RDATE_SERVER} >/dev/null & local pid=$! (sleep ${RDATE_TIMEOUT:-30}; kill -9 ${pid} >&/dev/null) & wait ${pid} eend $? "Failed to set clock" }