Set start_cmd and stop_cmd correctly so the code that extracts the names
of the ntp servers from ntp.conf is actually used. Remove pidfile since ntpdate is not a daemon.
This commit is contained in:
parent
bdae44a844
commit
75213c3ed7
@ -12,9 +12,8 @@
|
|||||||
|
|
||||||
name="ntpdate"
|
name="ntpdate"
|
||||||
rcvar=`set_rcvar`
|
rcvar=`set_rcvar`
|
||||||
command="/usr/sbin/${name}"
|
stop_cmd=":"
|
||||||
command_args=">/dev/null 2>&1"
|
start_cmd="ntpdate_start"
|
||||||
pidfile="/var/run/${name}.pid"
|
|
||||||
|
|
||||||
ntpdate_start()
|
ntpdate_start()
|
||||||
{
|
{
|
||||||
@ -26,7 +25,7 @@ ntpdate_start()
|
|||||||
fi
|
fi
|
||||||
if [ -n "$ntpdate_hosts" ]; then
|
if [ -n "$ntpdate_hosts" ]; then
|
||||||
echo "Setting date via ntp."
|
echo "Setting date via ntp."
|
||||||
ntpdate $rc_flags $ntpdate_hosts
|
${ntpdate_command:-ntpdate} $rc_flags $ntpdate_hosts
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user