qemush : suppression de toute trace de bash

This commit is contained in:
Ahurac 2024-03-25 16:41:19 +01:00
parent 97fb16f624
commit c094078f4e

View file

@ -145,11 +145,22 @@ public_rm() {
exec rm -vi -- "$@" exec rm -vi -- "$@"
} }
# Invoke bash as qemu user in its home directory # Invoke a shell as qemu user in its home directory
public_shell() { public_shell() {
cd || return 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 # Output the content of an entrypoint, with coloration if on a virtual