mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
ntpd: *mimic the behaviour of the busybox ntpd's "-S" flag
*create a seperate line for every server, otherwise only the first listed server will be used
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ntp
|
PKG_NAME:=ntp
|
||||||
PKG_VERSION:=4.2.8p10
|
PKG_VERSION:=4.2.8p10
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
|
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
SLEEPTIME=10
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
|
STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
|
||||||
|
|
||||||
if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ]
|
if [[ -n "$STATUS" && "$STATUS" -lt "16" ]]
|
||||||
then
|
then
|
||||||
ACTION="stratum" /sbin/hotplug-call ntp
|
ACTION="stratum" /sbin/hotplug-call ntp
|
||||||
exit 0
|
SLEEPTIME=660
|
||||||
fi
|
fi
|
||||||
sleep 10
|
sleep $SLEEPTIME
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -68,7 +68,10 @@ start_service() {
|
|||||||
emit ""
|
emit ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
emit "server $server iburst"
|
for i in $server
|
||||||
|
do
|
||||||
|
emit "server $i iburst"
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p /var/lib/ntp
|
mkdir -p /var/lib/ntp
|
||||||
chown -R ntp:ntp /var/lib/ntp
|
chown -R ntp:ntp /var/lib/ntp
|
||||||
|
|||||||
Reference in New Issue
Block a user