rpm: add services enabling/disabling logic

Since some systemd services are moved to other packages, appropriate
%post/%preun should contain the code to enable/disable them.

Fixes QubesOS/qubes-issues#2894
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-11 16:06:10 +02:00
parent 5179cbc751
commit 22f74641da
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -432,6 +432,15 @@ sed 's/^net.ipv4.ip_forward.*/#\0/' -i /etc/sysctl.conf
/usr/lib/qubes/qubes-fix-nm-conf.sh
%post networking
%systemd_post qubes-firewall.service
%systemd_post qubes-iptables.service
%systemd_post qubes-network.service
%systemd_post qubes-updates-proxy.service
%post qrexec
%systemd_post qubes-qrexec-agent.service
%preun
if [ "$1" = 0 ] ; then
# no more packages left
@ -444,6 +453,15 @@ if [ "$1" = 0 ] ; then
fi
fi
%preun networking
%systemd_preun qubes-firewall.service
%systemd_preun qubes-iptables.service
%systemd_preun qubes-network.service
%systemd_preun qubes-updates-proxy.service
%preun qrexec
%systemd_preun qubes-qrexec-agent.service
%postun
if [ $1 -eq 0 ] ; then
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :