From f6f7848eaa5bdd69e03608fc2b9898eab3ce599b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 10 Jul 2019 16:52:07 +0200 Subject: [run-virt/*] Make VIRTCMDOPTS an array for space safeness --- .../modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt') diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt b/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt index 9d7020ed..a2d0f3cb 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/vmchooser-run_virt @@ -160,6 +160,9 @@ main() { notify_user "Feature '$FEAT' nicht unterstützt" fi done + # Prepare array for the command line options + unset VIRTCMDOPTS + declare -a VIRTCMDOPTS # The features should now be initialized, call the main 'run_plugin' function of the hypervisor writelog "#################### Plugin run: $PLUGIN_ID ####################" writelog "Calling 'run_plugin' of '$PLUGIN_ID'..." @@ -174,9 +177,9 @@ main() { cleanexit 1 fi - writelog "VM command: ${VIRTCMD} ${VIRTCMDOPTS}" + writelog "VM command: ${VIRTCMD} ${VIRTCMDOPTS[*]}" # This will start the VM (no eval needed!) - ${VIRTCMD} ${VIRTCMDOPTS} + "${VIRTCMD}" "${VIRTCMDOPTS[@]}" writelog "Virtualizer exited with '$?'. Bye." -- cgit v1.2.3-55-g7522