Skip to content
Snippets Groups Projects
Commit 3d0d4731 authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci Committed by Danilo K. S. Yorinori
Browse files

common.sh: Added messages for proxy use and missing information case


The script will check if there's any proxy configuration and, if so, it will
print a message to log file. Besides that, it'll also check if the system
variable "http_proxy" has a value, thus logging "something is wrong".

Signed-off-by: default avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Signed-off-by: default avatarDanilo K. S. Yorinori <danilok@c3sl.ufpr.br>
parent 2d5cc755
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,16 @@ function getProxyConf() ...@@ -43,6 +43,16 @@ function getProxyConf()
test -n "${pport}" && pport="--pport=${pport}" test -n "${pport}" && pport="--pport=${pport}"
test -n "${puid}" && puid="--puid=${puid}" test -n "${puid}" && puid="--puid=${puid}"
test -n "${ppasswd}" && ppasswd="--ppasswd=${ppasswd}" test -n "${ppasswd}" && ppasswd="--ppasswd=${ppasswd}"
# If there is any proxy information, add a message to log
if test -n "${phost}${pport}${puid}${ppasswd}"; then
printf "Proxy configuration being used.\n" >> ${log}
# If there is a valued system proxy variable, print a warning to log
if test -n "${http_proxy}"; then
printf "WARNING: The proxy file is " >> ${log}
printf "empty but http_proxy isn't.\n" >> ${log}
fi
fi
} }
function tryWget(){ function tryWget(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment