diff options
author | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
commit | 0af7d5bc204cd6b7d03f22aacf4072c5f526c0ee (patch) | |
tree | aa819c4140f8c34bd3814ae5894a8b6214fff914 /init.d/halt.in | |
parent | 895c4f41492199d6aee75bb6c5a935134d67c29e (diff) |
Add a new shutdown runlevel, Gentoo #224537.
Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
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 +} |