Created
March 14, 2021 22:59
-
-
Save cemkeylan/6c280ac11fd3844001c59a0f86568e94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/kiss b/kiss | |
index a49886f..6fe6464 100755 | |
--- a/kiss | |
+++ b/kiss | |
@@ -37,7 +37,7 @@ as_root() { | |
[ "$uid" = 0 ] || log "Using '${su:=su}' (to become ${user:=root})" | |
case ${su##*/} in | |
- doas|sudo|ssu) | |
+ doas|please|sudo|ssu) | |
"$su" -u "$user" -- env "$@" | |
;; | |
@@ -46,7 +46,7 @@ as_root() { | |
;; | |
*) | |
- die "Invalid KISS_SU value: ${su##*/} (valid: doas, sudo, ssu, su)" | |
+ die "Invalid KISS_SU value: ${su##*/} (valid: doas, please, sudo, ssu, su)" | |
;; | |
esac | |
} | |
@@ -1632,7 +1632,10 @@ main() { | |
# Figure out which 'sudo' command to use based on the user's choice or what | |
# is available on the system. | |
- su=${KISS_SU:-"$(command -v sudo || command -v doas || command -v ssu)"} || su=su | |
+ su=${KISS_SU:-"$(command -v sudo || | |
+ command -v doas || | |
+ command -v ssu || | |
+ command -v please)"} || su=su | |
# Figure out which utility is available to dump elf information. | |
elf_cmd=${KISS_ELF:="$( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment