1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

vdo: avoid using of valuesonly

To retain backward compatibility with some older version of lvm
avoid using --valuesonly option with lvmconfig.
This commit is contained in:
Zdenek Kabelac 2023-09-13 23:13:27 +02:00
parent 1885655e9a
commit f968833570

View File

@ -531,9 +531,9 @@ convert_non_lv_() {
dry snapshot_merge_ "$DEVICE" dry snapshot_merge_ "$DEVICE"
# For systems using devicesfile add 'merged' PV into system.devices. # For systems using devicesfile add 'merged' PV into system.devices.
if [ "$("$LVM" lvmconfig --valuesonly devices/use_devicesfile --typeconfig full)" = "1" ]; then # Bypassing use of --valuesonly to keep compatibility with older lvm.
dry "$LVM" lvmdevices --adddev "$DEVICE" local usedev=$("$LVM" lvmconfig --typeconfig full devices/use_devicesfile || true)
fi [ "${usedev#*=" = "1" ] && dry "$LVM" lvmdevices --adddev "$DEVICE"
# Restore auto activation for a VG # Restore auto activation for a VG
dry "$LVM" vgchange --setautoactivation y $VERB $FORCE "$VGNAME" dry "$LVM" vgchange --setautoactivation y $VERB $FORCE "$VGNAME"