diff options
author | Erik Troan <ewt@redhat.com> | 1999-12-08 16:13:00 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-12-08 16:13:00 +0000 |
commit | 730aa2a87c13acfa76992cf7044d18bea2b23398 (patch) | |
tree | 3f0131b76031a7d34bfb3ae0690aa273c8cba895 /iw | |
parent | 1240ea70538805c0d90ad05649af5e306453cb21 (diff) | |
download | anaconda-730aa2a87c13acfa76992cf7044d18bea2b23398.tar.gz anaconda-730aa2a87c13acfa76992cf7044d18bea2b23398.tar.xz anaconda-730aa2a87c13acfa76992cf7044d18bea2b23398.zip |
began isolating ddruid, fstab, and raid stuff into separate fstab.py
Diffstat (limited to 'iw')
-rw-r--r-- | iw/format.py | 16 | ||||
-rw-r--r-- | iw/installpath.py | 29 | ||||
-rw-r--r-- | iw/rootpartition.py | 42 |
3 files changed, 23 insertions, 64 deletions
diff --git a/iw/format.py b/iw/format.py index 153bf310e..332f7da48 100644 --- a/iw/format.py +++ b/iw/format.py @@ -15,28 +15,24 @@ class FormatWindow (InstallWindow): ics.readHTML ("format") def getScreen (self): - def toggled (widget, (todo, mount)): + def toggled (widget, (todo, dev)): if widget.get_active (): - (dev, fstype, format) = todo.mounts[mount] - todo.mounts[mount] = (dev, fstype, 1) + todo.fstab.setFormatFilesystem(dev, 1) else: - (dev, fstype, format) = todo.mounts[mount] - todo.mounts[mount] = (dev, fstype, 0) + todo.fstab.setFormatFilesystem(dev, 0) def check (widget, todo): todo.badBlockCheck = widget.get_active () box = GtkVBox (FALSE, 10) - mounts = self.todo.mounts.keys () - mounts.sort () + mounts = self.todo.fstab.mountList() - for mount in mounts: - (dev, fstype, format) = self.todo.mounts[mount] + for (mount, dev, fstype, format, size) in mounts: if fstype == "ext2": checkButton = GtkCheckButton ("/dev/%s %s" % (dev, mount)) checkButton.set_active (format) - checkButton.connect ("toggled", toggled, (self.todo, mount)) + checkButton.connect ("toggled", toggled, (self.todo, dev)) box.pack_start (checkButton) vbox = GtkVBox (FALSE, 10) diff --git a/iw/installpath.py b/iw/installpath.py index 2f2caed67..4be55f634 100644 --- a/iw/installpath.py +++ b/iw/installpath.py @@ -207,24 +207,21 @@ class InstallPathWindow (InstallWindow): box.pack_start(table, FALSE) - if self.todo.expert: - hbox = GtkHBox (FALSE) - if not InstallPathWindow.__dict__.has_key("fdisk"): - fdiskState = 0 - else: - fdiskState = InstallPathWindow.fdisk.get_active() + hbox = GtkHBox (FALSE) + if not InstallPathWindow.__dict__.has_key("fdisk"): + fdiskState = 0 + else: + fdiskState = InstallPathWindow.fdisk.get_active() - InstallPathWindow.fdisk = GtkCheckButton (_("Use fdisk")) - InstallPathWindow.fdisk.set_active(fdiskState) + InstallPathWindow.fdisk = GtkCheckButton (_("Use fdisk")) + InstallPathWindow.fdisk.set_active(fdiskState) - align = GtkAlignment () - align.add (InstallPathWindow.fdisk) - align.set (0.0, 0.0, 0.0, 0.0) - hbox.pack_start (box, TRUE) - hbox.pack_start (align, FALSE) - box = hbox - else: - InstallPathWindow.fdisk = None + align = GtkAlignment () + align.add (InstallPathWindow.fdisk) + align.set (0.0, 0.0, 0.0, 0.0) + hbox.pack_start (box, TRUE) + hbox.pack_start (align, FALSE) + box = hbox self.toggled (installButton, INSTALL) self.toggled (self.upgradeButton, UPGRADE) diff --git a/iw/rootpartition.py b/iw/rootpartition.py index 5b9b33093..4618a0f1b 100644 --- a/iw/rootpartition.py +++ b/iw/rootpartition.py @@ -51,7 +51,7 @@ class PartitionWindow (InstallWindow): return 0 self.todo.ddruid.save () - self.todo.makeFilesystems (createFs = 0) + self.fstab.turnOnSwap(self.intf.waitWindow) self.todo.ddruidAlreadySaved = 1 PartitionWindow.swapon = 1 @@ -60,7 +60,7 @@ class PartitionWindow (InstallWindow): return 1 def getNext (self): - self.todo.ddruid.next () + self.todo.fstab.runDruidFinished() if not self.skippedScreen: win = self.todo.ddruid.getConfirm () @@ -74,47 +74,15 @@ class PartitionWindow (InstallWindow): bootPartition = None rootPartition = None - fstab = self.todo.ddruid.getFstab () - self.todo.resetMounts() - for (partition, mount, fsystem, size) in fstab: - self.todo.addMount(partition, mount, fsystem) - if mount == "/": - rootPartition = partition - elif mount == "/boot": - bootPartition = partition - - (drives, raid) = self.todo.ddruid.partitionList() - - liloBoot = None - if not self.checkSwap (): return PartitionWindow - for (mount, device, fstype, raidType, start, size, makeup) in raid: - self.todo.addMount(device, mount, fstype) - - if mount == "/": - rootPartition = device - elif mount == "/boot": - bootPartition = device - - if (bootPartition): - liloBoot = bootPartition - else: - liloBoot = rootPartition - - if liloBoot and len (liloBoot) >= 2 and liloBoot[0:2] == "md": - self.todo.setLiloLocation(("raid", liloBoot)) - self.todo.instClass.addToSkipList("lilo") - return None def enableCallback (self, value): self.ics.setNextEnabled (value) def getScreen (self): - self.todo.ddruid.setCallback (self.enableCallback) - if self.todo.getSkipPartitioning(): self.skippedScreen = 1 fstab = self.todo.ddruid.getFstab () @@ -129,10 +97,8 @@ class PartitionWindow (InstallWindow): return AutoPartitionWindow return None - self.bin = GtkFrame (None, _obj = self.todo.ddruid.getWindow ()) - self.bin.set_shadow_type (SHADOW_NONE) - self.todo.ddruid.edit () - + return self.todo.fstab.runDruid(self.enableCallback) + return self.bin class AutoPartitionWindow(InstallWindow): |