summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-06-21 02:42:21 +0000
committerMatt Wilson <msw@redhat.com>2001-06-21 02:42:21 +0000
commit8c1b5a5d9aaea7eea546358a3971d00bedec3f6a (patch)
tree5b2482c5c9e305068a1c050daced65c563964939 /fsset.py
parent72ac06ea4a04823417bac5776f807949e6ce8a7e (diff)
downloadanaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.tar.gz
anaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.tar.xz
anaconda-8c1b5a5d9aaea7eea546358a3971d00bedec3f6a.zip
re-enabled the postaction on install classes, fixed the fsset support for disk switching (hard to test, broken packaging)
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/fsset.py b/fsset.py
index b7f1ac731..56a21e190 100644
--- a/fsset.py
+++ b/fsset.py
@@ -495,6 +495,32 @@ class FileSystemSet:
entry.mountpoint, msg))
sys.exit(0)
+ def filesystemSpace(self, chroot='/'):
+ space = []
+ # XXX limit to ext[23] etc?
+ for entry in self.entries:
+ if not entry.isMounted():
+ continue
+ path = "%s/%s" % (chroot, entry.mountpoint)
+ try:
+ space.append((entry.mountpoint, isys.fsSpaceAvailable(path)))
+ except SystemError:
+ pass
+
+ def spaceSort(a, b):
+ (m1, s1) = a
+ (m2, s2) = b
+
+ if (s1 > s2):
+ return -1
+ elif s1 < s2:
+ return 1
+
+ return 0
+
+ space.sort(spaceSort)
+ return space
+
def umountFilesystems(self, instPath, ignoreErrors = 0):
# XXX remove special case
try: