From 047241dd5d0e999e2edb624d9e10cb11f5ad5bff Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 20 Mar 2008 14:44:36 +0000 Subject: [PATCH] * When restarting a job, *really* wait until the job has stopped before starting it again. svn path=/nixos/trunk/; revision=11232 --- system/switch-to-configuration.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/switch-to-configuration.sh b/system/switch-to-configuration.sh index e3fd59910cb..98a2775c7a7 100644 --- a/system/switch-to-configuration.sh +++ b/system/switch-to-configuration.sh @@ -44,8 +44,8 @@ if test "$action" = "switch" -o "$action" = "test"; then stopJob() { local job=$1 initctl stop "$job" - while ! initctl list 2>&1 | grep -q "initctl: $job (stop)"; do - echo "waiting for $job..." + while ! initctl status "$job" 2>&1 | grep -q "(stop) waiting"; do + echo "waiting for $job to stop..." sleep 1 done }