summaryrefslogtreecommitdiffstats
path: root/abs/core/poweroff-scripts/reboot.script
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/poweroff-scripts/reboot.script')
-rwxr-xr-xabs/core/poweroff-scripts/reboot.script13
1 files changed, 8 insertions, 5 deletions
diff --git a/abs/core/poweroff-scripts/reboot.script b/abs/core/poweroff-scripts/reboot.script
index de2651c..f1d4c3f 100755
--- a/abs/core/poweroff-scripts/reboot.script
+++ b/abs/core/poweroff-scripts/reboot.script
@@ -2,13 +2,16 @@
MYTH_RUN_STATUS="1"
. /etc/profile
INIT=`ps -p 1 -o comm=`
-chvt 1
+
+#ignore -d option
+if [ x$1 = x-d ]
+then
+ exit 0
+fi
+
if [ x$INIT = xrunit ]
then
- echo "System will reboot NOW" |wall
- chvt 1
- runit-init 6
+ shutdown -r
else
systemctl reboot $@
fi
-