kiss: Add support for ssu, remove sls

This commit is contained in:
Dylan Araps 2021-06-30 09:06:01 +00:00
parent a16230c40c
commit 9dbeca0c92
1 changed files with 4 additions and 4 deletions

8
kiss
View File

@ -38,7 +38,7 @@ as_root() {
[ "$uid" = 0 ] || log "Using '${su:=su}' (to become ${user:=root})"
case ${su##*/} in
doas|sudo|sls)
doas|sudo|ssu)
"$su" -u "$user" -- env "$@"
;;
@ -47,7 +47,7 @@ as_root() {
;;
*)
die "Invalid KISS_SU value: $su (valid: doas, sudo, sls, su)"
die "Invalid KISS_SU value: $su (valid: doas, sudo, ssu, su)"
;;
esac
}
@ -1389,7 +1389,7 @@ pkg_updates() {
# on the other hand requires that each argument be
# properly quoted as the command passed to it must
# be a string... This sets quotes where needed.
case $su in *su) git_cmd="'$git_cmd'"; esac
case $su in */su) git_cmd="'$git_cmd'"; esac
# Spawn a subshell to run multiple commands as
# root at once. This makes things easier on users
@ -1700,7 +1700,7 @@ 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 sls)"} ||:
su=${KISS_SU:-"$(command -v sudo || command -v doas || command -v ssu)"} ||:
# Figure out which utility is available to dump elf information.
elf_cmd=${KISS_ELF:="$(