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>
6 lines
183 B
Bash
6 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" ] }'
|