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 | |
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
-rw-r--r-- | dispatch.py | 2 | ||||
-rw-r--r-- | packages.py | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/dispatch.py b/dispatch.py index 4cb04a0ea..fc727f265 100644 --- a/dispatch.py +++ b/dispatch.py @@ -152,7 +152,7 @@ installSteps = [ "id.desktop", "id.grpset", "id.instClass", "instPath")), ("writexconfig", writeXConfiguration, ("id", "instPath")), ("writeksconfig", writeKSConfiguration, ("id", "instPath")), - ("setfilecon", setFileCons, ("instPath",)), + ("setfilecon", setFileCons, ("instPath","id.partitions")), ("dopostaction", doPostAction, ("id", "instPath")), ("methodcomplete", doMethodComplete, ("method",)), ("complete", ()), 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): |