* Don't stop jobs that are already stopped.

svn path=/nixos/branches/upstart-0.6/; revision=18226
This commit is contained in:
Eelco Dolstra 2009-11-06 21:17:11 +00:00
parent 82c3e2aa50
commit 4b2ff53ec6
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ with pkgs.lib;
# Stop all Upstart jobs.
initctl list | while read jobName rest; do
if test "$jobName" != shutdown; then
initctl list | while IFS=", " read jobName status rest; do
if test "$jobName" != shutdown -a "$status" != "stop/waiting"; then
echo "stopping $jobName..."
stop "$jobName"
fi