diff options
author | Matt Wilson <msw@redhat.com> | 1999-10-22 19:32:38 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-10-22 19:32:38 +0000 |
commit | 1fd6585406744fec328b38bd62957ec063b2452f (patch) | |
tree | 745ba23bd7c4d8abfbaa51b6bf9e1585532c478b /todo.py | |
parent | a29f74c35f97793fe68ce93387a97051890243b4 (diff) | |
download | anaconda-1fd6585406744fec328b38bd62957ec063b2452f.tar.gz anaconda-1fd6585406744fec328b38bd62957ec063b2452f.tar.xz anaconda-1fd6585406744fec328b38bd62957ec063b2452f.zip |
merge from 6.1 branch
Diffstat (limited to 'todo.py')
-rw-r--r-- | todo.py | 53 |
1 files changed, 38 insertions, 15 deletions
@@ -296,6 +296,8 @@ class ToDo: self.bootdisk = 0 self.liloImages = {} self.liloDevice = None + self.liloLinear = 0 + self.liloAppend = None arch = iutil.getArch () if arch == "sparc": self.silo = SiloInstall (self) @@ -489,27 +491,24 @@ class ToDo: keys.sort() for mntpoint in keys: (device, fsystem, format) = self.mounts[mntpoint] - isys.makeDevInode(device, '/tmp/' + device) if fsystem == "swap": continue elif fsystem == "ext2": try: - os.mkdir (self.instPath + mntpoint) - except: - pass - try: - isys.mount( '/tmp/' + device, self.instPath + mntpoint) + iutil.mkdirChain(self.instPath + mntpoint) + isys.makeDevInode(device, '/tmp/' + device) + isys.mount('/tmp/' + device, + self.instPath + mntpoint) + os.remove( '/tmp/' + device); except SystemError, (errno, msg): self.intf.messageWindow(_("Error"), _("Error mounting %s: %s") % (device, msg)) - os.remove( '/tmp/' + device); try: os.mkdir (self.instPath + '/proc') except: pass - isys.mount('/proc', self.instPath + '/proc', 'proc') def makeFilesystems(self, createSwap = 1, createFs = 1): @@ -632,6 +631,7 @@ class ToDo: self.setFdDevice () for mntpoint in keys: (dev, fs, reformat) = self.mounts[mntpoint] + iutil.mkdirChain(self.instPath + mntpoint) if (mntpoint == '/'): f.write (format % ( '/dev/' + dev, mntpoint, fs, 'defaults', 1, 1)) else: @@ -661,14 +661,21 @@ class ToDo: # skip comments if fields and fields[0][0] == '#': continue + if not fields: continue # all valid fstab entries have 6 fields - if not len (fields) < 4 and len (fields) <= 6: - if fields and (fields[2] == "ext2" or fields[2] == "swap") \ - and fields[3] != "noauto": - format = 0 - # XXX always format swap. - if fields[2] == "swap": format = 1 - fstab[fields[1]] = (fields[0][5:], fields[2], format) + if len (fields) < 4 or len (fields) > 6: continue + + if fields[2] != "ext2" and fields[2] != "swap": continue + if string.find(fields[3], "noauto") != -1: continue + if (fields[0][0:7] != "/dev/hd" and + fields[0][0:7] != "/dev/sd" and + fields[0][0:8] != "/dev/rd/" and + fields[0][0:9] != "/dev/ida/"): continue + + format = 0 + # XXX always format swap. + if fields[2] == "swap": format = 1 + fstab[fields[1]] = (fields[0][5:], fields[2], format) return fstab def writeLanguage(self): @@ -738,6 +745,14 @@ class ToDo: ## lilo.read (self.instPath + '/etc/lilo.conf') ## elif not self.liloDevice: return + if os.access (self.instPath + '/etc/lilo.conf', os.R_OK): + os.rename(self.instPath + '/etc/lilo.conf', + self.instPath + '/etc/lilo.conf.rpmsave') + + if os.access (self.instPath + '/etc/lilo.conf', os.R_OK): + os.rename(self.instPath + '/etc/lilo.conf', + self.instPath + '/etc/lilo.conf.rpmsave') + (bootpart, boothd) = self.getLiloOptions() if (type((1,)) == type(bootpart)): (kind, self.liloDevice) = bootpart @@ -752,6 +767,8 @@ class ToDo: lilo.addEntry("install", "/boot/boot.b") lilo.addEntry("prompt") lilo.addEntry("timeout", "50") + if self.liloLinear: + lilo.addEntry("linear") smpInstalled = (self.hdList.has_key('kernel-smp') and self.hdList['kernel-smp'].selected) @@ -799,6 +816,10 @@ class ToDo: sl.addEntry("read-only") sl.addEntry("root", '/dev/' + rootDev) kernelFile = "/boot/vmlinuz" + kernelTag + + if self.liloAppend: + sl.addEntry('append', '"%s"' % (self.liloAppend,)) + lilo.addImage ("image", kernelFile, sl) for (label, device) in otherList: @@ -1130,6 +1151,8 @@ class ToDo: todo.zeroMbr = todo.instClass.zeroMbr (where, linear, append) = todo.instClass.getLiloInformation() todo.liloDevice = where + todo.liloLinear = linear + todo.liloAppend = append for (mntpoint, (dev, fstype, reformat)) in todo.instClass.fstab: todo.addMount(dev, mntpoint, fstype, reformat) |