#!/bin/bash
. /etc/profile
INIT=`ps -p 1 -o comm=`
chvt 1
if [ x$INIT = xrunit ]
then
 	 /sbin/reboot-runit $@
else
     	/sbin/reboot.init $@
fi