]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
multipath: simplify and install wwids (rhbz 595719)
authorHarald Hoyer <harald@redhat.com>
Wed, 26 May 2010 15:44:07 +0000 (17:44 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 May 2010 12:19:11 +0000 (14:19 +0200)
install /etc/multipath/wwids

With the proper 40-multipath.rules and new udev device-mapper mechanism,
we don't need the multipath scan anymore.

rhbz#595719

modules.d/90multipath/9-multipath-scan.rules [deleted file]
modules.d/90multipath/install
modules.d/90multipath/multipath-scan.sh [deleted file]
modules.d/90multipath/multipathd.sh

diff --git a/modules.d/90multipath/9-multipath-scan.rules b/modules.d/90multipath/9-multipath-scan.rules
deleted file mode 100644 (file)
index 99c2b7c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# scan for multipath devices
-SUBSYSTEM!="block", GOTO="end_mpath_scan"
-KERNEL!="sd*", GOTO="end_mpath_scan"
-PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", GOTO="end_mpath_scan"
-RUN+="/sbin/modprobe dm-multipath"
-RUN+="/bin/echo 'queuing multipath scan'"
-RUN+="/sbin/initqueue --settled --onetime --unique --name mpscan /sbin/multipath-scan"
-RUN+="/bin/sh -c '>/tmp/.multipath-scan-%k;'"
-LABEL="end_mpath_scan"
index 8b4d693f1c6291c5cf6cdcba49078e114c1054eb..ed2d698fad514a618c5c7d9e4c045290b1bdea80 100755 (executable)
@@ -1,9 +1,5 @@
 #!/bin/bash
 
-if [ -f /etc/multipath.conf ]; then
-    inst /etc/multipath.conf
-fi
-
 if ldd $(which multipath) 2>/dev/null |grep -q lib64; then
     LIBDIR="/lib64"
 else
@@ -19,6 +15,8 @@ for f in  \
     /sbin/xdrgetuid \
     /sbin/xdrgetprio \
     /etc/xdrdevices.conf \
+    /etc/multipath.conf \
+    /etc/multipath/wwids \
     $(ls $LIBDIR/libmultipath* $LIBDIR/multipath/* 2>/dev/null) \
        ;do
     [ -e "$f" ] && inst "$f"
@@ -28,5 +26,3 @@ inst_hook pre-trigger 02 "$moddir/multipathd.sh"
 inst_hook pre-pivot   02 "$moddir/multipathd-stop.sh"
 inst_rules 40-multipath.rules
 
-inst "$moddir/multipath-scan.sh" /sbin/multipath-scan
-inst_rules "$moddir/9-multipath-scan.rules"
diff --git a/modules.d/90multipath/multipath-scan.sh b/modules.d/90multipath/multipath-scan.sh
deleted file mode 100755 (executable)
index 0e1d3f2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# scan for multipaths if udev has settled
-
-. /lib/dracut-lib.sh
-
-[ -d /etc/multipath ] || mkdir -p /etc/multipath
-mpdevs=$(
-    for f in /tmp/.multipath-scan-* ; do
-        [ -e "$f" ] || continue
-        echo -n "${f##/tmp/.multipath-scan-} "
-    done
-)
-
-[ -e /etc/multipath.conf ] || exit 1
-multipath ${mpdevs}
index 5dd8a4e251306f56ac12c1a2241633057eeae0ee..851c08e5169fc5f1452db1b67a49b6b08d5cdfab 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 if [ -e /etc/multipath.conf ]; then
+        modprobe dm-multipath
        multipathd
 fi