bugfix - was wrong
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 31 Jan 2011 12:26:41 +0000 (13:26 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 31 Jan 2011 12:26:41 +0000 (13:26 +0100)
config.planetlab/bootstrapfs.post

index 5149e9e..a5d79e9 100644 (file)
@@ -28,7 +28,12 @@ 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)
-    chroot ${vdir} rpm -e --nodeps ${rpm}
+    if [ -z "$selinuxrpm" ] ; then 
+       echo WARNING : could not turn off SElinux
+    else
+       echo "Force-removing package ${selinuxrpm}" 
+       chroot ${vdir} rpm -e --nodeps ${selinuxrpm}
+    fi
 fi
 
 # Disable splaying of cron.