diff options
author | Chris Lumens <clumens@redhat.com> | 2008-10-22 16:16:13 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-10-22 16:16:42 -0400 |
commit | 42d9449ee6c23d33fb3af89d392b11e072151c36 (patch) | |
tree | ae19c3f728fac02d5427b4ce98a941cf04955df3 /anaconda | |
parent | 47632834efec87c8d9c3e658827137191052b697 (diff) | |
download | anaconda-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-x | anaconda | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -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: |