[blivet:master 2/2] Put previously removed mountExistingSystem() into osinstall.py.

mulhern amulhern at redhat.com
Mon Mar 9 17:16:30 UTC 2015


It was incorrectly removed in commit 65f95ac603853d6362b2c3da498b68ed8b54cd27.

Previous commit added back in a bunch of stuff that had been painstakingly
removed in commits:
6564c5f95dde3018ecf3ff04f3dd69994fe377a6
576cb575583ae893213735bcbbd302e242ca5027
b057deebcfdd7986f8feb78d87c456bd7ad76459

The only change from the version that was removed from blivet/__init__.py
in commit 65f95ac603853d6362b2c3da498b68ed8b54cd27 is that _sysroot
becomes getSysroot(), like other methods that were moved from
__init__.py to osintall.py.
---
 blivet/osinstall.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/blivet/osinstall.py b/blivet/osinstall.py
index b2fd9e1..8c9fb3d 100644
--- a/blivet/osinstall.py
+++ b/blivet/osinstall.py
@@ -1126,3 +1126,22 @@ def storageInitialize(storage, ksdata, protected):
                                          if d.name not in ksdata.ignoredisk.ignoredisk]
             log.debug("onlyuse is now: %s", ",".join(ksdata.ignoredisk.onlyuse))
 
+def mountExistingSystem(fsset, rootDevice, readOnly=None):
+    """ Mount filesystems specified in rootDevice's /etc/fstab file. """
+    rootPath = getSysroot()
+
+    readOnly = "ro" if readOnly else ""
+
+    if rootDevice.protected and os.path.ismount("/mnt/install/isodir"):
+        util.mount("/mnt/install/isodir",
+                   rootPath,
+                   fstype=rootDevice.format.type,
+                   options="bind")
+    else:
+        rootDevice.setup()
+        rootDevice.format.mount(chroot=rootPath,
+                                mountpoint="/",
+                                options=readOnly)
+
+    fsset.parseFSTab()
+    fsset.mountFilesystems(rootPath=rootPath, readOnly=readOnly, skipRoot=True)
-- 
2.1.0



More information about the anaconda-patches mailing list