mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-09-30 21:40:55 -06:00
Merge pull request #177 from illiliti/as_root_sls
kiss: add support for sls
This commit is contained in:
commit
2c3b2aa821
5
kiss
5
kiss
@ -57,8 +57,9 @@ as_root() {
|
|||||||
|
|
||||||
case ${su##*/} in
|
case ${su##*/} in
|
||||||
doas|sudo) "$su" -u "$user" -- env "$@" ;;
|
doas|sudo) "$su" -u "$user" -- env "$@" ;;
|
||||||
|
sls) "$su" -u "$user" -c -- env "$@" ;;
|
||||||
su) "$su" -c "env $* <&3" "$user" 3<&0 </dev/tty ;;
|
su) "$su" -c "env $* <&3" "$user" 3<&0 </dev/tty ;;
|
||||||
*) die "Invalid KISS_SU value: $su (valid: doas, sudo, su)"
|
*) die "Invalid KISS_SU value: $su (valid: doas, sudo, sls, su)"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1564,7 +1565,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)} || su=su
|
su=${KISS_SU:-$(command -v sudo || command -v doas || command -v sls)} || su=su
|
||||||
|
|
||||||
# Store the date and time of script invocation to be used as the name of
|
# Store the date and time of script invocation to be used as the name of
|
||||||
# the log files the package manager creates uring builds.
|
# the log files the package manager creates uring builds.
|
||||||
|
Loading…
Reference in New Issue
Block a user