2022-10-16 22:46:42 +03:00
|
|
|
#!/bin/sh
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
# SC2034: "Variable appears unused. Verify it or export it."
|
|
|
|
# Those are intentional here, as the file is meant to be included elsewhere.
|
|
|
|
|
2022-11-23 23:01:11 +03:00
|
|
|
# NOTE: If using another privilege escalation binary make sure it is configured or has the appropiate flag
|
|
|
|
# to keep the current environment variables in the launched process (in sudo's case this is achieved
|
|
|
|
# through the -E flag described in sudo(8).
|
|
|
|
SUDO="sudo -E"
|
2022-10-16 22:46:42 +03:00
|
|
|
|
|
|
|
if [ "$(uname -s)" = "SerenityOS" ]; then
|
2022-11-23 23:01:11 +03:00
|
|
|
SUDO="pls -E"
|
2022-10-16 22:46:42 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
die() {
|
|
|
|
echo "die: $*"
|
|
|
|
exit 1
|
|
|
|
}
|