summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser/files/run-virt.sh
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-02-18 20:30:41 +0100
committerDirk von Suchodoletz2009-02-18 20:30:41 +0100
commit89a9ea2bb2740585a3339cbf60075017b63a6f10 (patch)
treeb96f6ef65ec0063b77419e976ee6b654ce001aa6 /os-plugins/plugins/vmchooser/files/run-virt.sh
parentCopy the magic run-virt.include files ... (diff)
downloadcore-89a9ea2bb2740585a3339cbf60075017b63a6f10.tar.gz
core-89a9ea2bb2740585a3339cbf60075017b63a6f10.tar.xz
core-89a9ea2bb2740585a3339cbf60075017b63a6f10.zip
Changes for the run-virt.sh script ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2606 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh
index af92426d..29f41477 100644
--- a/os-plugins/plugins/vmchooser/files/run-virt.sh
+++ b/os-plugins/plugins/vmchooser/files/run-virt.sh
@@ -18,15 +18,18 @@
# fied virtualization tool.
# -----------------------------------------------------------------------------
+# Sanity checks
+###############################################################################
+
# check for running in graphical environment otherwise no much use here
[ -z "$DISPLAY" ] && echo -e "\n\tStart only within a desktop!\n" && exit 1
-# The PATH...
-export PATH="${PATH}:/var/X11R6/bin:/usr/X11R6/bin"
+# test if the xml path/file is valid (gotten via commandline first parameter)
+xml=$1
+[ -e "${xml}" ] && echo -e "\n\tNo XML file given!\n" && exit 1
# Read needed variables from XML file
###############################################################################
-xml=$1
# file name of the image
imagename=$(grep -i "<image_name param=\"" ${xml} | awk -F "\"" '{ print $2 }')
@@ -154,6 +157,9 @@ filecheck ()
# gured
################################################################################
+# The PATH...
+export PATH="${PATH}:/var/X11R6/bin:/usr/X11R6/bin"
+
# logo for console
cat <<EOL