SOURCES: rc-scripts-shutdown-speedup.patch (NEW) - speedup shutdow...
glen
glen at pld-linux.org
Wed Mar 22 21:00:21 CET 2006
Author: glen Date: Wed Mar 22 20:00:21 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- speedup shutdown. tested with vserver
---- Files affected:
SOURCES:
rc-scripts-shutdown-speedup.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/rc-scripts-shutdown-speedup.patch
diff -u /dev/null SOURCES/rc-scripts-shutdown-speedup.patch:1.1
--- /dev/null Wed Mar 22 21:00:21 2006
+++ SOURCES/rc-scripts-shutdown-speedup.patch Wed Mar 22 21:00:16 2006
@@ -0,0 +1,25 @@
+--- rc-scripts/rc.d/rc.shutdown 2006-02-10 21:27:42.000000000 +0200
++++ /tmp/rc.shutdown 2006-03-22 21:58:51.000000000 +0200
+@@ -30,9 +30,19 @@
+ runlevel=$1
+ previous=$2
+
+-run_cmd "Sending all processes the TERM signal" killall5 -15
+-sleep 5
+-run_cmd "Sending all processes the KILL signal" killall5 -9
++# check for other processes.
++# there could be none if all services were terminated properly
++# pgrep -g 0 requires procps >= 3.2.6-1.1
++pids=$(pgrep -g 0 -l -v | grep -v '^1 ')
++if [ -n "$pids" ]; 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
++ sleep 5
++ run_cmd "Sending all processes the KILL signal" killall5 -9
++fi
+
+ # Write to wtmp file before unmounting /var
+ halt -w
================================================================
More information about the pld-cvs-commit
mailing list