aboutsummaryrefslogtreecommitdiffstats
path: root/main/multipath-tools/multipath.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/multipath-tools/multipath.initd')
-rw-r--r--main/multipath-tools/multipath.initd22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/multipath-tools/multipath.initd b/main/multipath-tools/multipath.initd
new file mode 100644
index 0000000000..93665b5b15
--- /dev/null
+++ b/main/multipath-tools/multipath.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+
+depend() {
+ before checkfs fsck multipathd iscsid lvm
+ after modules device-mapper
+}
+
+start() {
+ ebegin "Loading multipath modules"
+ modprobe -q dm_mod dm-multipath
+ eend $?
+
+ ebegin "Activating multipath devices"
+ multipath -v0 >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Deactivating multipath devices"
+ multipath -v0 -F >/dev/null
+ eend $?
+}