diff options
author | Chris Lumens <clumens@redhat.com> | 2009-04-23 11:40:28 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-04-24 10:10:41 -0400 |
commit | 24db63f0eca7db8aa03774cd096dcd82537a3d8e (patch) | |
tree | 954fe640fe9f4481410277f086516b46b784a957 /storage/__init__.py | |
parent | 2be188f5f59a940b56a474f7d74d9d70e85663ba (diff) | |
download | anaconda-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__.py | 11 |
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): |