diff options
Diffstat (limited to 'src/os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r-- | src/os-plugins/plugins/vmchooser/files/run-virt.sh | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/os-plugins/plugins/vmchooser/files/run-virt.sh b/src/os-plugins/plugins/vmchooser/files/run-virt.sh index 76ddacf9..f796271d 100644 --- a/src/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/src/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -337,6 +337,26 @@ hostres=$(xvidtune -show 2>/dev/null| grep -ve "^$") xres=$(echo "${hostres}" | awk '{print $3}') yres=$(echo "${hostres}" | awk '{print $7}') +# Resolution defined via xml parameter: fullscreen, full/X*Y/depth; windowed, +# win/X*Y/depth +userres=$(grep -io '<screen param=.*"' ${xmlfile} | awk -F '"' '{ print $2 }' \ + tr "A-Z" "a-z") +case "${userres}" in + full*) + res=$(echo "${hostres}" | awk -F "/" '{print $2}') + uxres=${res%\**} + uyres=${#*\*} + userres="full" + ;; + win*) + res=$(echo "${hostres}" | awk -F "/" '{print $2}') + uxres=${res%\**} + uyres=${#*\*} + userres="win" + ;; +esac + + # Enable 3D enable3d=$(grep -i "<enable3d param=.*" ${xmlfile} 2>/dev/null | \ awk -F '=' {'print $2'}) @@ -394,13 +414,19 @@ if [ -e ${PLUGINCONFROOT}/${xmlvirt}/run-virt.include ] ; then fi eval ${VIRTCMD} ${VIRTCMDOPTS} writelog "Bye." + + # Postrun for commands after virtualization finishes + if [ -n "${POSTRUN}" ]; then + eval ${POSTRUN} >/dev/null 2>&1 + fi + cleanexit 0 else writelog "Failed because of missing ${xmlvirt} plugin." cleanexit 1 fi -# Postrun for scripts after virtualization finishes +# Postrun for commands after virtualization finishes if [ -n "${POSTRUN}" ]; then eval ${POSTRUN} >/dev/null 2>&1 fi |