7.1
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # Begin $RC_BASE/init.d/sendsignals
|
---|
3 |
|
---|
4 | ### BEGIN INIT INFO
|
---|
5 | # Provides: sendsignals
|
---|
6 | # Required-Start:
|
---|
7 | # Should-Start:
|
---|
8 | # Required-Stop: $local_fs swap localnet
|
---|
9 | # Should-Stop:
|
---|
10 | # Default-Start:
|
---|
11 | # Default-Stop: 0 6
|
---|
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=${?}
|
---|
24 | # Account for successful return value of 2
|
---|
25 | if [ ${error_value} -eq 2 ]; then
|
---|
26 | error_value=0
|
---|
27 | fi
|
---|
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=${?}
|
---|
36 | # Account for successful return value of 2
|
---|
37 | if [ ${error_value} -eq 2 ]; then
|
---|
38 | error_value=0
|
---|
39 | fi
|
---|
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 |
|
---|
54 | # End $RC_BASE/init.d/sendsignals
|
---|
Note:
See
TracBrowser
for help on using the repository browser.