diff --git a/Makefile b/Makefile index 3173e21..bf1a824 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ install-vm: install -m 0755 vm-systemd/*.sh $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/qubes-*.service $(DESTDIR)/lib/systemd/system/ install -m 0644 vm-systemd/qubes-*.timer $(DESTDIR)/lib/systemd/system/ + install -m 0644 vm-systemd/ModemManager.service $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/NetworkManager.service $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/NetworkManager-wait-online.service $(DESTDIR)/usr/lib/qubes/init/ install -m 0644 vm-systemd/cups.* $(DESTDIR)/usr/lib/qubes/init/ diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 835f656..fe79628 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -448,6 +448,7 @@ The Qubes core startup configuration for SystemD init. /usr/lib/qubes/init/misc-post.sh /usr/lib/qubes/init/misc-post-stop.sh /usr/lib/qubes/init/qubes-sysinit.sh +/usr/lib/qubes/init/ModemManager.service /usr/lib/qubes/init/NetworkManager.service /usr/lib/qubes/init/NetworkManager-wait-online.service /usr/lib/qubes/init/cups.service @@ -455,6 +456,7 @@ The Qubes core startup configuration for SystemD init. /usr/lib/qubes/init/cups.path /usr/lib/qubes/init/ntpd.service /usr/lib/qubes/init/chronyd.service +%ghost %attr(0644,root,root) /etc/systemd/system/ModemManager.service %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager.service %ghost %attr(0644,root,root) /etc/systemd/system/NetworkManager-wait-online.service %ghost %attr(0644,root,root) /etc/systemd/system/cups.service @@ -473,7 +475,7 @@ UNITDIR=/lib/systemd/system OVERRIDEDIR=/usr/lib/qubes/init # Install overriden services only when original exists -for srv in cups NetworkManager NetworkManager-wait-online ntpd chronyd; do +for srv in cups ModemManager NetworkManager NetworkManager-wait-online ntpd chronyd; do if [ -f $UNITDIR/$srv.service ]; then cp $OVERRIDEDIR/$srv.service /etc/systemd/system/ fi @@ -514,9 +516,11 @@ rm -f /etc/systemd/system/getty.target.wants/getty@tty*.service /bin/systemctl enable rsyslog.service 2> /dev/null /bin/systemctl enable ntpd.service 2> /dev/null # Disable original service to enable overriden one +/bin/systemctl disable ModemManager.service 2> /dev/null /bin/systemctl disable NetworkManager.service 2> /dev/null # Disable D-BUS activation of NetworkManager - in AppVm it causes problems (eg PackageKit timeouts) /bin/systemctl mask dbus-org.freedesktop.NetworkManager.service 2> /dev/null +/bin/systemctl enable ModemManager.service 2> /dev/null /bin/systemctl enable NetworkManager.service 2> /dev/null # Fix for https://bugzilla.redhat.com/show_bug.cgi?id=974811 /bin/systemctl enable NetworkManager-dispatcher.service 2> /dev/null diff --git a/vm-systemd/ModemManager.service b/vm-systemd/ModemManager.service new file mode 100644 index 0000000..f530073 --- /dev/null +++ b/vm-systemd/ModemManager.service @@ -0,0 +1,4 @@ +.include /lib/systemd/system/ModemManager.service +[Unit] +ConditionPathExists=|/var/run/qubes-service/network-manager +ConditionPathExists=|/var/run/qubes-service/modem-manager