Update the macros based on changes from upstream repo

Ref: b2f1034f76

Resolves: #16
This commit is contained in:
Lukas Vrabec 2019-11-01 17:25:21 +01:00
parent 3597bdb094
commit 0c284fe6fc
No known key found for this signature in database
GPG Key ID: 47201AC42F29CE06

View File

@ -76,13 +76,15 @@ fi \
# %selinux_relabel_pre [-s <policytype>] # %selinux_relabel_pre [-s <policytype>]
%selinux_relabel_pre("s:") \ %selinux_relabel_pre("s:") \
. /etc/selinux/config \ if %{_sbindir}/selinuxenabled; then \
_policytype=%{-s*} \ . /etc/selinux/config \
if [ -z "${_policytype}" ]; then \ _policytype=%{-s*} \
_policytype="targeted" \ if [ -z "${_policytype}" ]; then \
fi \ _policytype="targeted" \
if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ fi \
[ -f %{_file_context_file_pre} ] || cp -f %{_file_context_file} %{_file_context_file_pre} \ if [ "${SELINUXTYPE}" = "${_policytype}" ]; then \
[ -f %{_file_context_file_pre} ] || cp -f %{_file_context_file} %{_file_context_file_pre} \
fi \
fi \ fi \
%{nil} %{nil}