summaryrefslogtreecommitdiffstats
path: root/core/rootfs
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-14 12:10:47 +0200
committerSimon Rettberg2020-10-14 12:10:47 +0200
commita5010bbcd06c6a12d946558c4d85da089b02d440 (patch)
tree4cf3d21faaeb7e6a3c1af21155c74b24c4b59d7b /core/rootfs
parent[vmware16] New module (diff)
downloadmltk-a5010bbcd06c6a12d946558c4d85da089b02d440.tar.gz
mltk-a5010bbcd06c6a12d946558c4d85da089b02d440.tar.xz
mltk-a5010bbcd06c6a12d946558c4d85da089b02d440.zip
[rfs-stage32/vmware*] Change vmware version naming
Hard-coding the version check to VMware 12 and 15 isn't great for future updates -- i.e. now, that VMware 16 is released. Instead make the version check script return "new" or "legacy", and rename the targets: vmware12 -> vmware-legacy vmware15 -> vmware The addon downloading/setup should then act upon this accordingly.
Diffstat (limited to 'core/rootfs')
-rwxr-xr-xcore/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
index 73e0efb1..c9b06f9d 100755
--- a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
+++ b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
@@ -18,7 +18,7 @@
. /opt/openslx/config || { echo "Could not source config!"; exit 23; }
# source functions.inc for the download function
-. /opt/openslx/inc/functions || { echo "/opt/openslx/inc/functions not found!"; exit 1337; }
+. /opt/openslx/inc/functions || { echo "/opt/openslx/inc/functions not found!"; exit 42; }
# quick fix for the missing FUTURE_ROOT needed by /opt/openslx/etc/functions.inc
export FUTURE_ROOT="/"
@@ -65,13 +65,17 @@ if [ $# -eq 1 ]; then
FILE="$ADDON"
if [ "$ADDON" = "vmware" ]; then
# check with the helper
- version="$(vmware-get-supported-version)"
- FILE="vmware$version"
- echo "Deciding to download $FILE instead of $ADDON after checking CPU"
+ version="$( vmware-get-supported-version )"
+ if [ "$version" = "legacy" ]; then
+ FILE="${ADDON}-${version}"
+ fi
+ echo "Deciding to download flavor '$version' of $ADDON ($FILE) after checking CPU"
fi
# XXX
if ! download "${SLX_BASE_PATH}/${FILE}.sqfs" "${ADDON_TARGET_PATH}"; then
- slxlog --echo "addon-download" "Download of '${HTTP_BASE_PATH}/${ADDON}.sqfs' failed."
+ if [ "$ADDON" = "$FILE" ] || ! download "${SLX_BASE_PATH}/${ADDON}.sqfs" "${ADDON_TARGET_PATH}"; then
+ slxlog --echo "addon-download" "Download of '${HTTP_BASE_PATH}/${FILE}.sqfs' failed. (${ADDON})"
+ fi
exit 1
fi
fi