3 # vim: ts=4 sw=4 sts=4 et :
5 # Handle the occurance where SELINUX is actually disabled
6 if [ `grep SELINUX=permissive /etc/selinux/config` ]; then
7 # make sure that the filesystem is properly labelled.
8 # it could be not fully labeled correctly if it was just switched
9 # from disabled, the autorelabel misses some things
10 # skip relabelling on /dev as it will generally throw errors
11 restorecon -R -e /dev /
13 # enable enforcing mode from the very start
16 # configure system for enforcing mode on next boot
17 sed -i 's/SELINUX=permissive/SELINUX=enforcing/' /etc/selinux/config
19 sed -i 's/SELINUX=disabled/SELINUX=permissive/' /etc/selinux/config
22 echo "*******************************************"
23 echo "** SYSTEM REQUIRES A RESTART FOR SELINUX **"
24 echo "*******************************************"