Skip to content

Commit

Permalink
fix: Fix issue #281
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed Jul 3, 2023
1 parent 15d6720 commit f3f9a9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion run/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
(( SYSTEM_SIZE > SPACE )) && error "Not enough free space to create a 4 GB system disk." && exit 87

if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
if ! truncate -s "${SYSTEM_SIZE}" "${SYSTEM}"; then
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
fi
fi

if [[ "${ALLOCATE}" == [Zz]* ]]; then
Expand Down

0 comments on commit f3f9a9f

Please sign in to comment.