initscripts/etc/rc.d/init.d/sendsignals
2011-04-26 12:26:24 +02:00

36 lines
852 B
Bash
Executable File

#!/bin/sh
# sendsignals - Sendsignals Script
#
# Based on sendsignals script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans <gerard@linuxfromscratch.org>
# Support for 2.6.x kernels by Davide Madrisan <davide.madrisan@gmail.com>
. /etc/sysconfig/rc
. $rc_functions
case "${1}" in
stop)
echo -n "Sending all processes the TERM signal..."
killall5 -15
error_value=$?
[ "$error_value" = 0 ] && echo_success || echo_failure
sleep 2
echo -n "Sending all processes the KILL signal: "
killall5 -9
error_value=$?
[ "$error_value" = 0 ] && echo_success || echo_failure
sleep 2
#echo -n "Removing all unused modules: "
#modprobe -r
#error_value=$?
#echo
;;
*)
echo "Usage: ${0} {stop}"
exit 1
;;
esac