diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2011-08-24 14:30:13 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2011-08-24 14:30:26 +0000 |
commit | 65c253c0e11fbc622212b83fca2e0eae4702ac75 (patch) | |
tree | 3c7642b8db6c9a916353f86c69b0e141ae36d5f0 | |
parent | 9ccb0f4b974303e5d3b1fad1c4f220e9fe2bb885 (diff) | |
download | alpine_aports-65c253c0e11fbc622212b83fca2e0eae4702ac75.tar.bz2 alpine_aports-65c253c0e11fbc622212b83fca2e0eae4702ac75.tar.xz alpine_aports-65c253c0e11fbc622212b83fca2e0eae4702ac75.zip |
main/multipath-tools: fix device node creation at boot. Add openrc weak depends on lvm and iscsid
-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 @@ | |||
2 | # Maintainer: Leonardo Arena <rnalrd@gmail.com> | 2 | # Maintainer: Leonardo Arena <rnalrd@gmail.com> |
3 | pkgname="multipath-tools" | 3 | pkgname="multipath-tools" |
4 | pkgver=0.4.9 | 4 | pkgver=0.4.9 |
5 | pkgrel=3 | 5 | pkgrel=4 |
6 | pkgdesc="Device Mapper Multipathing Driver" | 6 | pkgdesc="Device Mapper Multipathing Driver" |
7 | url="http://christophe.varoqui.free.fr/" | 7 | url="http://christophe.varoqui.free.fr/" |
8 | arch="all" | 8 | arch="all" |
@@ -39,6 +39,7 @@ package() { | |||
39 | cd $_builddir | 39 | cd $_builddir |
40 | make DESTDIR="$pkgdir" install | 40 | make DESTDIR="$pkgdir" install |
41 | install -D -m644 ../$pkgname.conf $pkgdir/etc/multipath.conf | 41 | install -D -m644 ../$pkgname.conf $pkgdir/etc/multipath.conf |
42 | install -D -m644 ../$pkgname.confd $pkgdir/etc/conf.d/multipathd | ||
42 | install -D -m755 ../$pkgname.initd $pkgdir/etc/init.d/multipathd | 43 | install -D -m755 ../$pkgname.initd $pkgdir/etc/init.d/multipathd |
43 | } | 44 | } |
44 | 45 | ||
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 @@ | |||
1 | rc_before="lvm" | ||
2 | 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() { | |||
7 | after firewall | 7 | after firewall |
8 | } | 8 | } |
9 | 9 | ||
10 | do_nodes() { | ||
11 | for dev in $(ls /dev/mapper/mpath*) | ||
12 | do | ||
13 | kpartx -a $dev | ||
14 | done | ||
15 | } | ||
16 | |||
17 | undo_nodes() { | ||
18 | for dev in $(ls /dev/mapper/mpath*) | ||
19 | do | ||
20 | kpartx -d $dev | ||
21 | done | ||
22 | } | ||
23 | |||
10 | start() { | 24 | start() { |
11 | ebegin "Starting multipathd" | 25 | ebegin "Starting multipathd" |
12 | start-stop-daemon --start --quiet --exec /sbin/multipathd | 26 | start-stop-daemon --start --quiet --exec /sbin/multipathd |
27 | do_nodes() | ||
13 | eend $? | 28 | eend $? |
14 | } | 29 | } |
15 | 30 | ||
16 | stop() { | 31 | stop() { |
17 | ebegin "Stopping multipathd" | 32 | ebegin "Stopping multipathd" |
18 | start-stop-daemon --stop --quiet --pidfile /var/run/multipathd.pid | 33 | undo_nodes() |
34 | start-stop-daemon --stop --quiet --retry --pidfile /var/run/multipathd.pid | ||
19 | eend $? | 35 | eend $? |
20 | } | 36 | } |