From 3d2aaec9a604282bf0e561df6e676277dd079c7f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 11 Sep 2024 09:27:00 +0200 Subject: use pkexec to elevate privileges This requires polkit to be installed. --- bin/pacman-offline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/pacman-offline b/bin/pacman-offline index a6e2a99..ae2ec19 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -36,9 +36,9 @@ while getopts 'cfhprty' opt; do done if [ "${UID}" -ne 0 ]; then - if command -v run0 >/dev/null; then + if command -v pkexec >/dev/null; then echo 'Missing privileges, trying to elevate.' >&2 - exec run0 "${0}" "${@}" + exec pkexec "${0}" "${@}" fi echo "You need elevated privileges. Please run as user 'root'!" >&2 -- cgit v1.2.3-70-g09d2