mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-23 06:42:34 +00:00
fix elevation issues and absence of /sbin in the PATH
This commit is contained in:
parent
479ba87fc5
commit
f16e72974c
@ -996,10 +996,10 @@ sigpipe()
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
fix_sbin_path
|
||||
check_system
|
||||
check_prerequisites
|
||||
require_root
|
||||
check_prerequisites
|
||||
check_dns
|
||||
ask_params
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -73,6 +73,7 @@ remove_macos()
|
||||
}
|
||||
|
||||
|
||||
fix_sbin_path
|
||||
check_system
|
||||
require_root
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user