summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/vmchooser/files/run-virt.sh
diff options
context:
space:
mode:
authorDirk2011-07-12 01:28:51 +0200
committerDirk2011-07-12 01:28:51 +0200
commit258716fbe366bb5f0dd619b4b47fb2b611417aa9 (patch)
tree84f186273e828ade607d3d444d895ad69119e5d8 /src/os-plugins/plugins/vmchooser/files/run-virt.sh
parentNew version vmchooser ... (diff)
downloadcore-258716fbe366bb5f0dd619b4b47fb2b611417aa9.tar.gz
core-258716fbe366bb5f0dd619b4b47fb2b611417aa9.tar.xz
core-258716fbe366bb5f0dd619b4b47fb2b611417aa9.zip
Stuff for virtualization and making qemukvm plugin work properly ...
Diffstat (limited to 'src/os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r--src/os-plugins/plugins/vmchooser/files/run-virt.sh28
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