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:
parent
5179cbc751
commit
22f74641da
@ -432,6 +432,15 @@ sed 's/^net.ipv4.ip_forward.*/#\0/' -i /etc/sysctl.conf
|
|||||||
|
|
||||||
/usr/lib/qubes/qubes-fix-nm-conf.sh
|
/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
|
%preun
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
# no more packages left
|
# no more packages left
|
||||||
@ -444,6 +453,15 @@ if [ "$1" = 0 ] ; then
|
|||||||
fi
|
fi
|
||||||
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
|
%postun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
||||||
|
Loading…
Reference in New Issue
Block a user