kiss: find cmd_su in system if KISS_SU is unset

This commit is contained in:
Dylan Araps 2021-07-22 09:56:06 +03:00
parent 2f16432993
commit 0ad76a03df
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 6 additions and 1 deletions

7
kiss
View File

@ -1904,7 +1904,12 @@ main() {
# Figure out which 'sudo' command to use based on the user's choice or what
# is available on the system.
cmd_su=${KISS_SU:-su}
cmd_su=${KISS_SU:-"$(
command -v ssu ||
command -v sudo ||
command -v doas ||
command -v su
)"} || cmd_su=su
# Figure out which utility is available to dump elf information.
cmd_elf=${KISS_ELF:-"$(