From: Thierry Parmentelat Date: Mon, 31 Jan 2011 13:50:15 +0000 (+0100) Subject: yet another attempt .. X-Git-Tag: 5.0-rc18~20 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6be4672a8cccfa9b80cdf9dca7b7acf43c41ce71;p=build.git yet another attempt .. --- diff --git a/config.planetlab/bootstrapfs.post b/config.planetlab/bootstrapfs.post index a5d79e90..e26a1d75 100644 --- a/config.planetlab/bootstrapfs.post +++ b/config.planetlab/bootstrapfs.post @@ -26,15 +26,17 @@ chroot ${vdir} /sbin/chkconfig vservers-default off || : chroot ${vdir} /sbin/chkconfig vprocunhide on || : # turn OFF selinux if set -if [ -f ${vdir}/etc/sysconfig/selinux ] ; then - selinuxrpm=$(chroot ${vdir} rpm -qf /etc/sysconfig/selinux) +# this may happen accidentally if you mention too much stuff in bootstrapfs.pkgs +for file in /etc/sysconfig/selinux /sbin/load_policy; do + [ -f ${vdir}/${file} ] || { echo "$file not found in $vdir - fine" ; continue; } + selinuxrpm=$(chroot ${vdir} rpm -qf ${file}) if [ -z "$selinuxrpm" ] ; then - echo WARNING : could not turn off SElinux + echo "SElinux: warning : could not rpm for file $file" else echo "Force-removing package ${selinuxrpm}" chroot ${vdir} rpm -e --nodeps ${selinuxrpm} fi -fi +done # Disable splaying of cron. echo > ${vdir}/etc/sysconfig/crontab