aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-05-09 19:16:13 +0000
committerBill Nottingham <notting@redhat.com>2005-05-09 19:16:13 +0000
commit5fb824e35f59615799767cb99e87948d1e672acf (patch)
tree32e3cce5a61628af3cb3e8dd84bdb561320699fe /rc.d
parentbf5a34c7e4f40a96538b45087e4c548c9c153e89 (diff)
downloadinitscripts-5fb824e35f59615799767cb99e87948d1e672acf.tar
initscripts-5fb824e35f59615799767cb99e87948d1e672acf.tar.gz
initscripts-5fb824e35f59615799767cb99e87948d1e672acf.tar.bz2
initscripts-5fb824e35f59615799767cb99e87948d1e672acf.tar.xz
initscripts-5fb824e35f59615799767cb99e87948d1e672acf.zip
if you boot without selinux support, make sure things are
automaitically relabelled later (<dwalsh@redhat.com>)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit13
1 files changed, 8 insertions, 5 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 708b0dc5..2ab733a2 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -490,11 +490,14 @@ if [ -x /sbin/quotaon ]; then
fi
# Check to see if a full relabel is needed
-if [ -n "$SELINUX" -a -f /.autorelabel ]; then
- relabel_selinux
-fi
-if [ -n "$SELINUX" ] && strstr "$cmdline" autorelabel ; then
- relabel_selinux
+if [ -n "$SELINUX" ]; then
+ if [ -f /.autorelabel ] || strstr "$cmdline" autorelabel ; then
+ relabel_selinux
+ fi
+else
+ if [ -d /etc/selinux ]; then
+ [ -f /.autorelabel ] || touch /.autorelabel
+ fi
fi