summaryrefslogtreecommitdiffstats
path: root/modules.d/90dmraid/parse-dm.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:54:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:54:25 +0000
commit9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a (patch)
tree2efb72864cc69e174c9c5ee33efb88a5f1553b48 /modules.d/90dmraid/parse-dm.sh
parentInitial commit. (diff)
downloaddracut-9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a.tar.xz
dracut-9cb1c4df7b9ce1a9ad1312621b0f2b16a94fba3a.zip
Adding upstream version 060+5.upstream/060+5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xmodules.d/90dmraid/parse-dm.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules.d/90dmraid/parse-dm.sh b/modules.d/90dmraid/parse-dm.sh
new file mode 100755
index 0000000..d7a6b69
--- /dev/null
+++ b/modules.d/90dmraid/parse-dm.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# nodmraid for anaconda / rc.sysinit compatibility
+if ! getargbool 1 rd.dm -d -n rd_NO_DM || getarg "rd.dm=0" -d nodmraid; then
+ info "rd.dm=0: removing DM RAID activation"
+ udevproperty rd_NO_DM=1
+fi
+
+if ! command -v mdadm > /dev/null \
+ || ! getargbool 1 rd.md.imsm -d -n rd_NO_MDIMSM -n noiswmd \
+ || ! getargbool 1 rd.md -d -n rd_NO_MD; then
+ info "rd.md.imsm=0: no MD RAID for imsm/isw raids"
+ udevproperty rd_NO_MDIMSM=1
+fi
+
+if ! command -v mdadm > /dev/null \
+ || ! getargbool 1 rd.md.ddf -n rd_NO_MDDDF -n noddfmd \
+ || ! getargbool 1 rd.md -d -n rd_NO_MD; then
+ info "rd.md.ddf=0: no MD RAID for SNIA ddf raids"
+ udevproperty rd_NO_MDDDF=1
+fi
+
+DM_RAIDS=$(getargs rd.dm.uuid -d rd_DM_UUID=)
+
+if [ -z "$DM_RAIDS" ] && ! getargbool 0 rd.auto; then
+ udevproperty rd_NO_DM=1
+fi