SourceForge.net Logo

B.11. /etc/rc.d/rc.shutdown

#!/bin/ash
# 
# GPL $Id: rc.shutdown,v 1.1.1.1 2005/02/28 18:22:49 cvonk Exp $
# system shutdown script

echo "`basename $0` running .."

if [ -c /dev/gpio-led2 ] ; then
    echo 1 > /dev/gpio-led2
fi

FAIL=0
for ii in /etc/rc3.d/K* ; do
    echo -n "Stopping ${ii#/etc/rc3.d/K??} .."
    if $ii stop 2>&1 >> /var/log/messages ; then
	echo ""
    else
	echo " [FAIL]"
	FAIL=1
    fi
done

return $FAIL
# 

Example B.11. /etc/rc.d/rc.shutdown