#!/bin/sh echo "Shutting down..." # stop pcmcia ifconfig eth0 down cardctl eject # switch screen on tosh_lcd -1 # if Mandrake is mounted ... umount -a # sleep 3 echo "Sending all processes the TERM signal..." /sbin/killall5 -15 sleep 3 echo "Sending all processes the KILL signal..." /sbin/killall5 -9 sleep 3 echo "Turning off swap" swapoff -a echo "Unmounting /proc" umount /proc echo "Unmounting root" mount -n -o remount,ro / echo -ne \\a >/dev/console if [ "$1" = "halt" ]; then halt -i -d -p else reboot -i -d fi