diff --git a/deboostrap.sh b/deboostrap.sh index 59f9750d6fd3..7b6b81feba81 100644 --- a/deboostrap.sh +++ b/deboostrap.sh @@ -52,6 +52,10 @@ done< <( dd if=/dev/zero of=$DEST/cache/tmprootfs.raw bs=1M count=$SDSIZE 2>&1 & # Find first available free device LOOP=$(losetup -f) +if [[ "$LOOP" != "/dev/loop0" && "$LOOP" != "/dev/loop1" ]]; then +display_alert "You run out of loop devices" "pleese reboot" "error" +fi + # Mount image as block device losetup $LOOP $DEST/cache/tmprootfs.raw sync diff --git a/main.sh b/main.sh index 889618863727..ecae4e6199e3 100644 --- a/main.sh +++ b/main.sh @@ -173,7 +173,7 @@ if [ "$SOURCE_COMPILE" != "yes" ]; then fi # needed if process failed in the middle -#umount_image +umount_image #-------------------------------------------------------------------------------------------------------------------------------- # The name of the job