Philipp Haller schrieb am Thursday, den 12. December 2002: > Hello list, > > I am trying to cope with different network environments. I set up various schemes in >/etc/pcmcia/network.opts. This works fine. For one of those schemes I need to set >http_proxy. I tried the following (in /etc/pcmcia/network.opts): > # Extra stuff to do after setting up the interface > start_fn () { http_proxy="http://proxy1.rz.uni-karlsruhe.de:3128/" ; return; } > # Extra stuff to do before shutting down the interface > stop_fn () { http_proxy="" ; return; } > > But http_proxy won't be set. I tried putting "export " in front of "http_proxy" but >no luck. Is there a different place where I have to set http_proxy then? Of course >after switching schemes I want http_proxy to be unset.
This cannot possibly work. Every running program has its own copy of the environment variables. You are only setting http_proxy in the shell that is currently interpreting the network.opts file. You could try the following: Change the commands above to write the proxy to a file in the /etc directory. Then change the bash init file (eg. ~/.bashrc or profile or whatever) to set the proxy variable from this file. This will only work for newly started shells. Alternatively, always use a local proxy on your laptop and change its configuration to forward the requests to the real proxy. Walter -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]