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:
Peter Wagner
2018-01-02 15:16:48 +01:00
parent 4e2336c5f4
commit 04654291a4
3 changed files with 10 additions and 5 deletions
+5 -3
View File
@@ -1,13 +1,15 @@
#!/bin/sh
SLEEPTIME=10
while true
do
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
ACTION="stratum" /sbin/hotplug-call ntp
exit 0
SLEEPTIME=660
fi
sleep 10
sleep $SLEEPTIME
done