summaryrefslogtreecommitdiffstats
path: root/abs/core/poweroff-scripts/halt.script
blob: 223d3e8f748b947203acad6da90994012fa671fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
MYTH_RUN_STATUS="1"
. /etc/profile
INIT=`ps -p 1 -o comm=`

#ignore -w option
if [ x$1 = x-w ]
then
    exit 0
fi

if [ x$INIT = xrunit ]
then
    shutdown -h
else
    systemctl poweroff $@
fi