summaryrefslogtreecommitdiff
path: root/export-image
diff options
context:
space:
mode:
authorbamartin125 <bamartin125@gmail.com>2023-08-17 10:24:47 -0500
committerGitHub <noreply@github.com>2023-08-17 16:24:47 +0100
commit446f3e34c8ceb33dfe7bd38578f1cd6b6afe19da (patch)
tree00174937b13f5b8197a3c46b4dc09d33f3f3e76b /export-image
parent01d24ef22778337ed04cf9d6444b1be57b6a1e1a (diff)
Adds call to mknod if loop dev does not exist after call to `losetup -f` (#483)
Diffstat (limited to 'export-image')
-rwxr-xr-xexport-image/prerun.sh2
1 files changed, 1 insertions, 1 deletions
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..."