#---------------------------------------------------------------------------- # /etc/rc0.d/rc500.killall - kill all Processes # # Creation: 12.05.2002 rr # Last Update: $Id$ #---------------------------------------------------------------------------- # $1 = signal name send_signal() { colecho "Sending $1 signal to all processes ..." gn for pr in /proc/[0-9]?* do pr=`basename $pr` if [ $pr != $$ ] then name=`cat /proc/$pr/cmdline 2>/dev/null | tr '\000' ' ' | sed -e 's/ *$//'` case $name in *hwsuppd*|*watchdog*|*cardmgr*|*halt*|*reboot*|*rc0|init|-sh) ;; *) colecho " sending $1 signal to [$pr] $name" br kill -$1 $pr >>/dev/null 2>&1 ;; esac fi done } send_signal TERM sleep 5 send_signal KILL