diff options
author | Christian Rößler | 2015-09-12 16:55:19 +0200 |
---|---|---|
committer | Christian Rößler | 2015-09-12 16:55:19 +0200 |
commit | 265030ec9f488347d3c2e4fcd115dc1c74655e8a (patch) | |
tree | 04fd8f258d4bb7453a23b498aaf70188448b7af5 /remote | |
parent | [vmware] systemd - vmware.service: Added setup-partitions.service to requires... (diff) | |
download | tm-scripts-265030ec9f488347d3c2e4fcd115dc1c74655e8a.tar.gz tm-scripts-265030ec9f488347d3c2e4fcd115dc1c74655e8a.tar.xz tm-scripts-265030ec9f488347d3c2e4fcd115dc1c74655e8a.zip |
[runvirt] detect_legacy.inc: Some more cosmetics.
Diffstat (limited to 'remote')
-rw-r--r-- | remote/modules/run-virt/data/opt/openslx/scripts/includes/detect_legacy.inc | 12 |
1 files changed, 6 insertions, 6 deletions
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 13670bb1..7211c5be 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 @@ -5,7 +5,7 @@ # Legacy mode: As runvirt has been before. # New mode: uuid in xml _and_ vmx given via http. -writelog "Now in detect_legacy.inc" +writelog "Detecting current/legacy mode ..." TMPDIR=$(mktemp -d -p /tmp/virt) ERR=$? @@ -23,18 +23,18 @@ if [ ! -n "$IMGUUID" ]; then # Keine uuid: Abbruch, Legacy writelog "Could not extract an uuid param from ${xmlfile}. Triggering legacy mode." LEGACY=: # No uuid; legacy. else - writelog "else-Zweig" # Now getting template file: if wget -O "$TMPDIR/$IMGUUID" "${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}" 1>&2 2>/dev/null; then writelog "wget ${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID} successful." + writelog "Triggering current (non-legacy) mode." LEGACY= # both strings set: no legacy. + if [ ! -s "$TMPDIR/$IMGUUID" ]; then + LEGACY= # no legacy: server sent 0 byte file. + writelog "Server sent zero byte vmx template uuid file. Retriggering legacy mode." + fi else writelog "wget ${SLX_VMCHOOSER_BASE_URL}/lecture/${IMGUUID}: Error code $ERR. Triggering legacy mode." LEGACY=: fi fi -if [ ! -s "$TMPDIR/$IMGUUID" ]; then - LEGACY= # no legacy: server sent 0 byte file. - writelog "Server sent zero byte vmx template uuid file. Triggering legacy mode." -fi |