diff --git a/bin/qemush b/bin/qemush index 3a5b99c..9442366 100755 --- a/bin/qemush +++ b/bin/qemush @@ -145,11 +145,22 @@ public_rm() { exec rm -vi -- "$@" } -# Invoke bash as qemu user in its home directory +# Invoke a shell as qemu user in its home directory public_shell() { cd || return - exec bash -i + # Again... + # shellcheck disable=2209 + [ -z "$SHELL" ] && SHELL=sh + + set -- "$SHELL" + case "$SHELL" in + sh|bash|zsh|ksh|mksh|oksh) + set -- "$@" -i + ;; + esac + + exec "$@" } # Output the content of an entrypoint, with coloration if on a virtual