|
|
@@ -18,6 +18,7 @@
|
|
|
[ -f $ntp_pidfile ] && kill -$1 `cat $ntp_pidfile`
|
|
|
}
|
|
|
ntp_once () {
|
|
|
+ [ ".$1" != . ] && sleep $1
|
|
|
@l_prefix@/bin/ntpdate \
|
|
|
`grep "^server" @l_prefix@/etc/ntp/ntp.conf |\
|
|
|
awk '{ printf(" %s", $2); }'` || true
|
|
|
@@ -51,7 +52,7 @@
|
|
|
esac
|
|
|
|
|
|
# run the NTP daemon for continued synchronization
|
|
|
- if [ ".$ntp_mode" = ".daemon" ]; then
|
|
|
+ if [ ".$ntp_mode" = .daemon ]; then
|
|
|
@l_prefix@/bin/ntpd \
|
|
|
-p @l_prefix@/var/ntp/ntpd.pid \
|
|
|
-f @l_prefix@/var/ntp/ntpd.drift \
|
|
|
@@ -69,17 +70,17 @@
|
|
|
rcService ntp active no && exit 0
|
|
|
rc ntp stop start
|
|
|
|
|
|
-%quarterly -u @l_susr@
|
|
|
+%quarterly -p 800 -u @l_susr@
|
|
|
rcService ntp enable yes || exit 0
|
|
|
- [ ".$ntp_mode" = ".quarterly" ] && sleep 30 && ntp_once
|
|
|
+ [ ".$ntp_mode" = .quarterly ] && ntp_once 30
|
|
|
|
|
|
-%hourly -u @l_susr@
|
|
|
+%hourly -p 800 -u @l_susr@
|
|
|
rcService ntp enable yes || exit 0
|
|
|
- [ ".$ntp_mode" = ".hourly" ] && sleep 30 && ntp_once
|
|
|
+ [ ".$ntp_mode" = .hourly ] && ntp_once 30
|
|
|
|
|
|
-%daily -u @l_susr@
|
|
|
+%daily -p 800 -u @l_susr@
|
|
|
rcService ntp enable yes || exit 0
|
|
|
- [ ".$ntp_mode" = ".daily" ] && sleep 30 && ntp_once
|
|
|
+ [ ".$ntp_mode" = .daily ] && ntp_once 30
|
|
|
|
|
|
# rotate logfile
|
|
|
shtool rotate -f \
|
|
|
@@ -89,11 +90,11 @@
|
|
|
-E "${ntp_log_epilog} && rc ntp restart" \
|
|
|
@l_prefix@/var/ntp/ntp.log
|
|
|
|
|
|
-%weekly -u @l_susr@
|
|
|
+%weekly -p 800 -u @l_susr@
|
|
|
rcService ntp enable yes || exit 0
|
|
|
- [ ".$ntp_mode" = ".weekly" ] && sleep 30 && ntp_once
|
|
|
+ [ ".$ntp_mode" = .weekly ] && ntp_once 30
|
|
|
|
|
|
-%monthly -u @l_susr@
|
|
|
+%monthly -p 800 -u @l_susr@
|
|
|
rcService ntp enable yes || exit 0
|
|
|
- [ ".$ntp_mode" = ".monthly" ] && sleep 30 && ntp_once
|
|
|
+ [ ".$ntp_mode" = .monthly ] && ntp_once 30
|
|
|
|