fix: add "overlay" type into 'TOTAL_DISK_RAW' to calculate space within docker environment

This commit is contained in:
hugmouse 2024-06-19 18:35:05 +02:00
commit 7dd8050c03
No known key found for this signature in database
GPG key ID: 45FDB5FAB7ECB522

View file

@ -316,7 +316,7 @@ else
fi
# total disk size is calculated by adding all partitions of the types listed below (after the -t flags)
if check_command "df"; then
TOTAL_DISK_RAW=$(df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap --total 2>/dev/null | grep total | awk '{ print $2 }')
TOTAL_DISK_RAW=$(df -t simfs -t ext2 -t ext3 -t ext4 -t btrfs -t xfs -t vfat -t ntfs -t swap -t overlay --total 2>/dev/null | grep total | awk '{ print $2 }')
TOTAL_DISK=$(format_size "$TOTAL_DISK_RAW")
echo -e "Disk : $TOTAL_DISK"
else