From: Harald Hoyer Date: Thu, 12 Nov 2009 14:12:18 +0000 (+0100) Subject: add module 90multipath X-Git-Tag: 003~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=978d78f7b24ab2945fb8afcd7779d18ed8044be4;p=thirdparty%2Fdracut.git add module 90multipath --- diff --git a/modules.d/90multipath/install b/modules.d/90multipath/install new file mode 100755 index 000000000..d06099132 --- /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 000000000..dc86b1604 --- /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 000000000..9244aa310 --- /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 000000000..5dd8a4e25 --- /dev/null +++ b/modules.d/90multipath/multipathd.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -e /etc/multipath.conf ]; then + multipathd +fi +