[PATCH 2/2] Add more filesystem checks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enforce that certain mountpoints must be on a native Linux filesystem, and
that certain directories must not be on their own filesystems.
---
 storage/__init__.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 5b6e0f6..6c69fb2 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -761,6 +761,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
@@ -876,6 +879,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):
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux