Blob Blame History Raw
From 8a240aca9e295eff3941d53d8d107b44859323b7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 25 Jul 2012 13:00:08 +0200
Subject: [PATCH] require kpartx and partx for some modules

---
 dracut.spec                           |  1 +
 modules.d/90dmraid/module-setup.sh    |  3 ++-
 modules.d/90mdraid/module-setup.sh    |  4 ++--
 modules.d/90multipath/module-setup.sh | 15 ++++++++-------
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/dracut.spec b/dracut.spec
index 9a93e57..0d4062f 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -81,6 +81,7 @@ Requires: gzip xz
 Requires: module-init-tools >= 3.7-9
 Requires: sed
 Requires: file
+Requires: kpartx
 Requires: udev > 166
 %if 0%{?fedora} || 0%{?rhel} > 6
 Requires: util-linux >= 2.21
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
index dad54a4..10c732c 100755
--- a/modules.d/90dmraid/module-setup.sh
+++ b/modules.d/90dmraid/module-setup.sh
@@ -51,7 +51,8 @@ depends() {
 
 install() {
     local _i
-    dracut_install dmraid partx kpartx
+    dracut_install dmraid
+    dracut_install -o partx kpartx
 
     inst "$moddir/dmraid.sh" /sbin/dmraid_scan
 
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index 7b6f0a9..7b3c759 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -43,8 +43,8 @@ installkernel() {
 }
 
 install() {
-    dracut_install mdadm partx cat
-    dracut_install -o mdmon
+    dracut_install mdadm cat
+    dracut_install -o mdmon partx
 
      # XXX: mdmon really needs to run as non-root?
      #      If so, write only the user it needs in the initrd's /etc/passwd (and maybe /etc/group)
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index 5944d25..b14f829 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -70,13 +70,14 @@ installkernel() {
 install() {
     local _f
     dracut_install -o  \
-        /sbin/dmsetup \
-        /sbin/kpartx \
-        /sbin/mpath_wait \
-        /sbin/multipath  \
-        /sbin/multipathd \
-        /sbin/xdrgetuid \
-        /sbin/xdrgetprio \
+        dmsetup \
+        kpartx \
+        partx \
+        mpath_wait \
+        multipath  \
+        multipathd \
+        xdrgetuid \
+        xdrgetprio \
         /etc/xdrdevices.conf \
         /etc/multipath.conf \
         /etc/multipath/*