summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-03-17 17:14:13 +0000
committerJeremy Katz <katzj@redhat.com>2004-03-17 17:14:13 +0000
commit2b164ed5b90d28c61a668294c3fa6f89ff101498 (patch)
tree357cab24ba5ce108c4073cae6fdf82fc9ab65ed7 /packages.py
parentd4894876e8aefed4b56953da992893f3f2d8cf74 (diff)
downloadanaconda-2b164ed5b90d28c61a668294c3fa6f89ff101498.tar.gz
anaconda-2b164ed5b90d28c61a668294c3fa6f89ff101498.tar.xz
anaconda-2b164ed5b90d28c61a668294c3fa6f89ff101498.zip
fix-up raid and lvm labeling
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/packages.py b/packages.py
index f944be4a1..1b51f43a0 100644
--- a/packages.py
+++ b/packages.py
@@ -1248,18 +1248,22 @@ def setFileCons(instPath):
if flags.selinux:
log("setting SELinux contexts for anaconda created files")
- # ugh, this is ugly
- def addpath(x): return "/var/lib/rpm/" + x
- rpmfiles = os.listdir(instPath + "/var/lib/rpm")
- rpmfiles = map(addpath, rpmfiles)
-
files = ["/etc/rpm/platform", "/etc/rpm/macros",
"/etc/lilo.conf", "/etc/lilo.conf.anaconda",
"/etc/mtab", "/etc/fstab", "/etc/resolv.conf",
"/etc/modprobe.conf", "/etc/modprobe.conf~",
"/var/log/wtmp", "/var/run/utmp",
- "/dev/log",
- "/var/lib/rpm", "/"] + rpmfiles
+ "/dev/log", "/var/lib/rpm", "/", "/etc/raidtab"]
+
+ # ugh, this is ugly
+ for dir in ("/var/lib/rpm", "/etc/lvm"):
+ def addpath(x): return dir + "/" + x
+
+ if not os.path.isdir(instPath + dir):
+ continue
+ dirfiles = os.listdir(instPath + dir)
+ files.extend(map(addpath, dirfiles))
+
# blah, to work in a chroot, we need to actually be inside so the
# regexes will work