examples/var_service: add /var/run flag file to ntp.script
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
79153cb6bc
commit
871bd2abac
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Note that there is no provision to prevent several copies of the script
|
# 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
|
# to be run in quick succession. In fact, it happens rather often
|
||||||
# if initial syncronization results in a step.
|
# if initial syncronization results in a step.
|
||||||
@ -8,6 +7,9 @@
|
|||||||
#
|
#
|
||||||
# Script should be ready to deal with this.
|
# 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'`
|
dt=`date '+%Y-%m-%d %H:%M:%S'`
|
||||||
|
|
||||||
echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"
|
echo "`tail -n 199 -- "$0.log" 2>/dev/null`" >"$0.log.$$"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user