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 }