[selinux-policy/f17] restorecon now exits with an error on a bad path so we don't want to show it if new labels are added

Miroslav Grepl mgrepl at fedoraproject.org
Tue May 29 09:44:07 UTC 2012


commit 8ec3a0de1de12958e224fe05063dc9621f723fb0
Author: Miroslav Grepl <mgrepl at redhat.com>
Date:   Tue May 29 11:40:50 2012 +0200

    restorecon now exits with an error on a bad path so we don't want to show it if new labels are added and files/dirs don't exist

 selinux-policy.spec |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/selinux-policy.spec b/selinux-policy.spec
index 8b41216..273a4b8 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -201,7 +201,7 @@ rm -f %{buildroot}/%{_sysconfigdir}/selinux/%1/modules/active/policy.kern
 FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \
 /usr/sbin/selinuxenabled; \
 if [ $? = 0  -a "${SELINUXTYPE}" = %1 -a -f ${FILE_CONTEXT}.pre ]; then \
-     /sbin/fixfiles -C ${FILE_CONTEXT}.pre restore; \
+     /sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null; \
      /sbin/restorecon -R /root /var/log /var/run /etc/passwd* /etc/group* 2> /dev/null; \
      rm -f ${FILE_CONTEXT}.pre; \
 fi;


More information about the scm-commits mailing list