Adds call to mknod if loop dev does not exist after call to losetup -f
(#483)
This commit is contained in:
@@ -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..."
|
||||
|
Reference in New Issue
Block a user