PR#337 Exlude aufs and tmpfs from disk size calculation

This commit is contained in:
darealshinji
2016-05-05 03:51:00 +02:00
parent 2e470448f7
commit f77244b33e

View File

@@ -1158,7 +1158,7 @@ detectdisk () {
elif [[ "${distro}" == "Mac OS X" ]]; then
totaldisk=$(df -H / 2>/dev/null | tail -1)
else
totaldisk=$(df -h --total 2>/dev/null | tail -1)
totaldisk=$(df -h -x aufs -x tmpfs --total 2>/dev/null | tail -1)
fi
disktotal=$(awk '{print $2}' <<< "${totaldisk}")
diskused=$(awk '{print $3}' <<< "${totaldisk}")