mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-21 21:09:42 +00:00
disregard escalation tool variable if found as root
This commit is contained in:
parent
06453fabe9
commit
96f7fa6528
|
@ -84,7 +84,13 @@ checkAURHelper() {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEscalationTool() {
|
checkEscalationTool() {
|
||||||
## Check for escalation tools.
|
if [ "$(id -u)" = "0" ]; then
|
||||||
|
ESCALATION_TOOL="eval"
|
||||||
|
ESCALATION_TOOL_CHECKED=true
|
||||||
|
printf "%b\n" "${CYAN}Running as root, no escalation needed${RC}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$ESCALATION_TOOL_CHECKED" ]; then
|
if [ -z "$ESCALATION_TOOL_CHECKED" ]; then
|
||||||
ESCALATION_TOOLS='sudo doas'
|
ESCALATION_TOOLS='sudo doas'
|
||||||
for tool in ${ESCALATION_TOOLS}; do
|
for tool in ${ESCALATION_TOOLS}; do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user