2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-27 04:42:27 +00:00

Skip deactivating volume groups when lvm is absent

lvm is optional in the capture initramfs now, so installimage printed
'lvm: command not found' on every install of a capture taken from a host
without lvm2. Only run it when it is there.
This commit is contained in:
Markus Hilger
2026-11-03 17:18:46 +01:00
parent 48ff272c67
commit b2a40e1370
4 changed files with 4 additions and 4 deletions
@@ -29,7 +29,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then
sleep 1
done
fi
lvm vgchange -a n
if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs
udevadm control -e
chroot /sysroot /usr/lib/systemd/systemd-udevd --daemon
chroot /sysroot bash -c "source /etc/confluent/functions; run_remote_python image2disk.py"
@@ -36,7 +36,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then
sleep 1
done
fi
lvm vgchange -a n
if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs
udevadm control -e
if [ -f /sysroot/etc/lvm/devices/system.devices ]; then
rm /sysroot/etc/lvm/devices/system.devices
@@ -41,7 +41,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then
sleep 1
done
fi
lvm vgchange -a n
if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs
/sysroot/usr/sbin/wipefs -a /dev/$(cat /sysroot/tmp/installdisk)
udevadm control -e
if [ -f /sysroot/etc/lvm/devices/system.devices ]; then
@@ -31,7 +31,7 @@ if [ ! -f /sysroot/tmp/installdisk ]; then
sleep 1
done
fi
lvm vgchange -a n
if command -v lvm > /dev/null; then lvm vgchange -a n; fi # lvm is optional in the initramfs
udevadm control -e
if [ -f /sysroot/etc/lvm/devices/system.devices ]; then
rm /sysroot/etc/lvm/devices/system.devices