mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
main/multipath-tools: fix device node creation at boot. Add openrc weak depends on lvm and iscsid
(cherry picked from commit 65c253c0e11fbc622212b83fca2e0eae4702ac75)
This commit is contained in:
parent
c5232b17ef
commit
00c8e05743
@ -2,7 +2,7 @@
|
||||
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
|
||||
pkgname="multipath-tools"
|
||||
pkgver=0.4.9
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Device Mapper Multipathing Driver"
|
||||
url="http://christophe.varoqui.free.fr/"
|
||||
license="GPL"
|
||||
@ -38,6 +38,7 @@ package() {
|
||||
cd $_builddir
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -D -m644 ../$pkgname.conf $pkgdir/etc/multipath.conf
|
||||
install -D -m644 ../$pkgname.confd $pkgdir/etc/conf.d/multipathd
|
||||
install -D -m755 ../$pkgname.initd $pkgdir/etc/init.d/multipathd
|
||||
}
|
||||
|
||||
|
||||
2
main/multipath-tools/multipath-tools.confd
Normal file
2
main/multipath-tools/multipath-tools.confd
Normal file
@ -0,0 +1,2 @@
|
||||
rc_before="lvm"
|
||||
rc_after="iscsid"
|
||||
@ -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 $?
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user