diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-04-05 23:26:07 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2021-04-07 14:41:54 +0200 |
commit | 2535611d6c3cbf951408c50ab35953efaf32f686 (patch) | |
tree | ced97b08051b9d646f10105c81fa58933ec82eb6 /scripts/libmakepkg/executable/sudo.sh.in | |
parent | d6f86594434729b77e9131880738290140086d40 (diff) | |
download | pacman-2535611d6c3cbf951408c50ab35953efaf32f686.tar.gz pacman-2535611d6c3cbf951408c50ab35953efaf32f686.tar.xz |
makepkg: add PACMAN_AUTH configurable setting for sudo elevation
If specified, this will be used no matter what. If not, then we check if
sudo exists and use that, or else fall back on su.
Implements FS#32621
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/executable/sudo.sh.in')
-rw-r--r-- | scripts/libmakepkg/executable/sudo.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/libmakepkg/executable/sudo.sh.in b/scripts/libmakepkg/executable/sudo.sh.in index ea494beb..1e139238 100644 --- a/scripts/libmakepkg/executable/sudo.sh.in +++ b/scripts/libmakepkg/executable/sudo.sh.in @@ -29,7 +29,7 @@ executable_functions+=('executable_sudo') executable_sudo() { if (( DEP_BIN || RMDEPS || INSTALL )); then - if ! type -p sudo >/dev/null; then + if (( ${#PACMAN_AUTH[@]} == 0 )) && ! type -p sudo >/dev/null; then warning "$(gettext "Cannot find the %s binary. Will use %s to acquire root privileges.")" "sudo" "su" fi fi |