[PATCH] Clean up handling of /proc, /sys, /dev/pts, /dev/shm entries.

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

 



Just drop them when parsing /etc/fstab -- that way we can create
them before mounting the system the same way for upgrade, rescue,
and install.
---
 storage/__init__.py   |    9 ++++-----
 storage/formats/fs.py |    1 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index a28e921..63fa622 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1080,14 +1080,13 @@ class FSSet(object):
         self.cryptTab = None
         self.blkidTab = None
         self.active = False
-        self._tmpfs = None
+        self._devpts = None
         self._sysfs = None
         self._proc = None
         self._devshm = None
 
     @property
     def sysfs(self):
-        self._sysfs = self.mountpoints.get("/sys")
         if not self._sysfs:
             self._sysfs = NoDevice(format=getFormat("sysfs",
                                                     device="sys",
@@ -1096,7 +1095,6 @@ class FSSet(object):
 
     @property
     def devpts(self):
-        self._devpts = self.mountpoints.get("/dev/pts")
         if not self._devpts:
             self._devpts = NoDevice(format=getFormat("devpts",
                                                      device="devpts",
@@ -1105,7 +1103,6 @@ class FSSet(object):
 
     @property
     def proc(self):
-        self._proc = self.mountpoints.get("/proc")
         if not self._proc:
             self._proc = NoDevice(format=getFormat("proc",
                                                    device="proc",
@@ -1114,7 +1111,6 @@ class FSSet(object):
 
     @property
     def devshm(self):
-        self._devshm = self.mountpoints.get("/dev/shm")
         if not self._devshm:
             self._devshm = NoDevice(format=getFormat("tmpfs",
                                                      device="tmpfs",
@@ -1233,6 +1229,9 @@ class FSSet(object):
                     device.format = getFormat("bind",
                                               device=device.path,
                                               exists=True)
+                elif mountpoint in ("/proc", "/sys", "/dev/shm", "/dev/pts"):
+                    # drop these now -- we'll recreate later
+                    continue
                 else:
                     # nodev filesystem -- preserve or drop completely?
                     format = getFormat(fstype)
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 2cc35bb..65641be 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -981,6 +981,7 @@ class NoDevFS(FS):
     def __init__(self, *args, **kwargs):
         FS.__init__(self, *args, **kwargs)
         self.exists = True
+        self.device = self.type
 
     def _setDevice(self, devspec):
         self._device = devspec
-- 
1.6.0.6

_______________________________________________
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