From 547a899096639937bb0dee69a2b8ea03786c8b24 Mon Sep 17 00:00:00 2001 From: Greg Darke Date: Mon, 4 Feb 2008 21:00:27 +1100 Subject: [PATCH] Make the proxyconf script unset the environment variables if they are not needed --- proxyconf.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxyconf.sh b/proxyconf.sh index 261ffbe..5c49ada 100755 --- a/proxyconf.sh +++ b/proxyconf.sh @@ -4,18 +4,26 @@ if [ "$(sysconfig -q "HTTPEnable")" = "1" ]; then host="$(sysconfig -q "HTTPProxy")" port="$(sysconfig -q "HTTPPort")" echo "export http_proxy=\"http://${host}:${port}\"" +else + echo "unset http_proxy" fi if [ "$(sysconfig -q "HTTPSEnable")" = "1" ]; then host="$(sysconfig -q "HTTPSProxy")" port="$(sysconfig -q "HTTPSPort")" echo "export https_proxy=\"http://${host}:${port}\"" +else + echo "unset https_proxy" fi if [ "$(sysconfig -q "FTPEnable")" = "1" ]; then host="$(sysconfig -q "FTPProxy")" port="$(sysconfig -q "FTPPort")" echo "export ftp_proxy=\"http://${host}:${port}\"" +else + echo "unset ftp_proxy" fi if [ -n "${host}" ]; then no_proxy="$(sysconfig ExceptionsList | tr '\n' ',' | sed 's/,$//g')" echo "export no_proxy=\"${no_proxy}\"" +else + echo "unset no_proxy" fi -- 2.39.2