summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-04-19 15:10:03 -0400
committerjim-p <jimp@pfsense.org>2016-04-19 15:10:51 -0400
commitb4afe9df05da5275b4d1a4b6a799ba28583434c4 (patch)
tree63462e7a2248ebebe2730766498d06e891b8574b /src/usr
parent47a6b4cbd1af426614bd826287e1689bc241ab16 (diff)
downloadpfsense-b4afe9df05da5275b4d1a4b6a799ba28583434c4.zip
pfsense-b4afe9df05da5275b4d1a4b6a799ba28583434c4.tar.gz
Setup HTTP_PROXY environment variable for pkg when it's called from the GUI and also for pfSense-upgrade
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 051c0b8..b5b7e5a 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -732,6 +732,16 @@ pid_file="/var/run/$(basename $0).pid"
logfile="/cf/conf/upgrade_log.txt"
stdout='/dev/null'
+# Setup proxy settings
+HTTP_PROXY=$(/usr/local/sbin/read_xml_tag.sh string system/proxyurl)
+if [ "${HTTP_PROXY}" != "" ]; then
+ HTTP_PROXY_PORT=$(/usr/local/sbin/read_xml_tag.sh string system/proxyport)
+ if [ "${HTTP_PROXY_PORT}" != "" ]; then
+ HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}"
+ fi
+ export HTTP_PROXY
+fi
+
# pkg should not ask for confirmations
export ASSUME_ALWAYS_YES=true
OpenPOWER on IntegriCloud