#!/bin/sh # # System herunterfahren . /etc/init.d/rc.functions export BOOTSTEPS=$STOPSTEPS export splash="silent" echo 0 > /var/spool/bootstep chvt 1 show_splash echo -e "\nSystem going down now."; check_status # Stop Scripte ausführen ( . /etc/profile /etc/init.d/rc.init stop ) if [ "0$LOG_LEVEL" -lt "2" ]; then rm -rf /mnt/system/var/log fi echo "Stopping all proceses" killall5 -SIGTERM sleep 1 killall5 -SIGKILL check_status mount | grep /var/spool/apm.mnt/ | cut -d " " -f 3 | while read addon; do echo "Removeing addon: ${addon##*/}" mount -o remount,del:$addon / || failed umount -D $addon || failed check_status done # Save number of downsteps update_setting STOPSTEPS $(( `cat /var/spool/bootstep` + 2 )) # alles unmounten echo "Syncing filesystems:"; sync; check_status echo "Unmounting filesystems:"; check_status umount -a -r 2>>/dev/stdlog eval $POWEROFF_LAST_CMD