From: Thierry Parmentelat Date: Mon, 31 Jan 2011 12:18:04 +0000 (+0100) Subject: trying another approach to turning off selinux X-Git-Tag: 5.0-rc18~22 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1b81abda492ad9021227fd7da692bafc5c8cc78f;p=build.git trying another approach to turning off selinux the other one won't work as /etc/selinux/targeted is not installed sounds like even when selinux is turned off, this is required (to turn off the bloody thing, go figure) --- diff --git a/config.planetlab/bootstrapfs.post b/config.planetlab/bootstrapfs.post index 46acda31..5149e9e9 100644 --- a/config.planetlab/bootstrapfs.post +++ b/config.planetlab/bootstrapfs.post @@ -26,8 +26,10 @@ chroot ${vdir} /sbin/chkconfig vservers-default off || : chroot ${vdir} /sbin/chkconfig vprocunhide on || : # turn OFF selinux if set -selinuxconf=${vdir}/etc/sysconfig/selinux -[ -f ${selinuxconf} ] && sed -i -e 's,^SELINUX[ \t]*=.*$,SELINUX=disabled,' ${selinuxconf} +if [ -f ${vdir}/etc/sysconfig/selinux ] ; then + selinuxrpm=$(chroot ${vdir} rpm -qf /etc/sysconfig/selinux) + chroot ${vdir} rpm -e --nodeps ${rpm} +fi # Disable splaying of cron. echo > ${vdir}/etc/sysconfig/crontab