From 5d837b2d13998f039262a895ef4d18be2d3067f1 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Aug 22 2011 20:30:00 +0000 Subject: Do not do preinstall if there is not previous install --- diff --git a/selinux-policy.spec b/selinux-policy.spec index e97cc3a..47fe4ef 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -190,7 +190,7 @@ if [ $? = 0 -a "${SELINUXTYPE}" = %1 -a -f ${FILE_CONTEXT}.pre ]; then \ fi; %define preInstall() \ -if [ -s /etc/selinux/config ]; then \ +if [ $1 -ne 1 ] && [ -s /etc/selinux/config ]; then \ . %{_sysconfdir}/selinux/config; \ FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \ if [ "${SELINUXTYPE}" = %1 -a -f ${FILE_CONTEXT} ]; then \