mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
feat: Check filesystem during installation
This commit is contained in:
parent
e2a4ab7515
commit
c2dc0cd3b6
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user