diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-07-08 08:26:50 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-08-02 06:03:39 +0200 |
commit | aa75351b53dbd55153b224bc97ea1fec141dc7c6 (patch) | |
tree | 096da9aadee2c197cecb91beec3ba138721508a5 /eclass | |
parent | virtualx.eclass: Add quoting to workaround vim syntax hl bug (diff) | |
download | gentoo-aa75351b53dbd55153b224bc97ea1fec141dc7c6.tar.gz gentoo-aa75351b53dbd55153b224bc97ea1fec141dc7c6.tar.bz2 gentoo-aa75351b53dbd55153b224bc97ea1fec141dc7c6.zip |
virtualx.eclass: Pass xvfbargs as an array
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/virtualx.eclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index 5c4b39164cff..d7b82e12cdd5 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -109,7 +109,7 @@ virtx() { local retval=0 local OLD_SANDBOX_ON="${SANDBOX_ON}" local XVFB XHOST XDISPLAY - local xvfbargs="-screen 0 1280x1024x24 +extension RANDR" + local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR ) XVFB=$(type -p Xvfb) || die XHOST=$(type -p xhost) || die @@ -134,24 +134,24 @@ virtx() { # We really do not want SANDBOX enabled here export SANDBOX_ON="0" - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & + debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & sleep 2 local start=${XDISPLAY} while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do # Stop trying after 15 tries if ((XDISPLAY - start > 15)) ; then - eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:" + eerror "'${XVFB} :${XDISPLAY} ${xvfbargs[*]}' returns:" echo - ${XVFB} :${XDISPLAY} ${xvfbargs} + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" echo eerror "If possible, correct the above error and try your emerge again." die "Unable to start Xvfb" fi ((XDISPLAY++)) - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & + debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & sleep 2 done |