summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dispatch.py2
-rw-r--r--packages.py11
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):