Skip to content

welcome-screen.sh: Add curl timeout to prevent SSH timeout without internet #271

@MarvinFS

Description

@MarvinFS

Problem

When a Proxmox host has no internet connectivity, SSH connections time out entirely and never reach the shell prompt. The root cause is in welcome-screen.sh (installed as /etc/update-motd.d/01-welcome-screen), which runs during MOTD generation on every SSH session.

The VERSION_CHECK function calls curl -s three times sequentially with no timeout:

curl -s https://raw.githubusercontent.com/BassT23/Proxmox/master/update.sh > /root/update_master.sh
curl -s https://raw.githubusercontent.com/BassT23/Proxmox/beta/update.sh > /root/update_beta.sh
curl -s https://raw.githubusercontent.com/BassT23/Proxmox/develop/update.sh > /root/update_develop.sh

The script already has offline detection ([[ ! -s /root/update_master.sh ]]), but that check runs only after all three curl commands complete - which is exactly what blocks.

Suggested Fix

Add --connect-timeout 3 --max-time 15 to each curl call:

curl -s --connect-timeout 3 --max-time 15 https://raw.githubusercontent.com/BassT23/Proxmox/master/update.sh > /root/update_master.sh
curl -s --connect-timeout 3 --max-time 15 https://raw.githubusercontent.com/BassT23/Proxmox/beta/update.sh > /root/update_beta.sh
curl -s --connect-timeout 3 --max-time 15 https://raw.githubusercontent.com/BassT23/Proxmox/develop/update.sh > /root/update_develop.sh

This reduces worst-case offline MOTD delay to ~9 seconds, well within SSH client timeout thresholds.

Environment

  • Proxmox VE 8.x / 9.x
  • Ultimate Updater 4.5.2
  • welcome-screen.sh version 1.9

Metadata

Metadata

Assignees

Labels

betaIn beta stadiumbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions