* Merged newxml into HEAD
[linux_from_scratch.git] / bootscripts / lfs / init.d / sendsignals
blob42ae89b61198209c46955c60dbf58f39adc8dbbc
1 #!/bin/sh
2 # Begin $rc_base/init.d/sendsignals - Sendsignals Script
4 # Based on sendsignals script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
7 . /etc/sysconfig/rc
8 . $rc_functions
10 case "$1" in
11 stop)
12 echo "Sending all processes the TERM signal..."
13 killall5 -15
14 error_value=$?
16 sleep $KILLDELAY
18 if [ "$error_value" = 0 ]
19 then
20 print_status success
21 else
22 print_status failure
25 echo "Sending all processes the KILL signal..."
26 killall5 -9
27 error_value=$?
29 sleep $KILLDELAY
31 if [ "$error_value" = 0 ]
32 then
33 print_status success
34 else
35 print_status failure
40 echo "Usage: $0 {stop}"
41 exit 1
44 esac
46 # End $rc_base/init.d/sendsignals