Skip to content

Commit

Permalink
lvm: start lvm2-lvmetad only if present + support lvm2-lvmpolld
Browse files Browse the repository at this point in the history
lvm2-lvmetad is gone since 2.03.01-1 (and its init script
was actually dropped later in 2.03.02-2).

Instead lvmpolld is available since 2.02.122-1.

While at it improve formatting, as startup of lvm2-lvmpolld (and
lvm2-lvmetad if present) displays a message on initial startup which
gets in between the "Searching for logical volumes and enabling them:"
and the display of present LVM devices, which isn't nice. So properly
split them.

Closes: #10
  • Loading branch information
mika committed Jun 23, 2020
1 parent 7d9bfa7 commit 86279cd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions autoconfig.functions
Expand Up @@ -1713,12 +1713,18 @@ config_lvm(){
fi
eend 0
if checkbootparam 'lvm' ; then
einfo "Bootoption LVM found. Searching for logical volumes and enabling them:"
if $SYSTEMD ; then
service_wrapper lvm2-lvmetad start
vgchange -ay
eend $?
einfo "Bootoption LVM found, enabling related services."
if [ -r /etc/init.d/lvm2-lvmetad ] ; then
service_wrapper lvm2-lvmetad start ; eend $?
fi
if [ -r /etc/init.d/lvm2-lvmpolld ] ; then
service_wrapper lvm2-lvmpolld start ; eend $?
fi
einfo "Searching for logical volumes and enabling them:"
vgchange -ay ; eend $?
else
einfo "Bootoption LVM found. Searching for logical volumes and enabling them:"
service_wrapper lvm2 start ; eend $?
fi
fi
Expand Down

0 comments on commit 86279cd

Please sign in to comment.