aboutsummaryrefslogtreecommitdiff
path: root/prepare-board.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-10-23 19:39:19 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-10-23 19:40:38 +0000
commit80af1eba97f363016bb5f3e1ba86151d60df119a (patch)
tree45882898f1a9b2408b308f9a26a3b01163121d8d /prepare-board.sh
parentecf9a84b37e55a0e74364b5c3c885dcabf2e452a (diff)
prepare-board.sh: Try to fix sporadic ntpd failure
... on tcwg-tk1-09.tcwglab Change-Id: I672500cb834141b6e46a73a76d42012728613b0a
Diffstat (limited to 'prepare-board.sh')
-rwxr-xr-xprepare-board.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/prepare-board.sh b/prepare-board.sh
index 270db17..e911233 100755
--- a/prepare-board.sh
+++ b/prepare-board.sh
@@ -222,7 +222,8 @@ do_service()
local service=$3
if [ "$op" = "start_board" ]; then
- if [ "$(systemctl is-active "$service" || true)" = "active" ]; then
+ if [ x"$(systemctl show -p ActiveState "$service")" \
+ = x"ActiveState=active" ]; then
verbose "Stopping system service $service"
systemctl stop "$service"
echo "$service" >> "$restart_file"
@@ -417,7 +418,7 @@ configure_ntp()
# we get stuck ntpd process that doesn't respond to SIGTERM.
# Kill it with SIGKILL.
pkill -9 ntpd || true
- sleep 5
+ sleep 15
ntpd -gq
fi
fi