summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d
diff options
context:
space:
mode:
authorJonathan Bauer2017-12-01 11:12:59 +0100
committerJonathan Bauer2017-12-01 11:12:59 +0100
commitbe1ace43f2029c16b2e86847388eae6141233e9b (patch)
tree66c765a4d395f348ee77ec3bb9b55882de8218b8 /core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d
parent[pvs2] Make dedicated mgr mode work again with lightdm(-greeter-bwlp) (diff)
downloadmltk-be1ace43f2029c16b2e86847388eae6141233e9b.tar.gz
mltk-be1ace43f2029c16b2e86847388eae6141233e9b.tar.xz
mltk-be1ace43f2029c16b2e86847388eae6141233e9b.zip
[run-virt] try to fix samba paths on windows
cause it does not really hurt to do.
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.inc8
1 files changed, 7 insertions, 1 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 61a73bb2..9f854eca 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
@@ -83,7 +83,13 @@ setup_virtual_floppy() {
# which is coincidentally the one we received from dmsd :)
if load_dmsd_resource NETSHARES; then
if [ -s "${NETSHARES}" ]; then
- cat $NETSHARES >> "${SHARES}"
+ # try to detect if we are running windows and replace '/' with '\'
+ # in an attempt to fix an improperly given samba path
+ cmd="cat"
+ if [[ "$( tr '[A-Z]' '[a-z]' <<< ${VM_OS_TYPE})" = *windows* ]]; then
+ cmd="tr '/' '\'"
+ fi
+ < $NETSHARES ${cmd} >> "${SHARES}"
fi
fi