systemd: disable ModemManager in non-NetVM

Previously ModemManager was started by NetworkManager, but in fc20+ it
is a separate service, so disable it when not needed.
This commit is contained in:
Marek Marczykowski-Górecki 2014-01-30 02:53:08 +01:00
parent 85f4e494e8
commit fc04408c7a
3 changed files with 10 additions and 1 deletions

View File

@ -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/

View File

@ -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

View File

@ -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