mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
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 <wiselord1983@gmail.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user