summaryrefslogtreecommitdiffstats
path: root/abs/core/runit/reboot.script
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit/reboot.script')
-rwxr-xr-xabs/core/runit/reboot.script11
1 files changed, 11 insertions, 0 deletions
diff --git a/abs/core/runit/reboot.script b/abs/core/runit/reboot.script
new file mode 100755
index 0000000..fcce679
--- /dev/null
+++ b/abs/core/runit/reboot.script
@@ -0,0 +1,11 @@
+#!/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
+