aboutsummaryrefslogtreecommitdiffstats
path: root/main/multipath-tools
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2011-08-24 14:30:13 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2011-08-24 14:30:26 +0000
commit65c253c0e11fbc622212b83fca2e0eae4702ac75 (patch)
tree3c7642b8db6c9a916353f86c69b0e141ae36d5f0 /main/multipath-tools
parent9ccb0f4b974303e5d3b1fad1c4f220e9fe2bb885 (diff)
downloadaports-65c253c0e11fbc622212b83fca2e0eae4702ac75.tar.bz2
aports-65c253c0e11fbc622212b83fca2e0eae4702ac75.tar.xz
main/multipath-tools: fix device node creation at boot. Add openrc weak depends on lvm and iscsid
Diffstat (limited to 'main/multipath-tools')
-rw-r--r--main/multipath-tools/APKBUILD3
-rw-r--r--main/multipath-tools/multipath-tools.confd2
-rw-r--r--main/multipath-tools/multipath-tools.initd18
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 $?
}