diff options
author | Jonathan Bauer | 2018-01-18 18:18:08 +0100 |
---|---|---|
committer | Jonathan Bauer | 2018-01-18 18:18:08 +0100 |
commit | baa34483eebd572840f8f748fc4ad3bd63c023fa (patch) | |
tree | 58a61b61f680ee1d0098a81ac1a30e5ad9882e25 /builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh | |
parent | ask systemctl where dracut-mount is ... (diff) | |
download | systemd-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-x | builder/modules.d/conf-tgz/hooks/fetch-config-tgz.sh | 18 |
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 |