[Pkg-sysvinit-commits] r1847 - sysvinit/trunk/debian/src/initscripts/etc/init.d

Petter Reinholdtsen pere at alioth.debian.org
Sun Mar 21 19:04:07 UTC 2010


Author: pere
Date: 2010-03-21 19:04:05 +0000 (Sun, 21 Mar 2010)
New Revision: 1847

Modified:
   sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs
Log:
Only imit upstart controled processes if /sbin/initctl exist.

Modified: sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs	2010-03-21 18:50:31 UTC (rev 1846)
+++ sysvinit/trunk/debian/src/initscripts/etc/init.d/sendsigs	2010-03-21 19:04:05 UTC (rev 1847)
@@ -52,9 +52,11 @@
 	# Upstart jobs have their own "stop on" clauses that sends
 	# SIGTERM/SIGKILL just like this, so if they're still running,
 	# they're supposed to be
-	for pid in $(initctl list | sed -n -e "/process [0-9]/s/.*process //p"); do
-		OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
-	done
+	if [ -x /sbin/initctl ]; then
+		for pid in $(initctl list | sed -n -e "/process [0-9]/s/.*process //p"); do
+			OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
+		done
+	fi
 
 	# Flush the kernel I/O buffer before we start to kill
 	# processes, to make sure the IO of already stopped services to




More information about the Pkg-sysvinit-commits mailing list