Dominique Leuenberger wrote:
On 1/21/2009 at 2:03 PM, "Dominique Leuenberger"
wrote: On 1/21/2009 at 2:00 PM, Dave Plater
wrote: Dominique Leuenberger wrote:
bash (env0) yast2 (env0.1) yast2-doSomething (env0.1.1) zypper (env0.2)
you as user in bash modify env0, yast will only have access to env0.1 (not a problem of yast, it's the way process spawning deals with environments)
Just a very simple example showing you that this is not possible: create a bash script like:
---- snip ---- #!/bin/bash echo Testvar has value $testvar unset testvar echo Testvar has value $testvar
---- snip ----
No in your bash:
export testvar="Test data" sh myscript.sh echo Testvar has value $testvar
Testvar has value Test data Testvar has value Testvar has value Test Data
(the first two echos come from the script.. so it inherited testvar from your bash. it unsets the variable afterwards and you can confirm this with the echo which does no longer have a value. As soon as the script is over, you get back to your console where you can verify that the changed variable is not given back to the parent shell.
I hope this helps to show the way environments are handled.
Dominique
Ok I think I have the idea, I turned off proxy in yast logged into tty2 as root and the variable was not set, I turned on proxy in yast and variable was still not set in tty2, I logged out of tty and then in again and the variable was set. From this I conclude I should only use environment variables in programs for static things and rather use a config file for things that might need to be changed on the fly. Logging out and in to a console is easy but a pain with a gui. I suppose I will just have to control my speed by changing squid.conf and restarting squid as I have for a while now. Thanks for your patience with me. Regards Dave P -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org