sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux
Otherwise sed will ignore the /etc/sysconfig/selinux --> /etc/selinux/config symlink and you will end up with two files and selinux will remain enforcing after a reboot!
Since I just fell into this one:
ReplyDeletesed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux
Otherwise sed will ignore the /etc/sysconfig/selinux --> /etc/selinux/config symlink and you will end up with two files and selinux will remain enforcing after a reboot!