From 5a065790a872007ea9bd4aa0cb4c2d54a8adec55 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:45:32 +0200 Subject: [PATCH] kasm: survive a failed release lookup and answer the installer with flags (#18092) The lookup ran under pipefail with no timeout: a page without the link ended the install at `head -1`, a stalled connection hung it for half an hour, and the fallback version never ran. The installer takes --accept-eula, --no-swap-check and --no-check-disk; piped answers shifted with the prompts, and a "y" to the swap question tried swapon inside the container. --- install/kasm-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/kasm-install.sh b/install/kasm-install.sh index 38096b6d6..088fc2ee3 100644 --- a/install/kasm-install.sh +++ b/install/kasm-install.sh @@ -37,10 +37,10 @@ fi msg_ok "Installed Docker" msg_info "Detecting latest Kasm Workspaces release" -KASM_URL=$(curl -s https://kasm.com/downloads \ +KASM_URL=$(curl -s --max-time 30 https://kasm.com/downloads \ | grep -oP 'https://kasm-static-content\.s3\.amazonaws\.com/kasm_release_\d+\.\d+\.\d+-latest\.tar\.gz' \ - | head -1) -KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)') + | head -1 || true) +KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)' || true) # Fallback to predefined version if online lookup failed. if [[ -z "$KASM_VERSION" ]] || [[ -z "$KASM_URL" ]]; then @@ -63,7 +63,7 @@ curl_download "/opt/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL" cd /opt tar -xf "kasm_release_${KASM_VERSION}.tar.gz" chmod +x /opt/kasm_release/install.sh -printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh --ignore-dep-failures >~/kasm-install.output 2>&1 +bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1 awk ' /^Kasm UI Login Credentials$/ {capture=1} capture {print}