summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-08-30 16:06:21 +0000
committerJeremy Katz <katzj@redhat.com>2006-08-30 16:06:21 +0000
commitf0b83a6cf9d25597c211561a09984c9381512b35 (patch)
tree3b548b1df7e0e85e10e0f583820b18a39ed432f4 /fsset.py
parent967669680e87a5a3b69019fd1d21b484a108209d (diff)
downloadanaconda-f0b83a6cf9d25597c211561a09984c9381512b35.tar.gz
anaconda-f0b83a6cf9d25597c211561a09984c9381512b35.tar.xz
anaconda-f0b83a6cf9d25597c211561a09984c9381512b35.zip
2006-08-30 Jeremy Katz <katzj@redhat.com>
* packages.py (setFileCons): Fix checking of chroot so file contexts get set properly * fsset.py: Fix setting context on mountpoints for real
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/fsset.py b/fsset.py
index c0e18bb89..0459397e8 100644
--- a/fsset.py
+++ b/fsset.py
@@ -193,9 +193,8 @@ class FileSystemType:
return
iutil.mkdirChain("%s/%s" %(instroot, mountpoint))
if flags.selinux:
- log.info("setting SELinux context for mountpoint %s" %(mountpoint,))
- isys.resetFileContext(mountpoint, instroot)
-
+ ret = isys.resetFileContext(mountpoint, instroot)
+ log.info("set SELinux context for mountpoint %s to %s" %(mountpoint, ret))
isys.mount(device, "%s/%s" %(instroot, mountpoint),
fstype = self.getName(),
readOnly = readOnly, bindMount = bindMount)
@@ -1036,8 +1035,8 @@ class AutoFileSystem(PsudoFileSystem):
return
iutil.mkdirChain("%s/%s" %(instroot, mountpoint))
if flags.selinux:
- log.info("setting SELinux context for mountpoint %s" %(mountpoint,))
- isys.resetFileContext(mountpoint, instroot)
+ ret = isys.resetFileContext(mountpoint, instroot)
+ log.info("set SELinux context for mountpoint %s to %s" %(mountpoint, ret))
for fs in getFStoTry (device):
try:
@@ -1916,15 +1915,17 @@ class FileSystemSetEntry:
# FIXME: we really should migrate before turnOnFilesystems.
# but it's too late now
if (self.migrate == 1) and (self.origfsystem is not None):
- self.origfsystem.mount(device, "%s/%s" % (chroot, self.mountpoint),
+ self.origfsystem.mount(device, "%s" % (self.mountpoint,),
readOnly = readOnly,
bindMount = isinstance(self.device,
- BindMountDevice))
+ BindMountDevice),
+ instroot = chroot)
else:
- self.fsystem.mount(device, "%s/%s" % (chroot, self.mountpoint),
+ self.fsystem.mount(device, "%s" % (self.mountpoint,),
readOnly = readOnly,
bindMount = isinstance(self.device,
- BindMountDevice))
+ BindMountDevice),
+ instroot = chroot)
self.mountcount = self.mountcount + 1