summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-09-03 15:50:28 -0400
committerChris Lumens <clumens@redhat.com>2009-09-30 11:59:17 -0400
commitd8670a7400b2aa737fb35a441895ba19192b09a8 (patch)
tree3659198b1c1da4b3e376c832909f14488ab1cb2e /anaconda
parent47dac0c6f0207c11021d25c3de072907aeb1170e (diff)
downloadanaconda-d8670a7400b2aa737fb35a441895ba19192b09a8.tar.gz
anaconda-d8670a7400b2aa737fb35a441895ba19192b09a8.tar.xz
anaconda-d8670a7400b2aa737fb35a441895ba19192b09a8.zip
Pass the proxy config information to stage2.
We pass the URL and port as the --proxy= argument, and any authentication information through /tmp/proxy. This file will be removed by stage2. The reason for this song-and-dance is so passwords aren't on the anaconda command line.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda17
1 files changed, 17 insertions, 0 deletions
diff --git a/anaconda b/anaconda
index 28e7a403c..8f6780748 100755
--- a/anaconda
+++ b/anaconda
@@ -193,6 +193,8 @@ def parseOptions():
# Network
op.add_option("--noipv4", action="store_true", default=False)
op.add_option("--noipv6", action="store_true", default=False)
+ op.add_option("--proxy")
+ op.add_option("--proxyAuth")
# Method of operation
op.add_option("--autostep", action="store_true", default=False)
@@ -425,6 +427,9 @@ class Anaconda:
self.platform = None
self.canReIPL = False
self.reIPLMessage = None
+ self.proxy = None
+ self.proxyUsername = None
+ self.proxyPassword = None
# *sigh* we still need to be able to write this out
self.xdriver = None
@@ -620,6 +625,18 @@ if __name__ == "__main__":
if opts.noipv6:
flags.useIPv6 = False
+ if opts.proxy:
+ anaconda.proxy = opts.proxy
+
+ if opts.proxyAuth:
+ filename = opts.proxyAuth
+ ret = open(filename, "r").readlines()
+ os.unlink(filename)
+
+ anaconda.proxyUsername = ret[0].rstrip()
+ if len(ret) == 2:
+ anaconda.proxyPassword = ret[1].rstrip()
+
if opts.updateSrc:
anaconda.updateSrc = opts.updateSrc