summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rw-r--r--remote/modules/run-virt/data/opt/openslx/scripts/detect_legacy.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/detect_legacy.inc b/remote/modules/run-virt/data/opt/openslx/scripts/detect_legacy.inc
index 4c3a2f2b..f28b62de 100644
--- a/remote/modules/run-virt/data/opt/openslx/scripts/detect_legacy.inc
+++ b/remote/modules/run-virt/data/opt/openslx/scripts/detect_legacy.inc
@@ -12,7 +12,7 @@ IMGUUID=$(grep -io '<uuid param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -
TMPDIR=$(mktemp -d -p /tmp/virt)
# Then get a template (vmx) file via http/wget:
-wget --output-document="$TMPDIR/$IMGUUID" "${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}"
+wget -O "$TMPDIR/$IMGUUID" "${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}"
writelog "IMGUUID: -$IMGUUID- --- TMPDIR: ${TMPDIR}"
@@ -23,3 +23,8 @@ else
LEGACY=: # legacy: One or both strings not set
writelog "Legacy mode detected."
fi
+
+if [ ! -s "$TMPDIR/$IMGUUID" ]; then
+ writelog "Warning: Image.UUID file has zero bytes - triggering legacy mode."
+ LEGACY=:
+fi