Add timeout to DigitalOcean metadata fetching

Add a 5 second timeout to DigitalOcean metadata fetching, e.g. to use this script with other VPS services.
This commit is contained in:
Les De Ridder 2016-04-14 14:48:27 +02:00
parent be73259522
commit 08a30309a5
1 changed files with 1 additions and 1 deletions

View File

@ -446,7 +446,7 @@ stage1_install() {
rm /d2a/work/archroot/dosync.pkg.tar
local authkeys
if authkeys="$(wget -qO- ${meta_base}public-keys)" && test -z "${authkeys}"; then
if authkeys="$(wget -qO- -T5 -t1 ${meta_base}public-keys)" && test -z "${authkeys}"; then
log "*** WARNING ***"
log "SSH public keys are not configured for this droplet."
log "PermitRootLogin will be enabled in sshd_config to permit root logins over SSH."