From 978d78f7b24ab2945fb8afcd7779d18ed8044be4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Nov 2009 15:12:18 +0100 Subject: [PATCH] add module 90multipath --- modules.d/90multipath/install | 14 ++++++++++++++ modules.d/90multipath/installkernel | 1 + modules.d/90multipath/multipathd-stop.sh | 12 ++++++++++++ modules.d/90multipath/multipathd.sh | 6 ++++++ 4 files changed, 33 insertions(+) create mode 100755 modules.d/90multipath/install create mode 100755 modules.d/90multipath/installkernel create mode 100755 modules.d/90multipath/multipathd-stop.sh create mode 100755 modules.d/90multipath/multipathd.sh diff --git a/modules.d/90multipath/install b/modules.d/90multipath/install new file mode 100755 index 00000000..d0609913 --- /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 00000000..dc86b160 --- /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 00000000..9244aa31 --- /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 00000000..5dd8a4e2 --- /dev/null +++ b/modules.d/90multipath/multipathd.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -e /etc/multipath.conf ]; then + multipathd +fi +