proxy_settings.sh: explicitly add host address to no_proxy 56/23556/1 accepted/tizen/common/20140918.092515 accepted/tizen/ivi/20140919.141649 accepted/tizen/ivi/20140919.153037 submit/tizen/20140918.012348 submit/tizen_common/20140918.063712 submit/tizen_ivi/20140918.063703
authorRafal Krypa <r.krypa@samsung.com>
Fri, 27 Jun 2014 09:49:31 +0000 (11:49 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Fri, 27 Jun 2014 09:49:31 +0000 (11:49 +0200)
Current no_proxy setting works fine for default qemu network settings.
It contains network 10.0.0.0/16, which should include host address and
enable communication with host.
But it doesn't work for zypper. Zypper respects no_proxy variable, but
accepts only host addresses, not network addresses. To enable local zypper
repo from host, it is required to add host address to no_proxy explicitly.

Change-Id: I0ee189ea952d9c7b12f169abd7bd0364d5a30aee
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
filesystem/etc/profile.d/proxy_setting.sh

index 762e9ee..1a3a02b 100755 (executable)
@@ -17,4 +17,11 @@ __proxy=`cmd_get ftp_proxy`
 __proxy=`cmd_get socks_proxy`
 [ -n "${__proxy}" ] && "socks_proxy=socks://${__proxy}/"
 
-export "no_proxy=localhost,127.0.0.1/8,10.0.0.0/16"
+no_proxy="localhost,127.0.0.1/8,10.0.0.0/16"
+
+# Work around for bug in zypper, not handling netmasks in no_proxy.
+# Exlicitly add default gateway ip to no_proxy.
+__gw=`cmd_get ip | cut -d: -f3`
+[ -n "${__gw}" ] && no_proxy="${no_proxy},${__gw}"
+
+export no_proxy