2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4 if ! getargbool
1 rd.md
-n rd_NO_MD
; then
5 info
"rd.md=0: removing MD RAID activation"
6 udevproperty rd_NO_MD
=1
8 MD_UUID
=$
(getargs rd.md.uuid rd_MD_UUID
=)
10 # rewrite the md rules to only process the specified raid array
11 if [ -n "$MD_UUID" ]; then
12 for f
in /etc
/udev
/rules.d
/65-md-incremental*.rules
; do
13 [ -e "$f" ] ||
continue
15 if [ "${line%%UUID CHECK}" != "$line" ]; then
16 for uuid
in $MD_UUID; do
17 printf 'ENV{MD_UUID}=="%s", GOTO="do_md_inc"\n' $uuid
19 printf 'GOTO="md_inc_end"\n';
23 done < "${f}" > "${f}.new"
30 if [ -e /etc
/mdadm.conf
] && getargbool
1 rd.md.conf
-n rd_NO_MDADMCONF
; then
31 udevproperty rd_MDADMCONF
=1
32 rm -f $hookdir/pre-pivot
/*mdraid-cleanup.sh
35 if ! getargbool
1 rd.md.conf
-n rd_NO_MDADMCONF
; then
36 rm -f /etc
/mdadm
/mdadm.conf
/etc
/mdadm.conf
39 # noiswmd nodmraid for anaconda / rc.sysinit compatibility
40 # note nodmraid really means nobiosraid, so we don't want MDIMSM then either
41 if ! getargbool
1 rd.md.imsm
-n rd_NO_MDIMSM || getarg noiswmd || getarg nodmraid
; then
42 info
"no MD RAID for imsm/isw raids"
43 udevproperty rd_NO_MDIMSM
=1