3
0
Fork 0
forked from mirrors/nixpkgs

* When restarting a job, *really* wait until the job has

stopped before starting it again.

svn path=/nixos/trunk/; revision=11232
This commit is contained in:
Eelco Dolstra 2008-03-20 14:44:36 +00:00
parent 2cc2831563
commit 047241dd5d

View file

@ -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
}