Commit f3f9a9f4 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Fix issue #281

parent 15d67203
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -179,8 +179,10 @@ 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
  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
  info "Install: Preallocating 4 GB of diskspace..."