Add support for 'run0' as a root command option

Still painful unless using a version of polkit with https://github.com/polkit-org/polkit/pull/533 (needs reauth for every command) but probably better than failing ?

Signed-off-by: cvlc12 <97767846+cvlc12@users.noreply.github.com>
pull/18231/head
cvlc12 4 weeks ago committed by GitHub
parent 3e89068792
commit 72837dc5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -505,10 +505,13 @@ main() {
elif type doas >/dev/null; then
CAN_ROOT=1
SUDO="doas"
elif type run0 >/dev/null; then
CAN_ROOT=1
SUDO="run0"
fi
if [ "$CAN_ROOT" != "1" ]; then
echo "This installer needs to run commands as root."
echo "We tried looking for 'sudo' and 'doas', but couldn't find them."
echo "We tried looking for 'sudo', 'doas' and 'run0', but couldn't find them."
echo "Either re-run this script as root, or set up sudo/doas."
exit 1
fi

Loading…
Cancel
Save