From c09ea3ec385101bd874e4013f818b03c8dea6edb Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Wed, 29 Nov 2023 14:41:10 +0100 Subject: [PATCH] qemush : suppression de la fonction exec_as --- bin/qemush | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/bin/qemush b/bin/qemush index 86ab9bd..c3c3be8 100755 --- a/bin/qemush +++ b/bin/qemush @@ -1,17 +1,10 @@ #!/bin/bash -exec_as() { - local user="$1" - shift - - if [ "$(whoami)" != "$user" ]; then - exec sudo -u "$user" "$0" "$@" - else - cd || return - fi -} - -exec_as qemu "$@" || exit +if [ "$(whoami)" != root ]; then + exec sudo -u qemu "$0" "$@" +else + cd || exit +fi bin=bin images=images