From 902e8c2a54ab762e9e50d21d16a5334c08597517 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Thu, 5 Mar 2009 22:07:53 +0000 Subject: changed hotkey true to lowercase, uppercase does not work :( rearranged vmwares conffile, variables needed on top ->shared_folder var as usual test with -n does not workt with or without "" even check for [ "${cdrom1}x" = "x" ] didnt work, now i hate bash :( git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2683 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/virtualbox/files/run-virt.include | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'os-plugins/plugins/virtualbox/files/run-virt.include') diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include index e6697211..67a333b7 100644 --- a/os-plugins/plugins/virtualbox/files/run-virt.include +++ b/os-plugins/plugins/virtualbox/files/run-virt.include @@ -21,17 +21,23 @@ permem=66 mem=$(expr{totalmem} * ${permem}) # virtual fd/cd/dvd and drive devices, floppy b: for configuration -floppy0="FALSE" -# if $floppy_0 from run-virt.include set then floppy0="TRUE" -[ -n "$floppy_0" ] && floppy0="TRUE" +# if $floppy_0 from run-virt.include set then fdtest="TRUE" +fdtest= +fdtest=${floppy_0:+"TRUE"} +# if $fdtest not set floppy0="FALSE", else "TRUE" +floppy0=${fdtest:-"FALSE"} floppy1="TRUE" floppy1name="/var/lib/virt/vmchooser/loopimg/fd.img" -cdrom0="FALSE" -# if $cdrom_0 from run-virt.include set then cdrom0="TRUE" -[ -n "$cdrom_0" ] && cdrom0="TRUE" -cdrom1="FALSE" -# if $cdrom_1 from run-virt.include set then cdrom1="TRUE" -[ -n "$cdrom_1" ] && cdrom1="TRUE" +# if $cdrom_0 from run-virt.include set then cdtest="TRUE" +cdtest= +cdtest=${cdrom_0:+"TRUE"} +# if $cdtest not set cdrom0="FALSE", else "TRUE" +cdrom0=${cdtest:-"FALSE"} +# if $cdrom_1 from run-virt.include set then cdtest="TRUE" +cdtest= +cdtest=${cdrom_1:+"TRUE"} +# if $cdtest not set cdrom1="FALSE", else "TRUE" +cdrom1=${cdtest:-"FALSE"} # ide is expected default, test for the virtual disk image type should # be done while creating the runscripts ... ide="TRUE" -- cgit v1.2.3-55-g7522