aboutsummaryrefslogtreecommitdiffstats
path: root/main/multipath-tools/multipath-tools.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/multipath-tools/multipath-tools.initd')
-rw-r--r--main/multipath-tools/multipath-tools.initd18
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 $?
}