From 89a9ea2bb2740585a3339cbf60075017b63a6f10 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 18 Feb 2009 19:30:41 +0000 Subject: Changes for the run-virt.sh script ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2606 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmchooser/files/run-virt.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh') 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 "