Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > f04274ea514f1d52d66a92b7b8e741c0 > scriptlet

freeipa-server-selinux-2.0.1-2.fc15.i686.rpm

PREIN

/bin/sh
# Save the content state so we can restore it when/if this package is removed
if [ -s /etc/selinux/config ]; then
       . /etc/selinux/config
       FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts
       if [ "${SELINUXTYPE}" == targeted -a -f ${FILE_CONTEXT} ]; then \
               cp -f ${FILE_CONTEXT} ${FILE_CONTEXT}.freeipa
       fi
fi

PREUN

/bin/sh
# On the last uninstallation prepare to restore state
if [ $1 = 0 ]; then
if [ -s /etc/selinux/config ]; then
       . /etc/selinux/config
       FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts
       if [ "${SELINUXTYPE}" == targeted -a -f ${FILE_CONTEXT} ]; then \
               cp -f ${FILE_CONTEXT} ${FILE_CONTEXT}.freeipa
       fi
fi
fi

POSTIN

/bin/sh
# Insert our provide SELinux policy
semodule -s targeted -i /usr/share/selinux/targeted/ipa_kpasswd.pp /usr/share/selinux/targeted/ipa_httpd.pp /usr/share/selinux/targeted/ipa_dogtag.pp
. /etc/selinux/config
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts
selinuxenabled
if [ $? == 0  -a "${SELINUXTYPE}" == targeted -a -f ${FILE_CONTEXT}.freeipa ]; then
       fixfiles -C ${FILE_CONTEXT}.freeipa restore
       rm -f ${FILE_CONTEXT}.freeipa
fi

POSTUN

/bin/sh
# On the last uninstallation remove our SELinux policy and restore the state
if [ $1 = 0 ]; then
semodule -s targeted -r ipa_kpasswd ipa_httpd ipa_dogtag
. /etc/selinux/config
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts
selinuxenabled
if [ $? == 0  -a "${SELINUXTYPE}" == targeted -a -f ${FILE_CONTEXT}.freeipa ]; then
       fixfiles -C ${FILE_CONTEXT}.freeipa restore
       rm -f ${FILE_CONTEXT}.freeipa
fi
fi