summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-11-12 15:12:18 +0100
committerHarald Hoyer <harald@redhat.com>2009-11-12 15:12:18 +0100
commit978d78f7b24ab2945fb8afcd7779d18ed8044be4 (patch)
tree2d7a023ca704132c957793a0c9218cb77a4415fc
parent03d8ec26017effea8afd111f1ef5dc2c25142b74 (diff)
add module 90multipath
-rwxr-xr-xmodules.d/90multipath/install14
-rwxr-xr-xmodules.d/90multipath/installkernel1
-rwxr-xr-xmodules.d/90multipath/multipathd-stop.sh12
-rwxr-xr-xmodules.d/90multipath/multipathd.sh6
4 files changed, 33 insertions, 0 deletions
diff --git a/modules.d/90multipath/install b/modules.d/90multipath/install
new file mode 100755
index 0000000..d060991
--- /dev/null
+++ b/modules.d/90multipath/install
@@ -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
index 0000000..dc86b16
--- /dev/null
+++ b/modules.d/90multipath/installkernel
@@ -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
index 0000000..9244aa3
--- /dev/null
+++ b/modules.d/90multipath/multipathd-stop.sh
@@ -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
index 0000000..5dd8a4e
--- /dev/null
+++ b/modules.d/90multipath/multipathd.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -e /etc/multipath.conf ]; then
+ multipathd
+fi
+