diff options
Diffstat (limited to 'abs/core-testing/runit/halt.script')
-rwxr-xr-x | abs/core-testing/runit/halt.script | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/abs/core-testing/runit/halt.script b/abs/core-testing/runit/halt.script new file mode 100755 index 0000000..b49ed7c --- /dev/null +++ b/abs/core-testing/runit/halt.script @@ -0,0 +1,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 + |