From: Milan Broz Date: Tue, 18 Aug 2015 12:18:26 +0000 (+0200) Subject: Do not use hardcoded paths in spec post section for selinux commands. X-Git-Tag: v9.1.0~354^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=28d3c4c92b8a092719e51576a07116c7592d8b76;p=ceph.git Do not use hardcoded paths in spec post section for selinux commands. Signed-off-by: Milan Broz --- diff --git a/ceph.spec.in b/ceph.spec.in index 9d63ee7af5b0..0c7eded0da79 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1143,9 +1143,9 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 /sbin/service ceph stop >/dev/null 2>&1 || : %endif -semodule -n -i %{_datadir}/selinux/packages/ceph.pp -if /usr/sbin/selinuxenabled ; then - /usr/sbin/load_policy +%{_sbindir}/semodule -n -i %{_datadir}/selinux/packages/ceph.pp +if %{_sbindir}/selinuxenabled ; then + %{_sbindir}/load_policy %relabel_files fi @@ -1163,9 +1163,9 @@ if [ $1 -eq 0 ]; then %else /sbin/service ceph stop >/dev/null 2>&1 || : %endif - semodule -n -r ceph - if /usr/sbin/selinuxenabled ; then - /usr/sbin/load_policy + %{_sbindir}/semodule -n -r ceph + if %{_sbindir}/selinuxenabled ; then + %{_sbindir}/load_policy %relabel_files fi; %if 0%{?_with_systemd}