From 2f877812ad4dde15b825bed82c602e800a1d35ef Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Fri, 22 Jun 2001 01:37:38 +0000 Subject: first pass at getting things in alignment for gui upgrades. Should only affect upgrades, not installs --- fstab.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'fstab.py') diff --git a/fstab.py b/fstab.py index 4e192def1..c130c4510 100644 --- a/fstab.py +++ b/fstab.py @@ -188,6 +188,24 @@ class Fstab: isys.mount('/proc', instPath + '/proc', 'proc') + def hasDirtyFilesystems(self): + if self.rootOnLoop(): + (rootDev, rootFs) = self.getRootDevice() + mountLoopbackRoot(rootDev, skipMount = 1) + dirty = isys.ext2IsDirty("loop1") + unmountLoopbackRoot(skipMount = 1) + if dirty: return 1 + + for entry in self.entries: + # XXX - multifsify, virtualize isdirty per fstype + if fsystem != "ext2": continue + if doFormat: continue + + if isys.ext2IsDirty(entry.device.getDevice()): return 1 + + return 0 + + def write(self, prefix): format = fstabFormatString -- cgit