From 8958a1abbcdf86f9c4f7b88dfeba0d4609f16a5f Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:41:58 -0400 Subject: [PATCH] Don't fail on initial blockdev stuff --- templates/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/install.sh b/templates/install.sh index 3b0cc7c..28823a1 100755 --- a/templates/install.sh +++ b/templates/install.sh @@ -604,14 +604,14 @@ fi echo -n "Unmounting potential partitions on target device... " for mount in $( mount | grep "${target_disk}" | awk '{ print $3 }' | sort -r ); do - umount -f ${mount} >&2 + umount -f ${mount} >&2 || true done echo "done." echo -n "Unmounting potential LVM logical volumes on target device... " for vg in $( pvscan | grep "${target_disk}" | awk '{ print $4 }' ); do for mount in $( mount | grep "/${vg}" | awk '{ print $3 }' | sort -r ); do - umount -f ${mount} >&2 + umount -f ${mount} >&2 || true done done echo "done." @@ -621,13 +621,13 @@ for vg in $( pvscan | grep "${target_disk}" | awk '{ print $4 }' ); do vgchange -an ${vg} >&2 || true sleep 1 vgchange -an ${vg} >&2 - yes | vgremove ${vg} + yes | vgremove -f ${vg} || true done echo "done." echo -n "Removing existing LVM physical volumes... " for pv in $( pvcscan | grep "${target_disk}" | awk '{ print $2 }' ); do - yes | pvremove ${pv} + yes | pvremove -f ${pv} || true done echo "done."