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 /main/multipath-tools/multipath-tools.initd | |
parent | 9ccb0f4b974303e5d3b1fad1c4f220e9fe2bb885 (diff) | |
download | aports-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/multipath-tools.initd')
-rw-r--r-- | main/multipath-tools/multipath-tools.initd | 18 |
1 files changed, 17 insertions, 1 deletions
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 $? } |