|
|
|
@ -37,14 +37,14 @@ |
|
|
|
# on startup, force synchronize local machine |
|
|
|
# on startup, force synchronize local machine |
|
|
|
# because ntpd does not skip large time offsets |
|
|
|
# because ntpd does not skip large time offsets |
|
|
|
# the "active" short circuit above does not hurt |
|
|
|
# the "active" short circuit above does not hurt |
|
|
|
if rcService ntp ostart yes; then |
|
|
|
if rcVarIsYes ntp_ostart; then |
|
|
|
@l_prefix@/bin/ntpdate \ |
|
|
|
@l_prefix@/bin/ntpdate \ |
|
|
|
`grep "^server" @l_prefix@/etc/ntp/ntp.conf |\ |
|
|
|
`grep "^server" @l_prefix@/etc/ntp/ntp.conf |\ |
|
|
|
awk '{ printf(" %s", $2); }'` |
|
|
|
awk '{ printf(" %s", $2); }'` |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# run the NTP daemon for continued synchronization |
|
|
|
# run the NTP daemon for continued synchronization |
|
|
|
if rcService ntp daemon yes; then |
|
|
|
if rcVarIsYes ntp_daemon; then |
|
|
|
@l_prefix@/bin/ntpd \ |
|
|
|
@l_prefix@/bin/ntpd \ |
|
|
|
-p @l_prefix@/var/ntp/ntpd.pid \ |
|
|
|
-p @l_prefix@/var/ntp/ntpd.pid \ |
|
|
|
-f @l_prefix@/var/ntp/ntpd.drift \ |
|
|
|
-f @l_prefix@/var/ntp/ntpd.drift \ |
|
|
|
@ -54,19 +54,19 @@ |
|
|
|
%stop -u @l_susr@ |
|
|
|
%stop -u @l_susr@ |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp active no && exit 0 |
|
|
|
rcService ntp active no && exit 0 |
|
|
|
rcService ntp daemon yes || exit 0 |
|
|
|
rcVarIsYes ntp_daemon || exit 0 |
|
|
|
ntp_signal TERM |
|
|
|
ntp_signal TERM |
|
|
|
rm -f $ntp_pidfile 2>/dev/null || true |
|
|
|
rm -f $ntp_pidfile 2>/dev/null || true |
|
|
|
|
|
|
|
|
|
|
|
%restart -p 200 -u @l_susr@ |
|
|
|
%restart -p 200 -u @l_susr@ |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp active no && exit 0 |
|
|
|
rcService ntp active no && exit 0 |
|
|
|
rcService ntp daemon yes || exit 0 |
|
|
|
rcVarIsYes ntp_daemon || exit 0 |
|
|
|
rc ntp stop start |
|
|
|
rc ntp stop start |
|
|
|
|
|
|
|
|
|
|
|
%hourly -u @l_susr@ |
|
|
|
%hourly -u @l_susr@ |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp enable yes || exit 0 |
|
|
|
rcService ntp hourly yes || exit 0 |
|
|
|
rcVarIsYes ntp_hourly || exit 0 |
|
|
|
|
|
|
|
|
|
|
|
# synchronize local machine every hour |
|
|
|
# synchronize local machine every hour |
|
|
|
# because ntpd does not skip large time offsets |
|
|
|
# because ntpd does not skip large time offsets |
|
|
|
|