summaryrefslogtreecommitdiffstats
path: root/modules.d/90dm/module-setup.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/90dm/module-setup.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 'modules.d/90dm/module-setup.sh')
-rwxr-xr-xmodules.d/90dm/module-setup.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh
new file mode 100755
index 0000000..0c4cba3
--- /dev/null
+++ b/modules.d/90dm/module-setup.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# called by dracut
+check() {
+ require_binaries dmsetup || return 1
+ return 255
+}
+
+# called by dracut
+depends() {
+ return 0
+}
+
+# called by dracut
+installkernel() {
+ instmods '=drivers/md' dm_mod dm-cache dm-cache-mq dm-cache-cleaner
+}
+
+# called by dracut
+install() {
+ modinfo -k "$kernel" dm_mod > /dev/null 2>&1 \
+ && inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh"
+
+ inst_multiple dmsetup
+
+ inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules
+ # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
+ # files, but provides the one below:
+ inst_rules 64-device-mapper.rules
+ # debian udev rules
+ inst_rules 60-persistent-storage-dm.rules 55-dm.rules
+
+ inst_rules "$moddir/11-dm.rules"
+
+ inst_rules "$moddir/59-persistent-storage-dm.rules"
+
+ inst_hook shutdown 25 "$moddir/dm-shutdown.sh"
+}