SVN: rc-scripts/trunk/rc.d/rc.shutdown

glen glen at pld-linux.org
Tue Jul 20 10:42:47 CEST 2010


Author: glen
Date: Tue Jul 20 10:42:46 2010
New Revision: 11684

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
Log:
- ugly hack to still do killall as pgrep is on /usr, or rather drop pgrep as it never returns empty nowadays due kernel threads?

Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown	(original)
+++ rc-scripts/trunk/rc.d/rc.shutdown	Tue Jul 20 10:42:46 2010
@@ -38,13 +38,14 @@
 # check for other processes.
 # there could be none if all services were terminated properly
 # pgrep -g 0 requires procps >= 3.2.6-1.1
+# XXX: pgrep is on /usr!
 pids=$(pgrep -g 0 -l -v | grep -v '^1 ')
-if [ -n "$pids" ]; then
+if [ -n "$pids" ] || [ ! -x /usr/bin/pgrep ]; then
 	run_cmd "Sending all processes the TERM signal" killall5 -15
 fi
 
 pids=$(pgrep -g 0 -l -v | grep -v '^1 ')
-if [ -n "$pids" ]; then
+if [ -n "$pids" ] || [ ! -x /usr/bin/pgrep ]; then
 	sleep 5
 	run_cmd "Sending all processes the KILL signal" killall5 -9
 fi


More information about the pld-cvs-commit mailing list