public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:dracut commit in: /
Date: Wed, 10 Aug 2011 10:47:17 +0000 (UTC)	[thread overview]
Message-ID: <f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2.aidecoe@gentoo> (raw)

commit:     f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 10 10:45:57 2011 +0000
Commit:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Wed Aug 10 10:45:57 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=f1146f8e

--mdadmconf and MDRAID_CONFIG to include or not /etc/mdadm.conf

---
 gen_cmdline.sh       |    4 ++++
 gen_determineargs.sh |    2 ++
 gen_dracut.sh        |   10 ++++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 9abab0b..922cc73 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -467,6 +467,10 @@ parse_cmdline() {
 			CMD_MDRAID=1
 			print_info 2 "CMD_MDRAID: ${CMD_MDRAID}"
 			;;
+		--mdadmconf)
+			CMD_MDRAID_CONFIG=1
+			print_info 2 "CMD_MDRAID_CONFIG: ${CMD_MDRAID_CONFIG}"
+			;;
 		--multipath)
 			if [ ! -e /usr/include/libdevmapper.h ]
 			then

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 37c1847..502bd36 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -69,6 +69,7 @@ determine_real_args() {
 	print_info 4 "Resolving config file, command line, and arch default settings."
 
 	set_config_alias MDADM MDRAID
+	set_config_alias MDADM_CONFIG MDRAID_CONFIG
 	set_config_alias LUKS CRYPT
 	set_config_alias GPG CRYPT_GPG
 	set_config_alias SPLASH GENSPLASH
@@ -121,6 +122,7 @@ determine_real_args() {
 	set_config_with_override BOOL   GENERIC              CMD_GENERIC
 	set_config_with_override STRING DRACUT_DIR           CMD_DRACUT_DIR
 	set_config_with_override BOOL   MDRAID               CMD_MDRAID
+	set_config_with_override BOOL   MDRAID_CONFIG        CMD_MDRAID_CONFIG
 	set_config_with_override BOOL   CRYPT                CMD_CRYPT
 	set_config_with_override BOOL   CRYPT_GPG            CMD_CRYPT_GPG
 	set_config_with_override BOOL   PLYMOUTH             CMD_PLYMOUTH

diff --git a/gen_dracut.sh b/gen_dracut.sh
index 22cea3d..858426e 100755
--- a/gen_dracut.sh
+++ b/gen_dracut.sh
@@ -5,6 +5,10 @@ BASIC_MODULES=dash\ i18n\ kernel-modules\ resume\ rootfs-block\ terminfo
 BASIC_MODULES+=\ udev-rules\ base
 MODULES=lvm\ dmraid\ iscsi\ mdraid\ crypt\ crypt-gpg\ multipath\ plymouth\ gensplash
 
+strstr() {
+    [[ $1 =~ $2 ]]
+}
+
 dracut_modules() {
 	local a=() o=()
 
@@ -54,6 +58,12 @@ create_initramfs() {
 	opts+=" ${EXTRA_OPTIONS}"
 	opts+=" $(dracut_modules)"
 
+    if strstr "${opts}" " mdraid "
+    then
+        isTrue "${MDRAID_CONFIG}" && opts+=\ --mdadmconf || \
+            opts+=\ --nomdadmconf
+    fi
+
 	if isTrue "${GENSPLASH}"
 	then
 		export DRACUT_GENSPLASH_THEME=${GENSPLASH_THEME}



             reply	other threads:[~2011-08-10 10:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10 10:47 Amadeusz Żołnowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-06-25  8:35 [gentoo-commits] proj/genkernel:dracut commit in: / Amadeusz Żołnowski
2012-01-08 10:53 Amadeusz Żołnowski
2011-08-10 10:47 Amadeusz Żołnowski
2011-08-10 10:47 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski
2011-04-17 18:14 Amadeusz Żołnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2.aidecoe@gentoo \
    --to=aidecoe@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox