#!/bin/sh # # $Id: rc.halt,v 1.4.2.2 2005/07/07 20:11:58 franck78 Exp $ # echo "Stopping the RED interface..." /etc/rc.d/rc.red stop 2>/dev/null /etc/rc.d/rc.red clear 2>/dev/null echo "Shutting down..." sleep 3 echo "Saving the clock" /sbin/hwclock --systohc echo "Sending all processes the TERM signal..." /sbin/killall5 -15 sleep 3 echo "Sending all processes the KILL signal..." /sbin/killall5 -9 sleep 3 if [ -e /etc/FLASH ]; then if [ -e /etc/rc.d/rc.flash.down ]; then echo "Compressing logs" . /etc/rc.d/rc.flash.down fi fi echo "Turning off swap" swapoff -a echo "Unmounting others" umount -n -a echo "Unmounting root" mount -n -o remount,ro / # Send nice shutdown beep now /usr/bin/beep -l 75 -f 3000 /usr/bin/beep -l 75 -f 2000 /usr/bin/beep -l 75 -f 1000 /usr/bin/beep -l 75 -f 500 if [ "$1" = "halt" ]; then halt -i -d -p else reboot -i -d fi