- Add <proxy>...</proxy> only if https proxy is specified
- Tested successfully in windriver (SB07)
- Solves part of the AAF installation issues
Change-Id: I9f6dd8a7a9173b541b9872293d0c6ad705506dc3
Issue-ID: AAF-420
Signed-off-by: Marco Platania <platania@research.att.com>
+EOF
+
+if [[ $(cat /opt/config/https_proxy.txt) != "no_proxy" ]]; then
+ HTTPS_PROXY_HOST=$(cat /opt/config/https_proxy.txt | cut -d ':' -f1)
+ HTTPS_PROXY_PORT=$(cat /opt/config/https_proxy.txt | cut -d ':' -f2)
+
+ cat >> settings.xml << EOF
<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
- <host>$(cat /opt/config/http_proxy.txt | cut -d ':' -f1)</host>
- <port>$(cat /opt/config/http_proxy.txt | cut -d ':' -f2)</port>
+ <host>$HTTPS_PROXY_HOST</host>
+ <port>$HTTPS_PROXY_PORT</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
<proxy>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
<proxy>
<protocol>https</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<protocol>https</protocol>
<username>proxyuser</username>
<password>proxypass</password>
- <host>$(cat /opt/config/https_proxy.txt | cut -d ':' -f1)</host>
- <port>$(cat /opt/config/https_proxy.txt | cut -d ':' -f2)</port>
+ <host>$HTTPS_PROXY_HOST</host>
+ <port>$HTTPS_PROXY_PORT</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
+EOF
+fi
+
+cat >> settings.xml << EOF
<!-- servers
| This is a list of authentication profiles, keyed by the server-id used within the system.
<!-- servers
| This is a list of authentication profiles, keyed by the server-id used within the system.