summaryrefslogtreecommitdiffstats
path: root/abs/core/poweroff-scripts/halt.script
blob: cfc05aaebd241a93c04c9802b44abfe4618a0553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
. /etc/profile
INIT=`ps -p 1 -o comm=`
if [ x$1 = x-w ]
then
	/sbin/halt.init -w
	exit 0
fi
chvt 1
if [ x$INIT = xrunit ]
then
 	 /sbin/halt-runit $@
else
     	/sbin/halt.init $@
fi