diff options
author | Mike Fulbright <msf@redhat.com> | 2000-05-02 21:05:28 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-05-02 21:05:28 +0000 |
commit | 1cc96d0393256eafd6d90069ac82ded8126720fa (patch) | |
tree | 13702dab7fdfd142384f0f138d1a0dea86f64d6b | |
parent | 9809364d6d00b68bc826ae23f6f90cb99315fad3 (diff) | |
download | anaconda-1cc96d0393256eafd6d90069ac82ded8126720fa.tar.gz anaconda-1cc96d0393256eafd6d90069ac82ded8126720fa.tar.xz anaconda-1cc96d0393256eafd6d90069ac82ded8126720fa.zip |
more fixes for --onpart
-rw-r--r-- | fstab.py | 19 | ||||
-rw-r--r-- | text.py | 13 | ||||
-rw-r--r-- | textw/partitioning_text.py | 1 | ||||
-rw-r--r-- | todo.py | 31 |
4 files changed, 27 insertions, 37 deletions
@@ -43,13 +43,18 @@ def isValidExt2(device): return 0 class Fstab: - def attemptPartitioning(self, partitions, clearParts): + def attemptPartitioning(self, partitions, prefstab, clearParts): attempt = [] swapCount = 0 +# fstab = [] +# for (mntpoint, dev, fstype, reformat, size) in self.extraFilesystems: +# fstab.append ((dev, mntpoint)) + fstab = [] - for (mntpoint, dev, fstype, reformat, size) in self.extraFilesystems: - fstab.append ((dev, mntpoint)) + if prefstab != None: + for (mntpoint, (dev, fstype, reformat)) in prefstab: + fstab.append ((dev, mntpoint)) ddruid = self.createDruid(fstab = fstab, ignoreBadDrives = 1) @@ -80,7 +85,7 @@ class Fstab: # configure kickstart requested ext2 filesystem options for (mntpoint, size, maxsize, grow, device, fsopts) in partitions: if fsopts != None: - self.fstab.setfsOptions (mntpoint, fsopts) + self.setfsOptions (mntpoint, fsopts) return ddruid else: @@ -704,6 +709,12 @@ class Fstab: self.waitWindow = waitWindow self.messageWindow = messageWindow self.badBlockCheck = 0 + + # + # extraFilesystems used for upgrades when /etc/fstab is read as + # well as for adding fstab entries for removable media + # Should NOT be used by kickstart any more + # self.extraFilesystems = [] self.existingRaid = [] self.ddruid = self.createDruid() @@ -212,15 +212,12 @@ class InstallPathWindow: todo.upgrade = 1 showScreen = 0 -# -# todo.fstab is now initialized in Todo.__init__() -# -# if not showScreen: -# todo.fstab = NewtFstab(todo.setupFilesystems, -# todo.serial, 0, 0, -# todo.intf.waitWindow, -# todo.intf.messageWindow) + # this is (probably) the first place todo.fstab gets created if not showScreen: + todo.fstab = NewtFstab(todo.setupFilesystems, + todo.serial, 0, 0, + todo.intf.waitWindow, + todo.intf.messageWindow) return INSTALL_NOOP if (todo.upgrade): diff --git a/textw/partitioning_text.py b/textw/partitioning_text.py index 993c543ae..820dffdbf 100644 --- a/textw/partitioning_text.py +++ b/textw/partitioning_text.py @@ -107,6 +107,7 @@ class AutoPartitionWindow: if todo.instClass.partitions or todo.instClass.fstab: druid = \ todo.fstab.attemptPartitioning(todo.instClass.partitions, + todo.instClass.fstab, todo.instClass.clearParts) if not druid: @@ -289,10 +289,6 @@ class ToDo: log.open (serial, reconfigOnly, test) - # try to get --onpart working again -# from fstab import NewtFstab -# self.fstab = NewtFstab(self.setupFilesystems,serial,0,0, -# self.intf.waitWindow,self.intf.messageWindow) self.fstab = None # liloDevice, liloLinear, liloAppend are initialized form the @@ -370,25 +366,6 @@ class ToDo: def setTimezoneInfo(self, timezone, asUtc = 0, asArc = 0): self.timezone = (timezone, asUtc, asArc) -# -# apparently this is cruft -# -# def addMount(self, device, location, fsystem, reformat = 1): -# if fsystem == "swap": -# ufs = 0 -# try: -# isys.makeDevInode(device, '/tmp/' + device) -# except: -# pass -# try: -# ufs = isys.checkUFS ('/tmp/' + device) -# except: -# pass -# if not ufs: -# location = "swap" -# reformat = 1 -# self.mounts[location] = (device, fsystem, reformat) - def writeLanguage(self): f = open(self.instPath + "/etc/sysconfig/i18n", "w") f.write(str (self.language)) @@ -822,8 +799,12 @@ class ToDo: todo.silo.setDevice(where) todo.silo.setAppend(append) - for (mntpoint, (dev, fstype, reformat)) in todo.instClass.fstab: - todo.fstab.addMount(dev, mntpoint, fstype, reformat) +# +# only important for ks - not needed here for general case so +# commenting out for now... +# +# for (mntpoint, (dev, fstype, reformat)) in todo.instClass.fstab: +# todo.fstab.addMount(dev, mntpoint, fstype, reformat) todo.users = [] if todo.instClass.rootPassword: |