Bug #6149 ยป pkg-proxy.diff
src/etc/inc/pkg-utils.inc | ||
---|---|---|
109 | 109 |
"ASSUME_ALWAYS_YES" => "true" |
110 | 110 |
); |
111 | 111 | |
112 |
if (!empty($config['system']['proxyurl'])) { |
|
113 |
$http_proxy = $config['system']['proxyurl']; |
|
114 |
if (!empty($config['system']['proxyport'])) { |
|
115 |
$http_proxy .= ':' . $config['system']['proxyport']; |
|
116 |
} |
|
117 |
$pkg_env_vars['HTTP_PROXY'] = $http_proxy; |
|
118 |
} |
|
119 | ||
112 | 120 |
if ($g['platform'] == "nanobsd" || |
113 | 121 |
isset($config['system']['use_mfs_tmpvar'])) { |
114 | 122 |
$pkg_env_vars['PKG_DBDIR'] = '/root/var/db/pkg'; |
src/usr/local/sbin/pfSense-upgrade | ||
---|---|---|
732 | 732 |
logfile="/cf/conf/upgrade_log.txt" |
733 | 733 |
stdout='/dev/null' |
734 | 734 | |
735 |
# Setup proxy settings |
|
736 |
HTTP_PROXY=$(/usr/local/sbin/read_xml_tag.sh string system/proxyurl) |
|
737 |
if [ "${HTTP_PROXY}" != "" ]; then |
|
738 |
HTTP_PROXY_PORT=$(/usr/local/sbin/read_xml_tag.sh string system/proxyport) |
|
739 |
if [ "${HTTP_PROXY_PORT}" != "" ]; then |
|
740 |
HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}" |
|
741 |
fi |
|
742 |
export HTTP_PROXY |
|
743 |
fi |
|
744 | ||
735 | 745 |
# pkg should not ask for confirmations |
736 | 746 |
export ASSUME_ALWAYS_YES=true |
737 | 747 |