From 25b873cf7b6062e3b4175703a2f1ae202d596ab5 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 2 Jul 2020 23:19:30 +0200 Subject: [PATCH] Add default locations to PATH to assure that all basic commands are available Signed-off-by: MichaIng --- automated install/basic-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 28001831..36237c9c 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -21,6 +21,10 @@ # instead of continuing the installation with something broken set -e +# Set PATH to a usual default to assure that all basic commands are available. +# When using "su" an uncomplete PATH could be passed: https://github.com/pi-hole/pi-hole/issues/3209 +export PATH+=':/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' + ######## VARIABLES ######### # For better maintainability, we store as much information that can change in variables # This allows us to make a change in one place that can propagate to all instances of the variable