diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-05-19 15:48:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-05-19 15:48:38 +0000 |
commit | 2a87688010b283f11294cc8a5ae277cd3692c6e1 (patch) | |
tree | e9aad78f6f4909490907e7ee0c12ff43ce2fb256 /main/multipath-tools/multipath-tools.initd | |
parent | 7772819f568aba3c8f917c49d22272bdd4fa47d5 (diff) | |
download | aports-2a87688010b283f11294cc8a5ae277cd3692c6e1.tar.bz2 aports-2a87688010b283f11294cc8a5ae277cd3692c6e1.tar.xz |
main/multipath-tools: move back from community
we ship multipath-tools with alpine-xen iso image so we should have it
in main.
Diffstat (limited to 'main/multipath-tools/multipath-tools.initd')
-rw-r--r-- | main/multipath-tools/multipath-tools.initd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/main/multipath-tools/multipath-tools.initd b/main/multipath-tools/multipath-tools.initd new file mode 100644 index 0000000000..14f28efccf --- /dev/null +++ b/main/multipath-tools/multipath-tools.initd @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-fs/multipath-tools/files/rc-multipathd,v 1.5 2009/03/17 22:48:13 solar Exp $ + +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 --make-pidfile \ + --pidfile /var/run/multipathd.pid --exec /sbin/multipathd + do_nodes + eend $? +} + +stop() { + ebegin "Stopping multipathd" + undo_nodes + start-stop-daemon --stop --quiet --retry --pidfile /var/run/multipathd.pid + eend $? +} |