[vserver] [PATCH 3/4] Allow initstyle openrc for gentoo

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Thu 19 Apr 2012 - 15:51:08 BST
Message-Id: <1334847069-25792-3-git-send-email-ncopa@alpinelinux.org>

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>

---
 distrib/gentoo/initpost |    2 +-
 distrib/gentoo/initpre  |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/distrib/gentoo/initpost b/distrib/gentoo/initpost
index 662b29a..ac70204 100755
--- a/distrib/gentoo/initpost
+++ b/distrib/gentoo/initpost
@@ -60,7 +60,7 @@ $_CHROOT_SH testfile /lib/rc/bin/is_older_than && have_openrc=1
 initstyle=sysv
 test -e "$cfgdir"/apps/init/style && initstyle=$(<"$cfgdir"/apps/init/style)
 
-if test "$initstyle" == "gentoo"; then
+if test "$initstyle" == "gentoo" -o "$initstyle" == "openrc"; then
 	echo ">>> Installing special init-style magic ... "
 
 	# force /lib/rc/sh even if we don't have it in older stages
diff --git a/distrib/gentoo/initpre b/distrib/gentoo/initpre
index 4a66bf5..370bddb 100755
--- a/distrib/gentoo/initpre
+++ b/distrib/gentoo/initpre
@@ -57,9 +57,11 @@ test -e "$1"/apps/init/style && initstyle=$(<"$1"/apps/init/style)
 
 echo ">>> Checking init-style ... $initstyle"
 
-if test "$initstyle" != "gentoo" -a "$initstyle" != "plain"; then
-	echo "!!! The init-style you specified is not supported for Gentoo"
-	echo "!!! Please use one of: plain, gentoo"
-fi
+case "$initstyle" in
+	gentoo|plain|openrc);;
+	*)	echo "!!! The init-style you specified is not supported for Gentoo"
+		echo "!!! Please use one of: plain, gentoo or openrc"
+		;;
+esac
 
 echo -n ">>> Unpacking template ... "
-- 
1.7.10
Received on Thu Apr 19 15:52:36 2012
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 19 Apr 2012 - 15:52:36 BST by hypermail 2.1.8