summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Seewer <philippe.seewer@bfh.ch>2009-10-16 11:00:04 +0200
committerHarald Hoyer <harald@redhat.com>2009-10-27 16:02:56 +0100
commit41f8a4f14f96696b29debde70d9b510c59d5e509 (patch)
tree283b94468c80788ea28e34fa09bb617d8c795168
parent778d2ba28bd2a577860d9f451147a2e4f2c178da (diff)
Add dm_mod loader
Some kernel configurations might build base dm support as a module. Add module dm which ensures that dm_mod is there and loaded.
-rwxr-xr-xmodules.d/90dm/check4
-rw-r--r--modules.d/90dm/dm-pre-udev.sh1
-rwxr-xr-xmodules.d/90dm/install4
-rwxr-xr-xmodules.d/90dm/installkernel2
-rwxr-xr-xmodules.d/90dmraid/check3
-rwxr-xr-xmodules.d/90lvm/check3
6 files changed, 17 insertions, 0 deletions
diff --git a/modules.d/90dm/check b/modules.d/90dm/check
new file mode 100755
index 0000000..008f04f
--- /dev/null
+++ b/modules.d/90dm/check
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+exit 255
+
diff --git a/modules.d/90dm/dm-pre-udev.sh b/modules.d/90dm/dm-pre-udev.sh
new file mode 100644
index 0000000..67eeb1c
--- /dev/null
+++ b/modules.d/90dm/dm-pre-udev.sh
@@ -0,0 +1 @@
+modprobe dm_mod
diff --git a/modules.d/90dm/install b/modules.d/90dm/install
new file mode 100755
index 0000000..2ec0630
--- /dev/null
+++ b/modules.d/90dm/install
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh"
+
diff --git a/modules.d/90dm/installkernel b/modules.d/90dm/installkernel
new file mode 100755
index 0000000..f970827
--- /dev/null
+++ b/modules.d/90dm/installkernel
@@ -0,0 +1,2 @@
+#!/bin/bash
+instmods dm_mod
diff --git a/modules.d/90dmraid/check b/modules.d/90dmraid/check
index eacec60..147b7fa 100755
--- a/modules.d/90dmraid/check
+++ b/modules.d/90dmraid/check
@@ -1,5 +1,8 @@
#!/bin/bash
+# We depend on dm_mod being loaded
+[ "$1" = "-d" ] && echo dm
+
# if we don't have dmraid installed on the host system, no point
# in trying to support it in the initramfs.
which dmraid >/dev/null 2>&1 || exit 1
diff --git a/modules.d/90lvm/check b/modules.d/90lvm/check
index 25f24e2..20f21e8 100755
--- a/modules.d/90lvm/check
+++ b/modules.d/90lvm/check
@@ -1,5 +1,8 @@
#!/bin/bash
+# We depend on dm_mod being loaded
+[ "$1" = "-d" ] && echo dm
+
# No point trying to support lvm if the binaries are missing
which lvm >/dev/null 2>&1 || exit 1