systemd: simplify unit file
Avoid setting up the Alias rule, which was a helper to let us 'disable' the systemd service including dbus-activations. Without the Alias, 'disable' will still let starting ModemManager through dbus-activation. If you really want to fully disallow starting MM also through dbus-activation, you should 'mask' and 'unmask' the service. E.g.: $ sudo systemctl mask ModemManager ln -s '/dev/null' '/etc/systemd/system/ModemManager.service' $ sudo mmcli -L error: couldn't find the ModemManager process in the bus $ sudo systemctl unmask ModemManager rm '/etc/systemd/system/ModemManager.service' $ sudo mmcli -L No modems were found https://bugzilla.gnome.org/show_bug.cgi?id=701229
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,8 +25,6 @@ libtool
|
||||
*.tar.bz2
|
||||
*.pyc
|
||||
*.dirstamp
|
||||
org.freedesktop.ModemManager.service
|
||||
org.freedesktop.ModemManager.conf
|
||||
callouts/mm-modem-probe
|
||||
test/lsudev
|
||||
|
||||
|
@@ -33,17 +33,10 @@ endif
|
||||
|
||||
# DBus Activation file
|
||||
dbusactivationdir = $(datadir)/dbus-1/system-services
|
||||
dbusactivation_in_files = org.freedesktop.ModemManager1.service.in
|
||||
org.freedesktop.ModemManager1.service: org.freedesktop.ModemManager1.service.in
|
||||
$(edit) $< >$@
|
||||
dbusactivation_DATA = org.freedesktop.ModemManager1.service
|
||||
dbusactivation_in_files_systemd = org.freedesktop.ModemManager1.service.systemd.in
|
||||
dbusactivation_in_files_nosystemd = org.freedesktop.ModemManager1.service.nosystemd.in
|
||||
if HAVE_SYSTEMD
|
||||
org.freedesktop.ModemManager1.service: org.freedesktop.ModemManager1.service.systemd.in
|
||||
$(edit) $< >$@
|
||||
else
|
||||
org.freedesktop.ModemManager1.service: org.freedesktop.ModemManager1.service.nosystemd.in
|
||||
$(edit) $< >$@
|
||||
endif
|
||||
|
||||
|
||||
# Icon
|
||||
icondir=${datadir}/icons/hicolor/22x22/apps
|
||||
|
@@ -10,4 +10,3 @@ StandardError=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=dbus-org.freedesktop.ModemManager1.service
|
||||
|
@@ -2,3 +2,4 @@
|
||||
Name=org.freedesktop.ModemManager1
|
||||
Exec=@sbindir@/ModemManager
|
||||
User=root
|
||||
SystemdService=ModemManager.service
|
@@ -1,11 +0,0 @@
|
||||
# This D-Bus service activation file is only for systemd support since
|
||||
# an auto-activated ModemManager would be quite surprising for those people
|
||||
# who have MM installed but turned off. Thus the Exec path available to
|
||||
# D-Bus is /bin/false, but systemd knows the real Exec path due to the MM
|
||||
# systemd .service file.
|
||||
|
||||
[D-BUS Service]
|
||||
Name=org.freedesktop.ModemManager1
|
||||
Exec=/bin/false
|
||||
User=root
|
||||
SystemdService=dbus-org.freedesktop.ModemManager1.service
|
Reference in New Issue
Block a user