diff --git a/blockcheck.sh b/blockcheck.sh index e2f7801..082abcf 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -996,10 +996,10 @@ sigpipe() exit 1 } - +fix_sbin_path check_system -check_prerequisites require_root +check_prerequisites check_dns ask_params diff --git a/common/base.sh b/common/base.sh index 557de90..bba133a 100644 --- a/common/base.sh +++ b/common/base.sh @@ -174,3 +174,11 @@ call_for_multiple_items() done eval $2=\"$items\" } + +fix_sbin_path() +{ + local IFS=':' + printf "%s\n" $PATH | grep -Fxq '/usr/sbin' || PATH="/usr/sbin:$PATH" + printf "%s\n" $PATH | grep -Fxq '/sbin' || PATH="/sbin:$PATH" + export PATH +} diff --git a/install_easy.sh b/install_easy.sh index 7c6d79a..8fa9fc9 100755 --- a/install_easy.sh +++ b/install_easy.sh @@ -979,6 +979,7 @@ install_macos() # build binaries, do not use precompiled [ "$1" = "make" ] && FORCE_BUILD=1 +fix_sbin_path check_system [ "$SYSTEM" = "macos" ] && . "$EXEDIR/init.d/macos/functions" diff --git a/uninstall_easy.sh b/uninstall_easy.sh index 40e61a0..94f0e3b 100755 --- a/uninstall_easy.sh +++ b/uninstall_easy.sh @@ -73,6 +73,7 @@ remove_macos() } +fix_sbin_path check_system require_root