From 0f7ca34d8915031f127aef92a61f427fc8e1e42e Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Tue, 10 Jul 2018 16:47:32 +0200 Subject: [client] Small improvements for visibility flag --- .../data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d') diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc index f7fee6e9..b908df2c 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc @@ -105,11 +105,12 @@ setup_virtual_floppy() { if load_dmsd_resource RUNSCRIPT; then if [ -s "$RUNSCRIPT" ]; then declare -A OPTIONS - for OPT in $(head -n 1 "$RUNSCRIPT" | tr ";" "\n") - do + IFS=$'\n' + for OPT in $(head -n 1 "$RUNSCRIPT" | tr ";" "\n"); do KEY=$(cut -s -d '=' -f 1 <<< "${OPT^^}") [ -n "$KEY" ] && OPTIONS["$KEY"]=$(cut -s -d '=' -f 2- <<< "$OPT") done + unset IFS [ ${OPTIONS[EXT]} ] && [ "x${OPTIONS[EXT]:0:1}" != "x." ] && OPTIONS[EXT]=".${OPTIONS[EXT]}" fi -- cgit v1.2.3-55-g7522