From 807cd6d3b2698276edb19e9508cfe7445752ae9f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 5 Apr 2016 15:14:38 +0200 Subject: [run-virt/*] Introduce variable for downloaded vm config (was $TMPDIR/$IMGUUID) --- .../run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'remote/modules/run-virt/data/opt/openslx/scripts/includes') diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc b/remote/modules/run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc index fb64d73e..f77e955b 100644 --- a/remote/modules/run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc +++ b/remote/modules/run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc @@ -8,7 +8,8 @@ writelog "Detecting current/legacy mode ..." # First, let's try to extract an imguuid from xmlfile: -IMGUUID=$(grep -io '/dev/null >&2; then + if ! wget -O "$TMPCONFIG" "${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}" 2>/dev/null >&2; then writelog "wget ${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}. Triggering legacy mode." else writelog "wget ${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID} successful." - if [ ! -s "$TMPDIR/$IMGUUID" ]; then + if [ ! -s "$TMPCONFIG" ]; then writelog "Server sent zero byte virtual machine description file. Triggering legacy mode." else writelog "Triggering current (non-legacy) mode." -- cgit v1.2.3-55-g7522