[git commit] examples/var_service: add /var/run flag file to ntp.script

Denys Vlasenko vda.linux at googlemail.com
Thu Jul 26 11:45:33 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=871bd2abaccd042cba757831fc4461806e8f446d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 examples/var_service/ntpd/ntp.script | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/var_service/ntpd/ntp.script b/examples/var_service/ntpd/ntp.script
index 8542181eb..6cd81014d 100755
--- a/examples/var_service/ntpd/ntp.script
+++ b/examples/var_service/ntpd/ntp.script
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 # Note that there is no provision to prevent several copies of the script
 # to be run in quick succession. In fact, it happens rather often
 # if initial syncronization results in a step.
@@ -8,6 +7,9 @@
 #
 # Script should be ready to deal with this.
 
+# For other parts of the system which prefer to run only on the stable clock
+echo "$1" >rundir/sync_status
+
 dt=`date '+%Y-%m-%d %H:%M:%S'`
 
 echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"


More information about the busybox-cvs mailing list