From bbb958b7ed963a5ea86038f86d442faba1e1e4cb Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 29 Dec 2016 01:34:49 -0800 Subject: [PATCH] Detect RPF breaking kernel updates. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index cef7b7f0..09615430 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -734,12 +734,15 @@ notify_package_updates_available() { updatesToInstall=$(eval "${PKG_COUNT}") echo " done!" echo ":::" - if [[ ${updatesToInstall} -eq "0" ]]; then - echo "::: Your system is up to date! Continuing with Pi-hole installation..." - else - echo "::: There are ${updatesToInstall} updates available for your system!" - echo "::: We recommend you update your OS after installing Pi-Hole! " - echo ":::" + if [[ -d "/lib/modules/$(uname -r)" ]]; then + if [[ ${updatesToInstall} -eq "0" ]]; then + echo "::: Your system is up to date! Continuing with Pi-hole installation..." + else + echo "::: There are ${updatesToInstall} updates available for your system!" + echo "::: We recommend you update your OS after installing Pi-Hole! " + echo ":::" + fi + echo "::: Kernel update detected, please reboot your system and try again if your installation fails." fi }