#!/bin/bash

# Set the path.
PATH=/sbin:/bin

# See how we were called
case "$0" in
	*halt)
		command="halt"
		;;
	*poweroff)
		command="poweroff"
		;;
	*reboot)
		command="reboot"
		;;
	*)
		echo "call me as '*halt' or 'poweroff' or '*reboot'"
		exit 1
		;;
esac

# Kill all processes
/sbin/killall5 -15
sleep 3
/sbin/killall5 -9

# Finalize Unmount and Reboot/Halt in /root/etc/rc.d/init.d/halt

