From 8f2a892db573f5f0e79b54ea378d8431e9e04ac0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 12 Jun 2017 21:55:54 +0200 Subject: reproducible Debian: try systemctl twice, but only output and thus log the 2nd attempt, as this is used for counting local problems Signed-off-by: Holger Levsen --- bin/reproducible_worker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/reproducible_worker.sh b/bin/reproducible_worker.sh index c0a9d83e..99b597ae 100755 --- a/bin/reproducible_worker.sh +++ b/bin/reproducible_worker.sh @@ -30,7 +30,8 @@ while true ; do break fi SERVICE="reproducible_build@startup.service" - RUNNING=$(systemctl show $SERVICE|grep ^SubState|cut -d "=" -f2) + # try systemctl twice, but only output and thus log the 2nd attempt… + RUNNING=$(systemctl show $SERVICE 2>/dev/null |grep ^SubState|cut -d "=" -f2) if [ "$RUNNING" != "running" ] ; then # sometimes systemctl requests time out… handle that gracefully sleep 23 -- cgit v1.2.3-54-g00ecf