diff options
Diffstat (limited to 'init.d/halt.in')
-rw-r--r-- | init.d/halt.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/init.d/halt.in b/init.d/halt.in new file mode 100644 index 00000000..b8f9ed90 --- /dev/null +++ b/init.d/halt.in @@ -0,0 +1,23 @@ +#!@PREFIX@/sbin/runscript +# Copyright 2007-2008 Roy Marples <roy@marples.name> +# All rights reserved. Released under the 2-clause BSD license. + +# This script really belongs with the Linux sysvinit package + +depend() +{ + after * + use romount +} + +start() +{ + case "${RUNLEVEL}" in + 0) runlevel=shutdown;; + 6) runlevel=reboot;; + *) eerror "Unknown runlevel ${RUNLEVEL}"; return 1 + esac + + . /etc/init.d/"${runlevel}".sh + return 0 +} |