proxy_settings.sh: modify parsing kernel cmdline for proxy options 55/23555/1
authorRafal Krypa <r.krypa@samsung.com>
Fri, 27 Jun 2014 09:46:14 +0000 (11:46 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Fri, 27 Jun 2014 09:46:14 +0000 (11:46 +0200)
commit10b2d405ed088a9e0ab8f74f90feafd2104e7540
treea4febcb0565b5542cdcca815adb20362ad8a3d7f
parentb2d2312089e4f28c6371a95e86bec8998a15f0f2
proxy_settings.sh: modify parsing kernel cmdline for proxy options

This changes script's behavior when a proxy option appears more than once
in the kernel command line. Previously only the last occurrence was parsed.
But this creates problem with how Tizen qemu passes these options. Proxy
settings are appended to the kernel command line based on gconf settings in
the hosts environment. When there is no global proxy set, qemu will always
append empty "http_proxy=". If a user wants to set proxy only for qemu, but
not for the entire system, he may try to manually add settings to cmdline.
But Tizen emulator will append empty settings after user settings,
overriding it.

This patch changes parsing of proxy settings to get only the first
occurrence, not the last. It enables a user to give his own proxy only for
the emulator.

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