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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user