remove an old note for file
[linux_from_scratch.git] / BOOK / bootscripts / lfs / init.d / sendsignals
blob55de3119be936c7f2ad7facacf193161f2b90cb3
1 #!/bin/sh
2 ########################################################################
3 # Begin sendsignals
5 # Description : Sendsignals Script
7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8 # DJ Lucas - dj@linuxfromscratch.org
9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
11 # Version : LFS 7.0
13 ########################################################################
15 ### BEGIN INIT INFO
16 # Provides: sendsignals
17 # Required-Start:
18 # Should-Start:
19 # Required-Stop: $local_fs swap localnet
20 # Should-Stop:
21 # Default-Start:
22 # Default-Stop: 0 6
23 # Short-Description: Attempts to kill remaining processes.
24 # Description: Attempts to kill remaining processes.
25 # X-LFS-Provided-By: LFS
26 ### END INIT INFO
28 . /lib/lsb/init-functions
30 case "${1}" in
31 stop)
32 log_info_msg "Sending all processes the TERM signal..."
33 killall5 -15
34 error_value=${?}
36 sleep ${KILLDELAY}
38 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
39 log_success_msg
40 else
41 log_failure_msg
44 log_info_msg "Sending all processes the KILL signal..."
45 killall5 -9
46 error_value=${?}
48 sleep ${KILLDELAY}
50 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
51 log_success_msg
52 else
53 log_failure_msg
58 echo "Usage: ${0} {stop}"
59 exit 1
62 esac
64 exit 0
66 # End sendsignals