From 4c9ab17c4643e9023019c4781f13e2d9cfafabb6 Mon Sep 17 00:00:00 2001 From: Uladzimir Bely Date: Mon, 27 Jan 2025 11:26:11 +0300 Subject: [PATCH] Limit curl execution time to 2s to find WAN IP Option "--connect-timeout" used to determine external IP covers only connection phase. Curl may "hans" in a different phase and this makes login to the system impossible if MOTD "header" module enabled. Using "--max-time" is more reliable and prevents hanging for hours. Fixes issue https://github.com/armbian/build/issues/7753 Signed-off-by: Uladzimir Bely --- packages/bsp/common/etc/update-motd.d/10-armbian-header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsp/common/etc/update-motd.d/10-armbian-header b/packages/bsp/common/etc/update-motd.d/10-armbian-header index 7b8ee7096bea..df947c2d56be 100755 --- a/packages/bsp/common/etc/update-motd.d/10-armbian-header +++ b/packages/bsp/common/etc/update-motd.d/10-armbian-header @@ -56,7 +56,7 @@ for f in $MOTD_DISABLE; do done function get_wan_address() { - curl --connect-timeout 2 -s http://whatismyip.akamai.com/ + curl --max-time 2 -s http://whatismyip.akamai.com/ } # get wan ip address function get_ip_addresses() {