diff options
author | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2011-08-10 12:45:57 +0200 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2011-08-10 12:45:57 +0200 |
commit | f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2 (patch) | |
tree | 8edd5274af5a191379938e69749596b347f2604b | |
parent | Added GPG support. (diff) | |
download | genkernel-f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2.tar.gz genkernel-f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2.tar.bz2 genkernel-f1146f8e6fb34efa6b3d375c926bfa3ce43c88f2.zip |
--mdadmconf and MDRAID_CONFIG to include or not /etc/mdadm.conf
-rwxr-xr-x | gen_cmdline.sh | 4 | ||||
-rwxr-xr-x | gen_determineargs.sh | 2 | ||||
-rwxr-xr-x | gen_dracut.sh | 10 |
3 files changed, 16 insertions, 0 deletions
diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 9abab0b6..922cc73f 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 37c18476..502bd36c 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 22cea3d2..858426e6 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} |