diff options
Diffstat (limited to 'bin/sugar-session')
-rwxr-xr-x | bin/sugar-session | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index 7eaa8f1..1ac4d21 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -220,6 +220,7 @@ def export_proxy_settings(): the http_proxy environment variable if set, but don't use the Gnome (GConf) proxy settings. """ + yumtmp = open("/tmp/yum.conf.mod", "w") client = gconf.client_get_default() if client.get_string('/system/proxy/mode') != 'manual': return @@ -228,13 +229,15 @@ def export_proxy_settings(): http_port = client.get_int('/system/http_proxy/port') use_auth = client.get_bool('/system/http_proxy/use_authentication') proxy_info = '%s:%d' % (http_host, http_port) + yumtmp.write('proxy=http://%s/\n' % proxy_info) if use_auth: user = client.get_string('/system/http_proxy/authentication_user') pword = client.get_string('/system/http_proxy/authentication_password') proxy_info = '%s:%s@%s' % (user, pword, proxy_info) - + yumtmp.write('proxy_username %s\n' % user) + yumtmp.write('proxy_password %s\n' % pword) os.environ['http_proxy'] = 'http://%s/' % proxy_info - + yumtmp.close() def main(): try: |