docs: update

This commit is contained in:
Dylan Araps 2020-01-31 11:38:52 +02:00
parent a453e84ed2
commit 55e603ab66
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

4
kiss
View File

@ -50,12 +50,12 @@ prompt() {
as_root() { as_root() {
# Simple function to run a command as root using either 'sudo', # Simple function to run a command as root using either 'sudo',
# 'doas' or 'su'. This also handles KISS' environment variables. # 'doas' or 'su'. Hurrah for choice.
log "Using '${su:-su}'" log "Using '${su:-su}'"
case $su in case $su in
*sudo) sudo -Eu "${user:-root}" -- "$@" ;; *sudo) sudo -Eu "${user:-root}" -- "$@" ;;
*doas) doas -u "${user:-root}" -- "$@" ;; *doas) doas -u "${user:-root}" -- "$@" ;;
*) su -pc "$* <&3" "${user:-root}" 3<&0 </dev/tty ;; *) su -pc "$* <&3" "${user:-root}" 3<&0 </dev/tty ;;
esac esac
} }