mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
core/lvm2: added missing init.d script
This commit is contained in:
parent
33234841f6
commit
f2cf05a313
@ -1,13 +1,15 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=lvm2
|
||||
pkgver=2.02.44
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Logical Volume Manager 2 utilities"
|
||||
url="http://sourceware.org/lvm2/"
|
||||
license="GPL"
|
||||
depends="uclibc readline"
|
||||
makedepends="readline-dev"
|
||||
source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz"
|
||||
source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz
|
||||
lvm.initd
|
||||
"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
|
||||
build () {
|
||||
@ -27,5 +29,7 @@ build () {
|
||||
make -j1 DESTDIR="$pkgdir" install || return 1
|
||||
|
||||
install -d "$pkgdir"/etc/lvm/archive "$pkgdir"/etc/lvm/backup
|
||||
install -Dm755 "$srcdir"/lvm.initd "$pkgdir"/etc/init.d/lvm
|
||||
}
|
||||
md5sums="4ed7b99903a6fc5165b7b0b8def42486 LVM2.2.02.44.tgz"
|
||||
md5sums="4ed7b99903a6fc5165b7b0b8def42486 LVM2.2.02.44.tgz
|
||||
e60d88f78eedb9c1252deb5b9b9b978b lvm.initd"
|
||||
|
||||
33
core/lvm2/lvm.initd
Normal file
33
core/lvm2/lvm.initd
Normal file
@ -0,0 +1,33 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
dm_in_proc() {
|
||||
local rc=0 i=
|
||||
for i in devices misc; do
|
||||
grep -qs 'device-mapper' /proc/$i
|
||||
rc=$(($rc + $?))
|
||||
done
|
||||
return $rc
|
||||
}
|
||||
|
||||
start() {
|
||||
local rc=0 msg=
|
||||
ebegin "Setting up the Logical Volume Manager"
|
||||
if [ -e /proc/modules ] && ! dm_in_proc; then
|
||||
modprobe dm-mod 2>/dev/null
|
||||
fi
|
||||
if [ -d /proc/lvm ] || dm_in_proc; then
|
||||
vgscan --mknodes --ignorelockingfailure >/dev/null 2>&1 &&\
|
||||
vgchange --ignorelockingfailure -a y >/dev/null 2>&1
|
||||
rc=$?
|
||||
else
|
||||
rc=1
|
||||
fi
|
||||
eend $rc
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Shutting down the Logical Volume Manager"
|
||||
vgchange --ignorelockingfailure -a n >/dev/null 2>&1
|
||||
eend $?
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user