Skip to content

Commit

Permalink
fix elevation issues and absence of /sbin in the PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
bol-van committed Mar 27, 2022
1 parent 479ba87 commit f16e729
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -996,10 +996,10 @@ sigpipe()
exit 1
}


fix_sbin_path
check_system
check_prerequisites
require_root
check_prerequisites
check_dns
ask_params

Expand Down
8 changes: 8 additions & 0 deletions common/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions install_easy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions uninstall_easy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ remove_macos()
}


fix_sbin_path
check_system
require_root

Expand Down

0 comments on commit f16e729

Please sign in to comment.