Skip to content

Commit

Permalink
Some extra script hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Oct 1, 2015
1 parent 410bd53 commit b089768
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deboostrap.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion main.sh
Expand Up @@ -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
Expand Down

0 comments on commit b089768

Please sign in to comment.