### /etc/init/shutdown.conf start on runlevel [06] task console output script if [ $RUNLEVEL -eq 0 ] ; then /etc/scripts/do-shutdown halt elif [ $RUNLEVEL -eq 6 ] ; then /etc/scripts/do-shutdown reboot else echo "Shutdown: unknown runlevel" fi end script