Fix to selinux fix.

This commit is contained in:
Adam Ierymenko 2022-02-28 16:10:44 -05:00
parent 8b9a7d2c8f
commit 16b5274963
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3

View File

@ -121,16 +121,16 @@ case "$1" in
chkconfig --add zerotier-one
;;
esac
if [ -x /usr/bin/checkmodule -a -x /usr/bin/semodule_package -a -x /usr/bin/semodule ]; then
if [ -x /usr/bin/checkmodule -a -x /usr/bin/semodule_package -a -x /usr/sbin/semodule ]; then
rm -f /var/lib/zerotier-one/zerotier-one.mod
/usr/bin/checkmodule -M -m -o /var/lib/zerotier-one/zerotier-one.mod /var/lib/zerotier-one/zerotier-one.te
if [ -f /var/lib/zerotier-one/zerotier-one.pp ]; then
rm -f /var/lib/zerotier-one/zerotier-one.pp
/usr/bin/semodule_package -o /var/lib/zerotier-one/zerotier-one.pp -m /var/lib/zerotier-one/zerotier-one.mod
/usr/bin/semodule -u /var/lib/zerotier-one/zerotier-one.pp
/usr/sbin/semodule -u /var/lib/zerotier-one/zerotier-one.pp
else
/usr/bin/semodule_package -o /var/lib/zerotier-one/zerotier-one.pp -m /var/lib/zerotier-one/zerotier-one.mod
/usr/bin/semodule -i /var/lib/zerotier-one/zerotier-one.pp
/usr/sbin/semodule -i /var/lib/zerotier-one/zerotier-one.pp
fi
fi
%endif