diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/portsnap/phttpget/phttpget.c | 2 | ||||
-rw-r--r-- | usr.sbin/portsnap/portsnap/portsnap.sh | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/portsnap/phttpget/phttpget.c b/usr.sbin/portsnap/phttpget/phttpget.c index 64d983d..6845505 100644 --- a/usr.sbin/portsnap/phttpget/phttpget.c +++ b/usr.sbin/portsnap/phttpget/phttpget.c @@ -126,6 +126,8 @@ readenv(void) char *proxy_auth_pass = NULL; env_HTTP_PROXY = getenv("HTTP_PROXY"); + if (env_HTTP_PROXY == NULL) + env_HTTP_PROXY = getenv("http_proxy"); if (env_HTTP_PROXY != NULL) { if (strncmp(env_HTTP_PROXY, "http://", 7) == 0) env_HTTP_PROXY += 7; diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 8904aea..4ce7155 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -347,8 +347,8 @@ fetch_pick_server_init() { # Generate a random seed for use in picking mirrors. If HTTP_PROXY # is set, this will be used to generate the seed; otherwise, the seed # will be random. - if [ -n "${HTTP_PROXY}" ]; then - RANDVALUE=`sha256 -qs "${HTTP_PROXY}" | + if [ -n "${HTTP_PROXY}${http_proxy}" ]; then + RANDVALUE=`sha256 -qs "${HTTP_PROXY}${http_proxy}" | tr -d 'a-f' | cut -c 1-9` else |