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

if [ x$INIT = xrunit ]
then
    echo "System will shutdown NOW" |wall
    chvt 1
    runit-init 0

else
    systemctrl $@
fi