1 diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh
2 index dd7bda2..7bc944c 100755
3 --- a/modules.d/90mdraid/parse-md.sh
4 +++ b/modules.d/90mdraid/parse-md.sh
7 MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
9 -if ( ! [ -n "$MD_UUID" ] && ! getargbool 0 rd.auto ) || ! getargbool 1 rd.md -d -n rd_NO_MD; then
10 - info "rd.md=0: removing MD RAID activation"
11 - udevproperty rd_NO_MD=1
13 - # rewrite the md rules to only process the specified raid array
14 - if [ -n "$MD_UUID" ]; then
15 - for f in /etc/udev/rules.d/65-md-incremental*.rules; do
16 - [ -e "$f" ] || continue
18 - if [ "${line%%UUID CHECK}" != "$line" ]; then
19 - printf 'IMPORT{program}="/sbin/mdadm --examine --export $tempnode"\n'
20 - for uuid in $MD_UUID; do
21 - printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid
23 - printf 'GOTO="md_end"\n'
24 - printf 'LABEL="md_uuid_ok"\n'
28 - done < "${f}" > "${f}.new"
32 +# rewrite the md rules to only process the specified raid array
33 +if [ -n "$MD_UUID" ]; then
34 + for f in /etc/udev/rules.d/65-md-incremental*.rules; do
35 + [ -e "$f" ] || continue
37 + if [ "${line%%UUID CHECK}" != "$line" ]; then
38 + printf 'IMPORT{program}="/sbin/mdadm --examine --export $tempnode"\n'
39 + for uuid in $MD_UUID; do
40 + printf 'ENV{MD_UUID}=="%s", GOTO="md_uuid_ok"\n' $uuid
42 + printf 'GOTO="md_end"\n'
43 + printf 'LABEL="md_uuid_ok"\n'
47 + done < "${f}" > "${f}.new"
53 if [ -e /etc/mdadm.conf ] && getargbool 1 rd.md.conf -d -n rd_NO_MDADMCONF; then
54 udevproperty rd_MDADMCONF=1
55 rm -f -- $hookdir/pre-pivot/*mdraid-cleanup.sh