From 446f3e34c8ceb33dfe7bd38578f1cd6b6afe19da Mon Sep 17 00:00:00 2001 From: bamartin125 Date: Thu, 17 Aug 2023 10:24:47 -0500 Subject: Adds call to mknod if loop dev does not exist after call to `losetup -f` (#483) --- export-image/prerun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'export-image') diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 2d8e1bb..267bbe0 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -35,7 +35,7 @@ if [ "${NO_PRERUN_QCOW2}" = "0" ]; then echo "Creating loop device..." cnt=0 - until LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do + until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_FILE")"; do if [ $cnt -lt 5 ]; then cnt=$((cnt + 1)) echo "Error in losetup. Retrying..." -- cgit v1.2.3