From aa75a7da7f3b0bb50be82f535244137bae423fa8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 3 Jul 2018 17:02:50 +0200 Subject: examples/var_service/: use "svc" for service commands, other tweaks Signed-off-by: Denys Vlasenko --- examples/var_service/ntpd/run | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'examples/var_service/ntpd') diff --git a/examples/var_service/ntpd/run b/examples/var_service/ntpd/run index 6f2a68188..5c90aad41 100755 --- a/examples/var_service/ntpd/run +++ b/examples/var_service/ntpd/run @@ -6,12 +6,22 @@ exec 2>&1 exec /dev/null @@ -20,30 +30,25 @@ chmod -R a=rX "$rundir" rm -rf rundir 2>/dev/null ln -s "$rundir" rundir - -echo "* Checking network" -test -f /var/run/service/fw/up || exec sleep 7 -sleep 5 # to let it settle - # Grab config from dhcp cfg=-1 for f in rundir/*.ntpconf; do - test -f "$f" || continue - . "$f" + test -f "$f" || continue + . "$f" done # Select peers p_opt="" cfg=0 while test x"${ntpip[$cfg]}" != x""; do - p_opt="$p_opt -p ${ntpip[$cfg]}" - let cfg=cfg+1 + p_opt="$p_opt -p ${ntpip[$cfg]}" + let cfg=cfg+1 done test x"$p_opt" == x"" && p_opt="$default_p_opt" if test x"$p_opt" == x""; then echo "* No NTP peers configured, stopping" - sv o . + svc -o . exec sleep 1 fi -- cgit v1.2.3