summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
diff options
context:
space:
mode:
authorJonathan Bauer2018-01-18 18:18:08 +0100
committerJonathan Bauer2018-01-18 18:18:08 +0100
commitbaa34483eebd572840f8f748fc4ad3bd63c023fa (patch)
tree58a61b61f680ee1d0098a81ac1a30e5ad9882e25 /builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
parentask systemctl where dracut-mount is ... (diff)
downloadsystemd-init-baa34483eebd572840f8f748fc4ad3bd63c023fa.tar.gz
systemd-init-baa34483eebd572840f8f748fc4ad3bd63c023fa.tar.xz
systemd-init-baa34483eebd572840f8f748fc4ad3bd63c023fa.zip
add support for slxsrv=@<ip>
+ retry downloading config if it fails, to catch some network delays....
Diffstat (limited to 'builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh')
-rwxr-xr-xbuilder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh18
1 files changed, 8 insertions, 10 deletions
diff --git a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
index 8c3bed23..263eff75 100755
--- a/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
+++ b/builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh
@@ -16,18 +16,16 @@ exceptions.try
slx_server_base="$(getarg slxbase=)"
exceptions.activate
- logging.info "Download config.tgz from '${slx_server}'..."
+ logging.info "Download config.tgz from '${slx_server#@}'..."
IFS_backup="$IFS"
IFS=','
- for host in ${slx_server}; do
- logging.info "Trying host \"$host\"."
- if wget --timeout 5 \
- "http://${host}/${slx_server_base}/config.tgz" \
- --output-document "/etc/config.tgz"
- then
- break
- fi
- done
+ for TIMEOUT in 1 1 2 3; do
+ if wget --timeout 5 \
+ "http://${slx_server#@}/${slx_server_base}/config.tgz" \
+ --output-document "/etc/config.tgz"; then
+ break
+ fi
+ done
IFS="$IFS_backup"
if [[ ! -e "/etc/config.tgz" ]]; then