From f721a05c4490f534aa2f729528135947181926ac Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Fri, 24 Sep 1999 14:39:13 +0000 Subject: needed to: 1) reread ddruid partition table after writing stuff 2) close all file descriptors referring to the disk before running fdisk -- this means killing any existing ddruid object --- textw/partitioning.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'textw') diff --git a/textw/partitioning.py b/textw/partitioning.py index 1f6b51ad8..1320be6b7 100644 --- a/textw/partitioning.py +++ b/textw/partitioning.py @@ -42,6 +42,8 @@ class ManualPartitionWindow: driveNames.sort (isys.compareDrives) choices = [] + haveEdited = 0 + for device in driveNames: descrip = drives[device] if descrip: @@ -62,6 +64,8 @@ class ManualPartitionWindow: (_("Back"), "back") ], width = 50) if button != "done" and button != "back": + haveEdited = 1 + todo.ddruid = None # free our fd's to the hard drive device = driveNames[choice] screen.suspend () if os.access("/sbin/fdisk", os.X_OK): @@ -82,12 +86,21 @@ class ManualPartitionWindow: pass screen.resume () + if haveEdited: + drives = todo.drives.available ().keys () + drives.sort (isys.compareDrives) + + fstab = [] + for mntpoint, (dev, fstype, reformat) in todo.mounts.items (): + fstab.append ((dev, mntpoint)) + + todo.ddruid = fsedit(0, drives, fstab, todo.zeroMbr) + if button == "back": return INSTALL_BACK return INSTALL_OK - class AutoPartitionWindow: def __call__(self, screen, todo): fstab = [] -- cgit