From: Rafal Krypa Date: Fri, 27 Jun 2014 09:49:31 +0000 (+0200) Subject: proxy_settings.sh: explicitly add host address to no_proxy X-Git-Tag: submit/tizen/20140918.012348^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbb5018682605348eedb08730fc907dffaa1f32a;p=platform%2Fadaptation%2Femulator%2Fsystem-plugin-emulator.git proxy_settings.sh: explicitly add host address to no_proxy 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 --- diff --git a/filesystem/etc/profile.d/proxy_setting.sh b/filesystem/etc/profile.d/proxy_setting.sh index 762e9ee..1a3a02b 100755 --- a/filesystem/etc/profile.d/proxy_setting.sh +++ b/filesystem/etc/profile.d/proxy_setting.sh @@ -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