Browse Source

Alejandro Mery <amery@geeks.cl>:

we don't want -list telling stuff about proxy :)


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2100 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Alejandro Mery 21 years ago
parent
commit
efb4704634
1 changed files with 37 additions and 26 deletions
  1. +37
    -26
      scripts/Download

+ 37
- 26
scripts/Download

@ -189,29 +189,6 @@ if [ $notimeout -eq 1 ] ; then
curl_options="$curl_options -y 60 -Y 1 --connect-timeout 300"
fi
if [ -f download/Proxy ]; then
proxy="`cat download/Proxy`"
if [ "$proxy" ]; then
test $this_is_the_2nd_run -eq 0 && \
echo "INFO: Setting proxy to $proxy."
curl_options="$curl_options --proxy $proxy"
else
echo "INFO: Empty proxy definition... removing download/Proxy."
rm download/Proxy
fi
fi
if [ -f download/Proxy-auth ]; then
proxyauth="`cat download/Proxy-auth`"
if [ "$proxyauth" ]; then
test $this_is_the_2nd_run -eq 0 && \
echo "INFO: Setting proxy authentication information."
curl_options="$curl_options --proxy-user $proxyauth"
else
echo "INFO: No proxy-auth information... removing download/Proxy-auth."
rm download/Proxy-auth
fi
fi
# cksum_chk filename cksum origfile
#
# This function verifies the checksum. If it fails it renames the file
@ -786,10 +763,44 @@ all() {
rm -f src/down.$$.lst
}
# Do mirror detection only once
# Things to do only for downloading
#
if [ $this_is_the_2nd_run = 0 -a "${1:0:5}" != "-list" -a $checkonly = 0 ]; then
detect_mirror
if [ "${1:0:5}" != "-list" -a $checkonly = 0 ]; then
# Set proxy information
if [ -f download/Proxy ]; then
proxy="`cat download/Proxy`"
if [ "$proxy" ]; then
curl_options="$curl_options --proxy $proxy"
else
echo "INFO: No proxy information... removing download/Proxy."
rm download/Proxy
fi
fi
if [ -f download/Proxy-auth ]; then
proxyauth="`cat download/Proxy-auth`"
if [ "$proxyauth" ]; then
curl_options="$curl_options --proxy-user $proxyauth"
else
echo "INFO: No proxy-auth information... removing download/Proxy-auth."
rm download/Proxy-auth
fi
fi
# Thing to do only once
#
if [ $this_is_the_2nd_run = 0 ]; then
# am i using a proxy?
# -- say i'm doing it even when i already did ;-)
if [ "$proxy" ]; then
echo "INFO: Setting proxy to $proxy."
fi
if [ "$proxyauth" ]; then
echo "INFO: Setting proxy authentication information."
fi
# do mirror detection
detect_mirror
fi
fi
case "$1" in

Loading…
Cancel
Save