aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-11-18 11:32:32 -0500
committerBill Nottingham <notting@redhat.com>2010-11-18 11:32:32 -0500
commit25979e03da1ed03ebf0d8900ab6d4bb64019735d (patch)
treeb03d65c70fd9bcb5696acfe9290f6f42c18c7af4 /systemd
parent7f934772b4c9c66f96e6c05a220b46ac89a43600 (diff)
downloadinitscripts-25979e03da1ed03ebf0d8900ab6d4bb64019735d.tar
initscripts-25979e03da1ed03ebf0d8900ab6d4bb64019735d.tar.gz
initscripts-25979e03da1ed03ebf0d8900ab6d4bb64019735d.tar.bz2
initscripts-25979e03da1ed03ebf0d8900ab6d4bb64019735d.tar.xz
initscripts-25979e03da1ed03ebf0d8900ab6d4bb64019735d.zip
Don't relabel random files; this shouldn't happen any more.
Also, merge blocks on identical conditions.
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/fedora-autorelabel13
1 files changed, 1 insertions, 12 deletions
diff --git a/systemd/fedora-autorelabel b/systemd/fedora-autorelabel
index f5e4db29..6148cd26 100755
--- a/systemd/fedora-autorelabel
+++ b/systemd/fedora-autorelabel
@@ -60,21 +60,10 @@ relabel_selinux() {
[ -z "${cmdline}" ] && cmdline=$(cat /proc/cmdline)
-# Clean up SELinux labels
-if [ -n "$SELINUX_STATE" ]; then
- restorecon /etc/mtab /etc/ld.so.cache /etc/blkid/blkid.tab /etc/resolv.conf >/dev/null 2>&1
-fi
-
-# If relabeling, relabel mount points.
-if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then
- if strstr "$cmdline" autorelabel || [ -f /.autorelabel ] ; then
- restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1
- fi
-fi
-
# Check to see if a full relabel is needed
if [ -n "$SELINUX_STATE" -a "$READONLY" != "yes" ]; then
if strstr "$cmdline" autorelabel || [ -f /.autorelabel ] ; then
+ restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1
relabel_selinux
fi
else