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
This commit is contained in:
Carlo Landmeter 2019-10-14 13:30:42 +00:00
parent 66a10915ac
commit fdae24b899
5 changed files with 41 additions and 51 deletions

View File

@ -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"

View File

@ -1,2 +0,0 @@
rc_before="lvm"
rc_after="iscsid"

View File

@ -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 $?
}

View File

@ -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 $?
}

View File

@ -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