void-packages/templates/lvm2/files/lvm2.rc
Juan RP 64aea1c5b8 lvm2: update to 2.02.53, convert to subpkgs.
Add initramfs hook and the OpenRC service, seems to work fine so far.

--HG--
extra : convert_revision : bfedf452f27339d9e37ffb251800431a17dbef9b
2009-10-03 10:58:22 +02:00

27 lines
417 B
Text

#!/sbin/runscript
#
# OpenRC service for LVM.
name="LVM service"
depend()
{
need devfs
before checkfs fsck
}
start()
{
ebegin "Activating LVM volumes"
modprobe -q dm-mod 2>/dev/null
lvm vgscan --ignorelockingfailure --mknodes && \
lvm vgchange --ignorelockingfailure -a y >/dev/null
eend $?
}
stop()
{
ebegin "Deactivating LVM volumes"
lvm vgchange --ignorelockingfailure -an 2>&1 >/dev/null
eend $?
}