feat: Check filesystem during installation

This commit is contained in:
Kroese 2023-10-05 16:49:00 +02:00 committed by GitHub
parent e2a4ab7515
commit c2dc0cd3b6

View File

@ -39,15 +39,14 @@ else
TMP="/tmp/dsm" TMP="/tmp/dsm"
fi fi
RDC="$STORAGE/dsm.rd"
rm -rf "$TMP" && mkdir -p "$TMP"
# Check free diskspace # Check free diskspace
MIN_SPACE=5842450944 MIN_SPACE=5842450944
SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1) SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
(( MIN_SPACE > SPACE )) && error "Not enough free space for installation." && exit 95 (( MIN_SPACE > SPACE )) && error "Not enough free space for installation." && exit 95
RDC="$STORAGE/dsm.rd"
rm -rf "$TMP" && mkdir -p "$TMP"
[[ "${DEBUG}" == [Yy1]* ]] && set -x [[ "${DEBUG}" == [Yy1]* ]] && set -x
if [ ! -f "${RDC}" ]; then if [ ! -f "${RDC}" ]; then