28 lines
417 B
Plaintext
28 lines
417 B
Plaintext
#!/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 $?
|
|
}
|