mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: Add support for ssu, remove sls
This commit is contained in:
parent
a16230c40c
commit
9dbeca0c92
8
kiss
8
kiss
@ -38,7 +38,7 @@ as_root() {
|
|||||||
[ "$uid" = 0 ] || log "Using '${su:=su}' (to become ${user:=root})"
|
[ "$uid" = 0 ] || log "Using '${su:=su}' (to become ${user:=root})"
|
||||||
|
|
||||||
case ${su##*/} in
|
case ${su##*/} in
|
||||||
doas|sudo|sls)
|
doas|sudo|ssu)
|
||||||
"$su" -u "$user" -- env "$@"
|
"$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
|
esac
|
||||||
}
|
}
|
||||||
@ -1389,7 +1389,7 @@ pkg_updates() {
|
|||||||
# on the other hand requires that each argument be
|
# on the other hand requires that each argument be
|
||||||
# properly quoted as the command passed to it must
|
# properly quoted as the command passed to it must
|
||||||
# be a string... This sets quotes where needed.
|
# 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
|
# Spawn a subshell to run multiple commands as
|
||||||
# root at once. This makes things easier on users
|
# 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
|
# Figure out which 'sudo' command to use based on the user's choice or what
|
||||||
# is available on the system.
|
# 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.
|
# Figure out which utility is available to dump elf information.
|
||||||
elf_cmd=${KISS_ELF:="$(
|
elf_cmd=${KISS_ELF:="$(
|
||||||
|
Loading…
Reference in New Issue
Block a user