aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2019-10-14 13:30:42 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-10-14 13:38:15 +0000
commitfdae24b899b8fd5dc4bfe33d4e994fda366542a5 (patch)
treed1eeae5f81e4a79980c1dad3f96dca475185d510
parent66a10915ac291387988a711bef0eb71d208d2e38 (diff)
downloadaports-fdae24b899b8fd5dc4bfe33d4e994fda366542a5.tar.bz2
aports-fdae24b899b8fd5dc4bfe33d4e994fda366542a5.tar.xz
main/multipath-tools: fix initd scripts
these are not split into two ports. 1. multipathd (multipath monitoring daemon) 2. mutlipath (initialized paths) multipathd is now using supervision
-rw-r--r--main/multipath-tools/APKBUILD24
-rw-r--r--main/multipath-tools/multipath-tools.confd2
-rw-r--r--main/multipath-tools/multipath-tools.initd37
-rw-r--r--main/multipath-tools/multipath.initd22
-rw-r--r--main/multipath-tools/multipathd.initd7
5 files changed, 41 insertions, 51 deletions
diff --git a/main/multipath-tools/APKBUILD b/main/multipath-tools/APKBUILD
index dd2c4fdcfe..49951b7f2d 100644
--- a/main/multipath-tools/APKBUILD
+++ b/main/multipath-tools/APKBUILD
@@ -1,19 +1,19 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=multipath-tools
pkgver=0.8.3
-pkgrel=2
+pkgrel=3
pkgdesc="Device Mapper Multipathing Driver"
url="http://christophe.varoqui.free.fr"
arch="all"
license="GPL-2.0-only"
-depends="eudev"
+depends="eudev device-mapper"
makedepends="lvm2-dev libaio-dev readline-dev ncurses-dev eudev-dev
userspace-rcu-dev json-c-dev perl"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://git.opensvc.com/gitweb.cgi?p=$pkgname/.git;a=snapshot;h=$pkgver;sf=tgz
multipath-tools.conf
- multipath-tools.confd
- multipath-tools.initd
+ multipath.initd
+ multipathd.initd
"
options="!check"
builddir="$srcdir/multipath-tools"
@@ -28,9 +28,6 @@ prepare() {
build() {
cd $builddir
- # fix location of udev rules
- export SYSTEMDPATH=lib
-
make prefix="/usr" \
sysconfdir="/etc" \
mandir="/usr/share/man" \
@@ -42,12 +39,15 @@ package() {
make DESTDIR="$pkgdir" install
- install -D -m644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/multipath.conf
- install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/multipathd
- install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/multipathd
+ install -D -m644 "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/multipath.conf
+ install -D -m755 "$srcdir"/multipathd.initd \
+ "$pkgdir"/etc/init.d/multipathd
+ install -D -m755 "$srcdir"/multipath.initd \
+ "$pkgdir"/etc/init.d/multipath
}
sha512sums="d9fdc2763f5a1efa15ee07c5d863008c9694623935f62a0e0b56f941df4e0d0ca3f86056fefc9b5ca828b47782127e3d55f2f925b1ed957e02b675bef36f4cae multipath-tools-0.8.3.tar.gz
e81462b22c0cbc92ea935d7544b9f9a0c4ccbcf13f3bc03dadf6de96407c9cf49964c9bbf02f12a134e1255c66421c6fde39d54b15eef975e8df81bdc88b2213 multipath-tools.conf
-303c62b7506b207ba2266310e7a701d76151e6f1544b44faf666dfabdc59c5aeb98544d380988e18b4a7b8235e4000380f025c4dd6c95d45a7b8b51bbf39dce5 multipath-tools.confd
-1ca0a8be7ddd0d57b810ab4905bc35d6b89b924ef528a7ee77dad162b86b990e0b86ef714f63857def4a61e30bfabe7a3980f624d63b80108408dd876a7c468c multipath-tools.initd"
+1eabdd222ae884750182e6e883c0b57168a1f311ce0802287207172d742cee98bd330bbfe523c9646c4661613c8ddbc5d055ad0779303a0dba85659bebcf5741 multipath.initd
+2f913fed199f12f048eb042b5bb1a326f6f09cfe63d572ac269461d96ebf25b251576de22be7ba9ab631ded7af6fd47dac38fda3b29d00640c806181eb37447c multipathd.initd"
diff --git a/main/multipath-tools/multipath-tools.confd b/main/multipath-tools/multipath-tools.confd
deleted file mode 100644
index 979aa96e2d..0000000000
--- a/main/multipath-tools/multipath-tools.confd
+++ /dev/null
@@ -1,2 +0,0 @@
-rc_before="lvm"
-rc_after="iscsid"
diff --git a/main/multipath-tools/multipath-tools.initd b/main/multipath-tools/multipath-tools.initd
deleted file mode 100644
index 14f28efccf..0000000000
--- a/main/multipath-tools/multipath-tools.initd
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/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 $?
-}
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 $?
+}
diff --git a/main/multipath-tools/multipathd.initd b/main/multipath-tools/multipathd.initd
new file mode 100644
index 0000000000..931ef46e8a
--- /dev/null
+++ b/main/multipath-tools/multipathd.initd
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+
+supervisor=supervise-daemon
+command=/sbin/multipathd
+command_args_foreground="-d"
+output_log=/var/log/${RC_SVCNAME}.log
+error_log=/var/log/${RC_SVCNAME}.log