From 800d2f0859eaa70d8a72607392c3d8c13706472c Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sat, 20 Feb 2016 16:17:29 +0000 Subject: [PATCH] Add back in whiptail dialog to verifyFreeDiskSpace() --- automated install/basic-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 75f32116..c20447c2 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -125,7 +125,8 @@ verifyFreeDiskSpace() { existingFreeBytes=`df -lk /dev 2>&1 | awk '{print $4}' | head -2 | tail -1` fi - if [[ $existingFreeBytes -lt $requiredFreeBytes ]]; then + 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 echo "$existingFreeBytes is less than $requiredFreeBytes" echo "Insufficient free space, exiting..." exit 1