summaryrefslogtreecommitdiffstats
path: root/storage/__init__.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-04-23 11:40:28 -0400
committerChris Lumens <clumens@redhat.com>2009-04-24 10:10:41 -0400
commit24db63f0eca7db8aa03774cd096dcd82537a3d8e (patch)
tree954fe640fe9f4481410277f086516b46b784a957 /storage/__init__.py
parent2be188f5f59a940b56a474f7d74d9d70e85663ba (diff)
downloadanaconda-24db63f0eca7db8aa03774cd096dcd82537a3d8e.tar.gz
anaconda-24db63f0eca7db8aa03774cd096dcd82537a3d8e.tar.xz
anaconda-24db63f0eca7db8aa03774cd096dcd82537a3d8e.zip
Add more filesystem checks.
Enforce that certain mountpoints must be on a native Linux filesystem, and that certain directories must not be on their own filesystems.
Diffstat (limited to 'storage/__init__.py')
-rw-r--r--storage/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/__init__.py b/storage/__init__.py
index 46125e8d1..8ef305c49 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -765,6 +765,9 @@ class Storage(object):
warnings = []
errors = []
+ mustbeonlinuxfs = ['/', '/var', '/tmp', '/usr', '/home', '/usr/share', '/usr/lib']
+ mustbeonroot = ['/bin','/dev','/sbin','/etc','/lib','/root', '/mnt', 'lost+found', '/proc']
+
filesystems = self.fsset.mountpoints
root = self.fsset.rootDevice
swaps = self.fsset.swapDevices
@@ -880,6 +883,14 @@ class Storage(object):
"it will significantly improve performance for "
"most installations."))
+ for (mountpoint, dev) in filesystems.items():
+ if mountpoint in mustbeonroot:
+ errors.append(_("This mount point is invalid. The %s directory must "
+ "be on the / file system.") % mountpoint)
+
+ if mountpoint in mustbeonlinuxfs and (not dev.format.mountable or not dev.format.linuxNative):
+ errors.append(_("The mount point %s must be on a linux file system.") % mountpoint)
+
return (errors, warnings)
def isProtected(self, device):