summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-10-22 16:16:13 -0400
committerChris Lumens <clumens@redhat.com>2008-10-22 16:16:42 -0400
commit42d9449ee6c23d33fb3af89d392b11e072151c36 (patch)
treeae19c3f728fac02d5427b4ce98a941cf04955df3 /anaconda
parent47632834efec87c8d9c3e658827137191052b697 (diff)
downloadanaconda-42d9449ee6c23d33fb3af89d392b11e072151c36.tar.gz
anaconda-42d9449ee6c23d33fb3af89d392b11e072151c36.tar.xz
anaconda-42d9449ee6c23d33fb3af89d392b11e072151c36.zip
Make sure we handle the /tmp/method file for FTP correctly (#467753).
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda21
1 files changed, 15 insertions, 6 deletions
diff --git a/anaconda b/anaconda
index 1202b9a72..e26552615 100755
--- a/anaconda
+++ b/anaconda
@@ -412,11 +412,17 @@ def getInstClass():
# ftp installs pass the password via a file in /tmp so
# ps doesn't show it
-def expandFTPMethod(opts):
- filename = opts.method[1:]
- opts.method = open(filename, "r").readline()
- opts.method = opts.method[:len(opts.method) - 1]
- os.unlink(filename)
+def expandFTPMethod(str):
+ ret = None
+
+ try:
+ filename = str[1:]
+ ret = open(filename, "r").readline()
+ ret = ret[:len(ret) - 1]
+ os.unlink(filename)
+ return ret
+ except:
+ return None
def runVNC():
# dont run vncpassword if in test mode
@@ -640,13 +646,16 @@ if __name__ == "__main__":
if opts.method:
if opts.method[0] == '@':
- expandFTPMethod(opts)
+ opts.method = expandFTPMethod(opts.method)
anaconda.setMethodstr(opts.method)
else:
anaconda.methodstr = None
if opts.stage2:
+ if opts.stage2[0] == '@':
+ opts.stage2 = expandFTPMethod(opts.stage2)
+
anaconda.stage2 = opts.stage2
if opts.liveinst: