source:
lsb-bootscripts/etc/init.d/sendsignals@
5de4ea07
Last change on this file since 5de4ea07 was f3f65e73, checked in by , 13 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[1c48007] | 1 | #!/bin/sh |
[f3f65e73] | 2 | # Begin $RC_BASE/init.d/sendsignals |
[1c48007] | 3 | |
4 | ### BEGIN INIT INFO | |
5 | # Provides: sendsignals | |
6 | # Required-Start: | |
7 | # Should-Start: | |
[614a14e] | 8 | # Required-Stop: $local_fs swap localnet |
[010d108] | 9 | # Should-Stop: |
10 | # Default-Start: | |
11 | # Default-Stop: 0 6 | |
[1c48007] | 12 | # Short-Description: Attempts to kill remaining processes. |
13 | # Description: Attempts to kill remaining processes. | |
14 | # X-LFS-Provided-By: LFS | |
15 | ### END INIT INFO | |
16 | ||
17 | . /lib/lsb/init-functions | |
18 | ||
19 | case "${1}" in | |
20 | stop) | |
21 | message="Sending all processes the TERM signal..." | |
22 | killall5 -15 | |
23 | error_value=${?} | |
[d2abc4d] | 24 | # Account for successful return value of 2 |
[12078f7] | 25 | if [ ${error_value} -eq 2 ]; then |
[5597318] | 26 | error_value=0 |
[d2abc4d] | 27 | fi |
[1c48007] | 28 | sleep 3 |
29 | ||
30 | (exit ${error_value}) | |
31 | evaluate_retval standard | |
32 | ||
33 | message="Sending all processes the KILL signal..." | |
34 | killall5 -9 | |
35 | error_value=${?} | |
[d2abc4d] | 36 | # Account for successful return value of 2 |
[12078f7] | 37 | if [ ${error_value} -eq 2 ]; then |
[5597318] | 38 | error_value=0 |
[d2abc4d] | 39 | fi |
[1c48007] | 40 | |
41 | sleep 3 | |
42 | ||
43 | (exit ${error_value}) | |
44 | evaluate_retval standard | |
45 | ;; | |
46 | ||
47 | *) | |
48 | echo "Usage: ${0} {stop}" | |
49 | exit 1 | |
50 | ;; | |
51 | ||
52 | esac | |
53 | ||
[f3f65e73] | 54 | # End $RC_BASE/init.d/sendsignals |
Note:
See TracBrowser
for help on using the repository browser.