qemush : suppression de la fonction exec_as

This commit is contained in:
Hippolyte Chauvin 2023-11-29 14:41:10 +01:00
parent 48790fec0d
commit c09ea3ec38

View file

@ -1,17 +1,10 @@
#!/bin/bash #!/bin/bash
exec_as() { if [ "$(whoami)" != root ]; then
local user="$1" exec sudo -u qemu "$0" "$@"
shift
if [ "$(whoami)" != "$user" ]; then
exec sudo -u "$user" "$0" "$@"
else else
cd || return cd || exit
fi fi
}
exec_as qemu "$@" || exit
bin=bin bin=bin
images=images images=images