change regex to test for one or more numbers, not 0 or more numbers.

This commit is contained in:
Promofaux 2016-02-20 15:17:57 +00:00
parent 8687d25d88
commit b14b182084

View file

@ -121,7 +121,7 @@ verifyFreeDiskSpace() {
requiredFreeBytes=25600
existingFreeBytes=`df -lk / 2>&1 | awk '{print $4}' | head -2 | tail -1`
if ! [[ "$existingFreeBytes" =~ ^([0-9])*$ ]]; then
if ! [[ "$existingFreeBytes" =~ ^([0-9])+$ ]]; then
existingFreeBytes=`df -lk /dev 2>&1 | awk '{print $4}' | head -2 | tail -1`
fi