rc.shutdown revision 1.1
1# $NetBSD: rc.shutdown,v 1.1 1998/10/29 20:24:57 bad Exp $ 2 3# System shutdown script run by shutdown before halting/rebooting 4# or going single-user. 5 6stty status '^T' 7 8export HOME=/ 9export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin 10 11if [ -f /etc/rc.subr ]; then 12 . /etc/rc.subr 13else 14 echo "Can't read /etc/rc.subr; aborting." 15 exit 1; 16fi 17 18if [ -f /etc/rc.conf ]; then 19 . /etc/rc.conf 20fi 21 22if checkyesno do_rcshutdown; then 23 : # Everything's hunkdory 24else 25 echo "Skipping shutdown hooks." 26 exit 0 27fi 28 29if [ -f /etc/rc.shutdown.local ]; then 30 . /etc/rc.shutdown.local 31fi 32 33# Kill xdm and wait for it to terminate. 34if checkyesno xdm; then 35 XDM_PID=`sed 1q /var/run/xdm-pid` 36 if [ -n "$XDM_PID" ]; then 37 echo -n ' xdm' 38 kill $XDM_PID 39 while kill -0 $XDM_PID; do 40 sleep 1 41 done 42 fi 43fi 44 45exit 0 46