#!/bin/ash # System Shutdown Script # . /etc/rc.d/init.d/functions echo echo "System is going down for reboot or halt now." echo echo "Starting stop scripts." for i in /etc/rc.d/stop/*; do if [ -x $i ]; then $i stop fi done echo -n "Syncing hardware clock to system clock:" hwclock --systohc --utc check_status echo -n "Disabling swap space: " swapoff -a check_status echo -n "Syncing all filesystems: " sync check_status echo -n "Unmounting all filesystems: " umount -a -r