diff options
Diffstat (limited to 'selinux-refpolicy-arch.install')
-rw-r--r-- | selinux-refpolicy-arch.install | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/selinux-refpolicy-arch.install b/selinux-refpolicy-arch.install new file mode 100644 index 000000000000..3f2d80012937 --- /dev/null +++ b/selinux-refpolicy-arch.install @@ -0,0 +1,23 @@ +## arg 1: the new package version +## arg 2: the old package version + +post_install() { + cd /usr/share/selinux/refpolicy-arch/ + echo ">>> Loading refpolicy-arch. Please wait ..." + /bin/ls *.pp | /bin/grep -Ev "base.pp|enableaudit.pp" | /usr/bin/xargs /usr/sbin/semodule -s refpolicy-arch -b base.pp -i + echo ">>> Relabeling filesystems. This may take some time. Please wait ..." + /sbin/restorecon -r / +} + +post_upgrade() { + cd /usr/share/selinux/refpolicy-arch/ + echo ">>> Reloading refpolicy-arch. Please wait ..." + /bin/ls *.pp | /bin/grep -Ev "base.pp|enableaudit.pp" | /usr/bin/xargs /usr/sbin/semodule -s refpolicy-arch -b base.pp -i + echo ">>> Relabeling filesystems. This may take some time. Please wait ..." + /sbin/restorecon -r / +} + +post_remove() { + echo ">>> Removing refpolicy left-over files. Please wait ..." + /bin/rm -rf /etc/selinux/refpolicy-arch +} |