Untitled diff

Created Diff never expires
4 removals
49 lines
4 additions
49 lines
[root@smithi014 ~]# rpm -q --scripts selinux-policy-targeted-3.13.1-102.el7_3.7.noarch
[root@smithi014 100]# rpm -q --scripts selinux-policy-targeted-3.13.1-102.el7_3.15.noarch
preinstall scriptlet (using /bin/sh):
preinstall scriptlet (using /bin/sh):


if [ $1 -ne 1 ] && [ -s /etc/selinux/config ]; then
if [ $1 -ne 1 ] && [ -s /etc/selinux/config ]; then
. /etc/selinux/config;
. /etc/selinux/config;
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts;
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts;
if [ "${SELINUXTYPE}" = targeted -a -f ${FILE_CONTEXT} ]; then
if [ "${SELINUXTYPE}" = targeted -a -f ${FILE_CONTEXT} ]; then
[ -f ${FILE_CONTEXT}.pre ] || cp -f ${FILE_CONTEXT} ${FILE_CONTEXT}.pre;
[ -f ${FILE_CONTEXT}.pre ] || cp -f ${FILE_CONTEXT} ${FILE_CONTEXT}.pre;
fi;
fi;
touch /etc/selinux/targeted/.rebuild;
touch /etc/selinux/targeted/.rebuild;
if [ -e /etc/selinux/targeted/.policy.sha512 ]; then
if [ -e /etc/selinux/targeted/.policy.sha512 ]; then
POLICY_FILE=`ls /etc/selinux/targeted/policy/policy.* | sort | head -1`
POLICY_FILE=`ls /etc/selinux/targeted/policy/policy.* | sort | head -1`
sha512=`sha512sum $POLICY_FILE | cut -d ' ' -f 1`;
sha512=`sha512sum $POLICY_FILE | cut -d ' ' -f 1`;
checksha512=`cat /etc/selinux/targeted/.policy.sha512`;
checksha512=`cat /etc/selinux/targeted/.policy.sha512`;
if [ "$sha512" == "$checksha512" ] ; then
if [ "$sha512" == "$checksha512" ] ; then
rm /etc/selinux/targeted/.rebuild;
rm /etc/selinux/targeted/.rebuild;
fi;
fi;
fi;
fi;
fi;
fi;
postinstall scriptlet (using /bin/sh):
postinstall scriptlet (using /bin/sh):
if [ -e /etc/selinux/targeted/modules/active/base.pp ]; then
if [ -e /etc/selinux/targeted/modules/active/base.pp ]; then
/usr/libexec/selinux/selinux-policy-migrate-local-changes.sh targeted
DONT_REBUILD=1 /usr/libexec/selinux/selinux-policy-migrate-local-changes.sh targeted
touch /etc/selinux/targeted/.rebuild
systemctl daemon-reexec
systemctl daemon-reexec
fi
fi


. /etc/selinux/config;
. /etc/selinux/config;
#TODO: (cd /etc/selinux/targeted/modules/active/modules; rm -f vbetool.pp l2tpd.pp shutdown.pp amavis.pp clamav.pp gnomeclock.pp nsplugin.pp matahari.pp xfs.pp kudzu.pp kerneloops.pp execmem.pp openoffice.pp ada.pp tzdata.pp hal.pp hotplug.pp howl.pp java.pp mono.pp moilscanner.pp gamin.pp audio_entropy.pp audioentropy.pp iscsid.pp polkit_auth.pp polkit.pp rtkit_daemon.pp ModemManager.pp telepathysofiasip.pp ethereal.pp passanger.pp qemu.pp qpidd.pp pyzor.pp razor.pp pki-selinux.pp phpfpm.pp consoletype.pp ctdbd.pp fcoemon.pp isnsd.pp rgmanager.pp corosync.pp aisexec.pp pacemaker.pp pkcsslotd.pp smstools.pp )
#TODO: (cd /etc/selinux/targeted/modules/active/modules; rm -f vbetool.pp l2tpd.pp shutdown.pp amavis.pp clamav.pp gnomeclock.pp nsplugin.pp matahari.pp xfs.pp kudzu.pp kerneloops.pp execmem.pp openoffice.pp ada.pp tzdata.pp hal.pp hotplug.pp howl.pp java.pp mono.pp moilscanner.pp gamin.pp audio_entropy.pp audioentropy.pp iscsid.pp polkit_auth.pp polkit.pp rtkit_daemon.pp ModemManager.pp telepathysofiasip.pp ethereal.pp passanger.pp qemu.pp qpidd.pp pyzor.pp razor.pp pki-selinux.pp phpfpm.pp consoletype.pp ctdbd.pp fcoemon.pp isnsd.pp rgmanager.pp corosync.pp aisexec.pp pacemaker.pp pkcsslotd.pp smstools.pp )
if [ -e /etc/selinux/targeted/.rebuild ]; then
if [ -e /etc/selinux/targeted/.rebuild ]; then
rm /etc/selinux/targeted/.rebuild;
rm /etc/selinux/targeted/.rebuild;
/usr/sbin/semodule -B -n -s targeted;
/usr/sbin/semodule -B -n -s targeted;
fi;
fi;
[ "${SELINUXTYPE}" == "targeted" ] && selinuxenabled && load_policy;
[ "${SELINUXTYPE}" == "targeted" ] && selinuxenabled && load_policy;
if [ $1 -eq 1 ]; then
if [ $1 -eq 1 ]; then
/sbin/restorecon -R /root /var/log /run /etc/passwd* /etc/group* /etc/*shadow* 2> /dev/null;
/sbin/restorecon -R /root /var/log /run /etc/passwd* /etc/group* /etc/*shadow* 2> /dev/null;
else
else


. /etc/selinux/config;
. /etc/selinux/config;
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts;
FILE_CONTEXT=/etc/selinux/targeted/contexts/files/file_contexts;
/usr/sbin/selinuxenabled;
/usr/sbin/selinuxenabled;
if [ $? = 0 -a "${SELINUXTYPE}" = targeted -a -f ${FILE_CONTEXT}.pre ]; then
if [ $? = 0 -a "${SELINUXTYPE}" = targeted -a -f ${FILE_CONTEXT}.pre ]; then
/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null;
/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null;
rm -f ${FILE_CONTEXT}.pre;
rm -f ${FILE_CONTEXT}.pre;
fi;
fi;
if /sbin/restorecon -e /run/media -R /root /var/log /var/run /etc/passwd* /etc/group* /etc/*shadow* 2> /dev/null;then
if /sbin/restorecon -e /run/media -R /root /var/log /var/run /etc/passwd* /etc/group* /etc/*shadow* 2> /dev/null;then
continue;
continue;
fi;
fi;
fi;
fi;
exit 0
exit 0