/usr/sbin/selinux-policy-upgrade is in selinux-basics 0.5.0.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/bin/sh
set -e
if [ "$1" != "" ]; then
SELINUXTYPE="$1"
else
. /etc/selinux/config
fi
cd /usr/share/selinux/$SELINUXTYPE
echo "Updating \"$SELINUXTYPE\" policy"
# remove obsolete modules
for n in procmail tmpreaper ; do
semodule -l |grep -q $n && semodule -r $n
done
semodule -b base.pp $(for n in $(semodule -s $SELINUXTYPE -l | cut -f1); do
if [ -e $n.pp ]; then
echo -n " -i $n.pp"
fi
done
semodule -l|grep -q dkim && echo -n " -i milter.pp"
)
|