forked from ahurac/dotfiles
qemush : suppression de la fonction exec_as
This commit is contained in:
parent
48790fec0d
commit
c09ea3ec38
1 changed files with 5 additions and 12 deletions
17
bin/qemush
17
bin/qemush
|
@ -1,17 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
exec_as() {
|
if [ "$(whoami)" != root ]; then
|
||||||
local user="$1"
|
exec sudo -u qemu "$0" "$@"
|
||||||
shift
|
else
|
||||||
|
cd || exit
|
||||||
if [ "$(whoami)" != "$user" ]; then
|
fi
|
||||||
exec sudo -u "$user" "$0" "$@"
|
|
||||||
else
|
|
||||||
cd || return
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
exec_as qemu "$@" || exit
|
|
||||||
|
|
||||||
bin=bin
|
bin=bin
|
||||||
images=images
|
images=images
|
||||||
|
|
Loading…
Reference in a new issue