Removing old changelog entries, make files ready for lfs-4.0 release
[linux_from_scratch.git] / bootscripts / rc.d / init.d / sendsignals
blob07348729b0df2b709e26f64ad5082edcea3cebd8
1 #!/bin/bash
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 source /etc/sysconfig/rc
8 source $rc_functions
10 echo "Sending all processes the TERM signal..."
11 killall5 -15
12 error_value=$?
15 # Sleep for a while to allow processes to receive and process the TERM
16 # signal. The heavier your system is loaded, the higher it should sleep
17 # here.
20 sleep 3
22 if [ "$error_value" = 0 ]
23 then
24 print_status success
25 else
26 print_status failure
29 echo "Sending all processes the KILL signal..."
30 killall5 -9
31 error_value=$?
34 # Increase sleep amount on heavier loaded systems.
37 sleep 3
39 if [ "$error_value" = 0 ]
40 then
41 print_status success
42 else
43 print_status failure
47 # End $rc_base/init.d/sendsignals