From 0fc0b78c323287553950869ee63e7a093442f0c9 Mon Sep 17 00:00:00 2001 From: Vinicius Ruoso <vkr07@c3sl.ufpr.br> Date: Fri, 14 May 2010 11:30:07 -0300 Subject: [PATCH] Added the use of tryWget() when requesting the update package The tryWget(), included in common.sh, will automatically get the proxy configuration and use the appropriate wget(1) to retrieve the update package. Signed-off-by: Vinicius Ruoso <vkr07@c3sl.ufpr.br> Acked-by: Danilo Kiyoshi Simizu Yorinori <danilok@c3sl.ufpr.br> Acked-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br> Signed-off-by: Josiney de Souza <josineys@c3sl.ufpr.br> --- agent.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/agent.sh b/agent.sh index d50ad48..34cbddb 100755 --- a/agent.sh +++ b/agent.sh @@ -53,19 +53,8 @@ function checkUpdate() if test $? -eq 4; then test -f "${TMPDIR}/SEED2-update.run" || rm -f ${TMPDIR}/SEED2-update.run - getProxyConf - if test -z "$phost"; then - PROXY="" - else - PROXY="http://${phost}:${pport}" - fi - - http_proxy="${PROXY}" wget --tries=${UPDATETRIES} \ - --timeout=${UPDATETIMEOUT} \ - --proxy-user=${puid} \ - --proxy-password=${ppasswd} \ - ${UPDATESERVER}/SEED2-update.run \ - -O ${TMPDIR}/SEED2-update.run || return 1 + tryWget ${UPDATESERVER}/SEED2-update.run \ + -O ${TMPDIR}/SEED2-update.run || return 1 cd ${TMPDIR} bash ${TMPDIR}/SEED2-update.run || return 1 -- GitLab