diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-08-10 04:47:16 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-08-10 04:47:16 +0000 |
commit | 6e20fc4743a590ecb88fa01355ec32cdb868d7f5 (patch) | |
tree | be474ab200dd1be515f376a127a35831acd44ac1 /image.py | |
parent | 222efc4bbadfcd1fa02b3d3a09f1c73a2125dfab (diff) | |
download | anaconda-6e20fc4743a590ecb88fa01355ec32cdb868d7f5.tar.gz anaconda-6e20fc4743a590ecb88fa01355ec32cdb868d7f5.tar.xz anaconda-6e20fc4743a590ecb88fa01355ec32cdb868d7f5.zip |
we need to set currentDisc at the beginning to avoid prompting for disc2 when we install from the dvd
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -133,7 +133,7 @@ class CdromInstallMethod(ImageInstallMethod): try: discNum = getDiscNums(f.readline().strip()) except: - discNum = 0 + discNum = [ 0 ] f.close() if (newStamp == timestamp and arch == iutil.getArch() and @@ -234,8 +234,23 @@ class CdromInstallMethod(ImageInstallMethod): (self.device, tree) = string.split(url, "/", 1) self.messageWindow = messageWindow self.progressWindow = progressWindow - self.currentDisc = [ 1 ] self.loopbackFile = None + + # figure out which disc is in. if we fail for any reason, + # assume it's just disc1. + if os.access("/mnt/source/.discinfo", os.O_RDONLY): + try: + f = open("/mnt/source/.discinfo") + f.readline() # stamp + f.readline() # descr + f.readline() # arch + self.currentDisc = getDiscNums(f.readline().strip()) + f.close() + except: + self.currentDisc = [ 1 ] + else: + self.currentDisc = [ 1 ] + ImageInstallMethod.__init__(self, "/" + tree, rootPath) class NfsInstallMethod(ImageInstallMethod): |