#---------------------------------------------------------------------------- # /etc/rc0.d/rc500.killall - kill all Processes # # Creation: 12.05.2002 rr # Last Update: $Id$ #---------------------------------------------------------------------------- colecho "Sending TERM-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` case $name in *watchdog*|*cardmgr*|*halt*|*reboot*|*rc0|init|-sh) ;; *) kill $pr >>/dev/null 2>&1 ;; esac fi done sleep 5 colecho "Sending KILL-Signal to all Processes ..." gn >/dev/console for pr in /proc/[0-9]?* do pr=`basename $pr` if [ $pr != $$ ] then name=`cat /proc/$pr/cmdline 2>/dev/null` case $name in *watchdog*|*cardmgr*|*halt*|*reboot*|*rc0|init|-sh) ;; *) kill -9 $pr >>/dev/null 2>&1 ;; esac fi done