mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
fix shell script execute after su (#1581)
`su xxx -c bash a.sh` it will execute like `su xxx -c bash` and ignore a.sh in order to do right way `su xxx -c "bash a.sh"`
This commit is contained in:
committed by
Igor Pečovnik
parent
2c0adc006a
commit
de58ac1faa
@@ -76,7 +76,7 @@ echo update_src >> $TMPFILE
|
||||
#due to in docker/VM, we can't su to a normal user, so do not update/checkout git.
|
||||
if [[ `systemd-detect-virt` == 'none' ]]; then
|
||||
if [[ $EUID == 0 ]]; then
|
||||
su `stat --format=%U $SRC/.git` -c bash $TMPFILE
|
||||
su `stat --format=%U $SRC/.git` -c "bash $TMPFILE"
|
||||
else
|
||||
bash $TMPFILE
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user