]> git.pld-linux.org Git - packages/rc-scripts.git/blame - rc-scripts-shutdown-speedup.patch
- add hwprofiles dir
[packages/rc-scripts.git] / rc-scripts-shutdown-speedup.patch
CommitLineData
b26a75ec
ER
1--- rc-scripts/rc.d/rc.shutdown 2006-02-10 21:27:42.000000000 +0200
2+++ /tmp/rc.shutdown 2006-03-22 21:58:51.000000000 +0200
3@@ -30,9 +30,19 @@
4 runlevel=$1
5 previous=$2
6
7-run_cmd "Sending all processes the TERM signal" killall5 -15
8-sleep 5
9-run_cmd "Sending all processes the KILL signal" killall5 -9
10+# check for other processes.
11+# there could be none if all services were terminated properly
12+# pgrep -g 0 requires procps >= 3.2.6-1.1
13+pids=$(pgrep -g 0 -l -v | grep -v '^1 ')
14+if [ -n "$pids" ]; then
15+ run_cmd "Sending all processes the TERM signal" killall5 -15
16+fi
17+
18+pids=$(pgrep -g 0 -l -v | grep -v '^1 ')
19+if [ -n "$pids" ]; then
20+ sleep 5
21+ run_cmd "Sending all processes the KILL signal" killall5 -9
22+fi
23
24 # Write to wtmp file before unmounting /var
25 halt -w
This page took 0.084721 seconds and 4 git commands to generate.