+
+# make sure we do not end up with an empty /selinux
+# libvirt gets all confused when that happens
+cd ${vdir}
+if [ -d selinux ] ; then
+ if [ "$(ls -A selinux)" ] ; then
+ echo "sliceimage.post: WARNING: ${vdir}/selinux is not empty - preserving"
+ else
+ echo "sliceimage.post: REMOVING empty ${vdir}/selinux"
+ rmdir selinux
+ fi
+fi
+cd -