commit:     84d140a1f6abf95a4170d13527152d3ab14e6613
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Wed Jun  7 15:59:42 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 15:59:42 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=84d140a1

scripts/shutdown: pass --single to openrc-shutdown

Sysvinit shutdown has a default of single user mode, but openrc-shutdown
makes you choose a default action. Because of this, the shutdown wrapper
needs to pass --single to openrc-shutdown.

 scripts/shutdown.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/shutdown.in b/scripts/shutdown.in
index 6bb65260..4f6ba637 100644
--- a/scripts/shutdown.in
+++ b/scripts/shutdown.in
@@ -1,3 +1,8 @@
 #!@SHELL@
 
-exec @SBINDIR@/openrc-shutdown "$@"
+args="$@"
+case "$@" in
+       *--single*|*-s*) args="$@" ;;
+       *) args="--single $@";;
+esac
+exec @SBINDIR@/openrc-shutdown "$args"

Reply via email to