diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-03-17 23:47:23 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-03-17 23:47:23 +0000 |
commit | 39bd2814fa96cf28848b01061ea8e86c7028e1aa (patch) | |
tree | 1a54cd0a7a227f0ca84dea7f077aba2627f67aef /packages.py | |
parent | ba814c3f9c0c8e588e94c0dbfc3328c4ac8de3b4 (diff) | |
download | anaconda-39bd2814fa96cf28848b01061ea8e86c7028e1aa.tar.gz anaconda-39bd2814fa96cf28848b01061ea8e86c7028e1aa.tar.xz anaconda-39bd2814fa96cf28848b01061ea8e86c7028e1aa.zip |
add our volume groups to the list of things relabeled
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages.py b/packages.py index 612e3097a..e4690c58f 100644 --- a/packages.py +++ b/packages.py @@ -1244,7 +1244,9 @@ def doPostInstall(method, id, intf, instPath): # FIXME: this is a huge gross hack. hard coded list of files # created by anaconda so that we can not be killed by selinux -def setFileCons(instPath): +def setFileCons(instPath, partitions): + import partRequests + if flags.selinux: log("setting SELinux contexts for anaconda created files") @@ -1255,8 +1257,13 @@ def setFileCons(instPath): "/var/log/wtmp", "/var/run/utmp", "/dev/log", "/var/lib/rpm", "/", "/etc/raidtab"] + vgs = [] + for entry in partitions.requests: + if isinstance(entry, partRequests.VolumeGroupRequestSpec): + vgs.append("/dev/%s" %(entry.volumeGroupName,)) + # ugh, this is ugly - for dir in ("/var/lib/rpm", "/etc/lvm", "/dev/mapper"): + for dir in ["/var/lib/rpm", "/etc/lvm", "/dev/mapper"] + vgs: def addpath(x): return dir + "/" + x if not os.path.isdir(instPath + dir): |