From 90e3a896cfe3ab9c5862f724191cba330b732a40 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 18 Feb 2009 00:35:17 +0000 Subject: Some first script cleanups ... more to follow. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2595 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/vmchooser/files/run-virt.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 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 ac17d391..af92426d 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -18,11 +18,14 @@ # fied virtualization tool. # ----------------------------------------------------------------------------- +# 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" # Read needed variables from XML file -################################################################################ +############################################################################### xml=$1 # file name of the image @@ -50,13 +53,19 @@ serial=$(grep -i "/dev/null -- cgit v1.2.3-55-g7522