mirror of
https://github.com/openwrt/packages.git
synced 2025-01-31 03:41:44 +00:00
9b6bf46957
When the service is started, wait for the clock to be synchronized for up to 5 minutes and provide the stratum action once for ntp hotplug scripts. Signed-off-by: Miroslav Lichvar <mlichvar0@gmail.com>
7 lines
183 B
Bash
7 lines
183 B
Bash
#!/bin/sh
|
|
# Wait for sync for up to 5 minutes and notify other services
|
|
|
|
/usr/bin/chronyc waitsync 300 1 0.0 1 || exit 0
|
|
|
|
ubus call hotplug.ntp call '{ "env": [ "ACTION=stratum" ] }'
|