summaryrefslogtreecommitdiffstats
path: root/rescue.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-02-22 16:10:30 +0000
committerJeremy Katz <katzj@redhat.com>2006-02-22 16:10:30 +0000
commit927b103b564bfae4c81ebe17416ea8b9d5a9f022 (patch)
treec6f2318f3e7497fa891d437959d4d8d9332b375a /rescue.py
parent6772b5b0970eb8e41bf5ef389331001a082495f0 (diff)
downloadanaconda-927b103b564bfae4c81ebe17416ea8b9d5a9f022.tar.gz
anaconda-927b103b564bfae4c81ebe17416ea8b9d5a9f022.tar.xz
anaconda-927b103b564bfae4c81ebe17416ea8b9d5a9f022.zip
2006-02-22 Jeremy Katz <katzj@redhat.com>
* rescue.py (runRescue): Mount /selinux in the chroot
Diffstat (limited to 'rescue.py')
-rw-r--r--rescue.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/rescue.py b/rescue.py
index 8d9ed8104..a7a8c80ab 100644
--- a/rescue.py
+++ b/rescue.py
@@ -357,7 +357,15 @@ def runRescue(instPath, mountroot, id):
log.error("Error enabling swap")
# now that dev is udev, bind mount the installer dev there
- isys.mount("/dev", "/mnt/sysimage/dev", bindMount = 1)
+ isys.mount("/dev", "%s/dev" %(instPath,), bindMount = 1)
+
+ # and /selinux too
+ if flags.selinux and os.path.isdir("%s/selinux" %(instPath,)):
+ try:
+ isys.mount("/selinux", "%s/selinux" %(instPath,),
+ "selinuxfs")
+ except Exception, e:
+ log.error("error mounting selinuxfs: %s" %(e,))
# set a library path to use mounted fs
os.environ["LD_LIBRARY_PATH"] = "/lib:/usr/lib:/usr/X11R6/lib:/lib:/mnt/usr/lib:/mnt/sysimage/lib:/mnt/sysimage/usr/lib:/mnt/sysimage/usr/X11R6/lib"