diff options
Diffstat (limited to 'main/multipath-tools')
-rw-r--r-- | main/multipath-tools/APKBUILD | 3 | ||||
-rw-r--r-- | main/multipath-tools/multipath-tools.confd | 2 | ||||
-rw-r--r-- | main/multipath-tools/multipath-tools.initd | 18 |
3 files changed, 21 insertions, 2 deletions
diff --git a/main/multipath-tools/APKBUILD b/main/multipath-tools/APKBUILD index d1b8f10f74..703aad3867 100644 --- a/main/multipath-tools/APKBUILD +++ b/main/multipath-tools/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leonardo Arena <rnalrd@gmail.com> pkgname="multipath-tools" pkgver=0.4.9 -pkgrel=3 +pkgrel=4 pkgdesc="Device Mapper Multipathing Driver" url="http://christophe.varoqui.free.fr/" arch="all" @@ -39,6 +39,7 @@ package() { cd $_builddir make DESTDIR="$pkgdir" install install -D -m644 ../$pkgname.conf $pkgdir/etc/multipath.conf + install -D -m644 ../$pkgname.confd $pkgdir/etc/conf.d/multipathd install -D -m755 ../$pkgname.initd $pkgdir/etc/init.d/multipathd } diff --git a/main/multipath-tools/multipath-tools.confd b/main/multipath-tools/multipath-tools.confd new file mode 100644 index 0000000000..979aa96e2d --- /dev/null +++ b/main/multipath-tools/multipath-tools.confd @@ -0,0 +1,2 @@ +rc_before="lvm" +rc_after="iscsid" diff --git a/main/multipath-tools/multipath-tools.initd b/main/multipath-tools/multipath-tools.initd index 931bc313d0..8c02b21dd5 100644 --- a/main/multipath-tools/multipath-tools.initd +++ b/main/multipath-tools/multipath-tools.initd @@ -7,14 +7,30 @@ depend() { after firewall } +do_nodes() { + for dev in $(ls /dev/mapper/mpath*) + do + kpartx -a $dev + done +} + +undo_nodes() { + for dev in $(ls /dev/mapper/mpath*) + do + kpartx -d $dev + done +} + start() { ebegin "Starting multipathd" start-stop-daemon --start --quiet --exec /sbin/multipathd + do_nodes() eend $? } stop() { ebegin "Stopping multipathd" - start-stop-daemon --stop --quiet --pidfile /var/run/multipathd.pid + undo_nodes() + start-stop-daemon --stop --quiet --retry --pidfile /var/run/multipathd.pid eend $? } |