diff options
author | Jonathan Bauer | 2017-12-04 13:27:42 +0100 |
---|---|---|
committer | Jonathan Bauer | 2017-12-04 13:27:42 +0100 |
commit | 8a78e017c1b65058f1b40ee101ad38b4107cda81 (patch) | |
tree | 8a17963cc7c77f04f1497abea3038904945b9969 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d | |
parent | Revert "[run-virt] sanitize downloaded maschine desc" (diff) | |
download | mltk-8a78e017c1b65058f1b40ee101ad38b4107cda81.tar.gz mltk-8a78e017c1b65058f1b40ee101ad38b4107cda81.tar.xz mltk-8a78e017c1b65058f1b40ee101ad38b4107cda81.zip |
[run-virt] more robust translation of / to \
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d')
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc | 6 |
1 files changed, 3 insertions, 3 deletions
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 9f854eca..495addfc 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 @@ -85,11 +85,11 @@ setup_virtual_floppy() { if [ -s "${NETSHARES}" ]; then # try to detect if we are running windows and replace '/' with '\' # in an attempt to fix an improperly given samba path - cmd="cat" + cmd=(cat) if [[ "$( tr '[A-Z]' '[a-z]' <<< ${VM_OS_TYPE})" = *windows* ]]; then - cmd="tr '/' '\'" + cmd=(tr / '\\') fi - < $NETSHARES ${cmd} >> "${SHARES}" + < $NETSHARES "${cmd[@]}" >> "${SHARES}" fi fi |