diff --git a/anaconda b/anaconda
index b17d0e5..e5a226d 100755
--- a/anaconda
+++ b/anaconda
@@ -729,14 +729,22 @@ if __name__ == "__main__":
if opts.proxy:
anaconda.proxy = opts.proxy
+ # Set environmental variables to be used by pre/post scripts
+ log.debug("PROXY=%s", opts.proxy)
+ os.environ['PROXY'] = anaconda.proxy
+ # For wget/curl use
+ os.environ['http_proxy'] = anaconda.proxy
+
if opts.proxyAuth:
filename = opts.proxyAuth
ret = open(filename, "r").readlines()
os.unlink(filename)
if opts.updateSrc:
anaconda.updateSrc = opts.updateSrc
--
1.7.7.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-11-2012, 12:22 AM
Jon Stanley
set PROXY environmental variables (#800388)
On Tue, Apr 10, 2012 at 6:01 PM, Brian C. Lane <bcl@redhat.com> wrote:
> pre/post scripts can now use the following environmental variables:
> PROXY or http_proxy
> PROXY_USER
> PROXY_PASSWORD
What about https and ftp_proxy variables? I think that it makes sense
to set the variable for whatever installation method the user has
configured in the kickstart file. Of course, there's really no way to
know anything else, and it'd be up to the user to somehow set that
themselves.
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-11-2012, 03:00 PM
Chris Lumens
set PROXY environmental variables (#800388)
> diff --git a/anaconda b/anaconda
> index b17d0e5..e5a226d 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -729,14 +729,22 @@ if __name__ == "__main__":
> if opts.proxy:
> anaconda.proxy = opts.proxy
>
> + # Set environmental variables to be used by pre/post scripts
> + log.debug("PROXY=%s", opts.proxy)
Hm, is there a difference in environment variables that are defined but
empty, and ones that are not defined at all? If so, perhaps this is
going to trip something up.
- Chris
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-13-2012, 06:01 PM
"Brian C. Lane"
set PROXY environmental variables (#800388)
From: "Brian C. Lane" <bcl@redhat.com>
pre/post scripts can now use the following environmental variables:
PROXY
PROXY_USER
PROXY_PASSWORD
When no proxy user or password is set the _USER and/or _PASSWORD
variables will be set to a blank string.
diff --git a/anaconda b/anaconda
index b17d0e5..c2ebe76 100755
--- a/anaconda
+++ b/anaconda
@@ -738,6 +738,11 @@ if __name__ == "__main__":
if len(ret) == 2:
anaconda.proxyPassword = ret[1].rstrip()
+ # Set environmental variables to be used by pre/post scripts
+ os.environ["PROXY"] = anaconda.proxy
+ os.environ["PROXY_USER"] = anaconda.proxyUsername or ""
+ os.environ["PROXY_PASSWORD"] = anaconda.proxyPassword or ""
+
if opts.updateSrc:
anaconda.updateSrc = opts.updateSrc
--
1.7.7.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
04-13-2012, 06:03 PM
"Brian C. Lane"
set PROXY environmental variables (#800388)
On Fri, Apr 13, 2012 at 11:01:51AM -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@redhat.com>
>
> pre/post scripts can now use the following environmental variables:
> PROXY
> PROXY_USER
> PROXY_PASSWORD
>
> When no proxy user or password is set the _USER and/or _PASSWORD
> variables will be set to a blank string.
>
> Resolves: rhbz#800388
> ---
> anaconda | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/anaconda b/anaconda
> index b17d0e5..c2ebe76 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -738,6 +738,11 @@ if __name__ == "__main__":
> if len(ret) == 2:
> anaconda.proxyPassword = ret[1].rstrip()
>
> + # Set environmental variables to be used by pre/post scripts
> + os.environ["PROXY"] = anaconda.proxy
> + os.environ["PROXY_USER"] = anaconda.proxyUsername or ""
> + os.environ["PROXY_PASSWORD"] = anaconda.proxyPassword or ""
> +
> if opts.updateSrc:
> anaconda.updateSrc = opts.updateSrc
>
> --
> 1.7.7.6
I think we're better off limiting what we set and letting the pre/post
script pick them up and copy them to whatever their specific apps need.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list