mirror of
https://github.com/openwrt/packages.git
synced 2026-01-09 19:31:21 +00:00
14 lines
221 B
Bash
14 lines
221 B
Bash
#!/bin/sh
|
|
|
|
while true
|
|
do
|
|
STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')"
|
|
|
|
if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ]
|
|
then
|
|
ACTION="stratum" /sbin/hotplug-call ntp
|
|
exit 0
|
|
fi
|
|
sleep 10
|
|
done
|