From c609ba3b88961a0e9df18370ae1dbbad2746b775 Mon Sep 17 00:00:00 2001 From: Bastian Wissler Date: Tue, 17 Feb 2009 14:12:14 +0000 Subject: vmchooser binary: * set the default script to "/var/X11R6/bin/run-virt.sh" * in sources and binary git-svn-id: http://svn.openslx.org/svn/openslx/openslx-src-tools/vmchooser/trunk@2583 95ad53e4-c205-0410-b2fa-d234c58c8868 --- vmchooser/Makefile | 2 +- vmchooser/runImage.cxx | 24 ++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/vmchooser/Makefile b/vmchooser/Makefile index 5e32081..5c73108 100644 --- a/vmchooser/Makefile +++ b/vmchooser/Makefile @@ -25,7 +25,7 @@ debug: ${OBJS} ${CC} ${LDFLAGS} -o vmchooserdbg $^ ${LIBS} ${OBJS}: %.o: %.cxx %.dep - ${CC} ${DEBUG_CCFLAGS} -o $@ -c $< + ${CC} ${CCFLAGS} -o $@ -c $< ${DEPS}: %.dep: %.cxx Makefile ${CC} ${CCFLAGS} -MM $< > $@ diff --git a/vmchooser/runImage.cxx b/vmchooser/runImage.cxx index 2a33db5..ff9f340 100644 --- a/vmchooser/runImage.cxx +++ b/vmchooser/runImage.cxx @@ -84,29 +84,17 @@ void runImage(fltk::Widget*, void* p) **/ string runImage(DataEntry& dat, string confxml) { - //cout << dat.imgtype << endl << VMWARE << endl; - if (dat.imgtype == VMWARE) { - //cout << confxml << endl; - char* arg[] = { (char *) "/var/X11R6/bin/run-vmware.sh", - (char*)confxml.c_str(), - NULL }; - - //cout << arg << endl; //"run-vmware.sh imagename os (Window-Title) network" - execvp("/var/X11R6/bin/run-vmware.sh", arg); + if(! dat.command.empty() ) { + char* arg[] = { (char*) dat.command.c_str(), '\0' }; + execvp((char*) dat.command.c_str(), arg); } - if (dat.imgtype == VBOX) { - char* arg[] = { (char *) "/var/X11R6/bin/run-virtualbox.sh", + char* arg[] = { (char *) "/var/X11R6/bin/run-virt.sh", (char*)confxml.c_str(), NULL }; - //cout << arg << endl; //"run-vmware.sh imagename os (Window-Title) network" - execvp("/var/X11R6/bin/run-virtualbox.sh", arg); + execvp("/var/X11R6/bin/run-virt.sh", arg); - } - if(! dat.command.empty() ) { - char* arg[] = { (char*) dat.command.c_str(), '\0' }; - execvp((char*) dat.command.c_str(), arg); - } + // not reachable - but for compiling issues return string(); } -- cgit v1.2.3-55-g7522