From: Michael Prokop Date: Tue, 23 Jun 2020 10:43:08 +0000 (+0200) Subject: lvm: start lvm2-lvmetad only if present + support lvm2-lvmpolld X-Git-Tag: v0.19.1~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=86279cdec69f44dce191edb0fa9a056cf65d1e24 lvm: start lvm2-lvmetad only if present + support lvm2-lvmpolld 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: grml/grml-autoconfig#10 --- diff --git a/autoconfig.functions b/autoconfig.functions index 558472b..883231b 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -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