]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add module 90multipath
authorHarald Hoyer <harald@redhat.com>
Thu, 12 Nov 2009 14:12:18 +0000 (15:12 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 12 Nov 2009 14:12:18 +0000 (15:12 +0100)
modules.d/90multipath/install [new file with mode: 0755]
modules.d/90multipath/installkernel [new file with mode: 0755]
modules.d/90multipath/multipathd-stop.sh [new file with mode: 0755]
modules.d/90multipath/multipathd.sh [new file with mode: 0755]

diff --git a/modules.d/90multipath/install b/modules.d/90multipath/install
new file mode 100755 (executable)
index 0000000..d060991
--- /dev/null
@@ -0,0 +1,14 @@
+if [[ $hostonly ]]; then
+    inst /etc/multipath.conf
+fi
+
+for f in  \
+    /sbin/multipath  \
+    /sbin/multipathd \
+    /lib/libmultipath*  \
+    /lib/multipath/* ;do 
+    inst $f
+done
+
+inst_hook pre-trigger 02 "$moddir/multipathd.sh"
+inst_hook pre-pivot   02 "$moddir/multipathd-stop.sh"
diff --git a/modules.d/90multipath/installkernel b/modules.d/90multipath/installkernel
new file mode 100755 (executable)
index 0000000..dc86b16
--- /dev/null
@@ -0,0 +1 @@
+instmods dm-multipath dm-round-robin
diff --git a/modules.d/90multipath/multipathd-stop.sh b/modules.d/90multipath/multipathd-stop.sh
new file mode 100755 (executable)
index 0000000..9244aa3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -e /etc/multipath.conf ]; then
+    HARD=""
+    while pidof multipathd >/dev/null 2>&1; do 
+        for pid in $(pidof multipathd); do
+            kill $HARD $pid >/dev/null 2>&1
+        done
+        HARD="-9"
+    done
+fi
+
diff --git a/modules.d/90multipath/multipathd.sh b/modules.d/90multipath/multipathd.sh
new file mode 100755 (executable)
index 0000000..5dd8a4e
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -e /etc/multipath.conf ]; then
+       multipathd
+fi
+