[wplug] Using System Vars

Jonathan Billings billings at negate.org
Thu Oct 16 10:01:20 EDT 2008


On Thu, Oct 16, 2008 at 09:09:06AM -0400, Weber, Lawrence A wrote:
> I have a system variable that I created with my http proxy info:
> http_proxy=http://.....
>  
> I put this in a shell config file so it is available to both root and my
> user account.  So far, so good.
>  
> Now I need to use the variable in yum.conf  so I set the line:
> proxy=$http_proxy
>  
> No good, error says it wants a url not ' '.
>  
> If I type in the full proxy info line it works.
>  
> Any ideas how to use a system variable in a config file?

Yum doesn't know anything about your shell's environment.  You'll have
to hard-code it in your yum.conf, or use some external method to keep
both your shell's start scripts and yum.conf in sync from the same
source. 

Not everything is a shell script in Linux or Unix, so you won't
automatically get variable expansion in any file that follows the
'variable=value' pattern.


-- 
Jonathan Billings <billings at negate.org>


More information about the wplug mailing list