From 40f541bc31a23e49853f9536b809f4ab403d0baa Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Tue, 16 Feb 2016 23:00:48 +0000 Subject: [PATCH] update verifyFreeDiskSpace()... addresses #322. Will now check free space on the first file system output by 'df- lkP`, as opposed to `/` to make pi-hole more compatible with other distros. --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 514ac8e6..837c3179 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -120,7 +120,7 @@ verifyFreeDiskSpace() { # 25MB is the minimum space needed (20MB install + 5MB one day of logs.) requiredFreeBytes=25600 - existingFreeBytes=`df -lkP / | awk '{print $4}' | tail -1` + existingFreeBytes=`df -lkP | awk '{print $4}' | tail -1` if [[ $existingFreeBytes -lt $requiredFreeBytes ]]; then whiptail --msgbox --backtitle "Insufficient Disk Space" --title "Insufficient Disk Space" "\nYour system appears to be low on disk space. pi-hole recomends a minimum of $requiredFreeBytes Bytes.\nYou only have $existingFreeBytes Free.\n\nIf this is a new install you may need to expand your disk.\n\nTry running:\n 'sudo raspi-config'\nChoose the 'expand file system option'\n\nAfter rebooting, run this installation again.\n\ncurl -L install.pi-hole.net | bash\n" $r $c