Revert "systemd: simplify unit file"

This reverts commit 91898aa8b0.

See additional comments in the following bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=701229

Basically, 'mask' and 'unmask' operations are not the ones we should be using
or suggesting; and the Alias= for the DBus file is the correct way to go.
This commit is contained in:
Aleksander Morgado
2013-06-23 11:47:41 +02:00
parent b8825f79d5
commit ce6777c53b
5 changed files with 24 additions and 4 deletions

2
.gitignore vendored
View File

@@ -25,6 +25,8 @@ libtool
*.tar.bz2
*.pyc
*.dirstamp
org.freedesktop.ModemManager.service
org.freedesktop.ModemManager.conf
callouts/mm-modem-probe
test/lsudev

View File

@@ -33,10 +33,17 @@ 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

View File

@@ -10,3 +10,4 @@ StandardError=null
[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.ModemManager1.service

View File

@@ -2,4 +2,3 @@
Name=org.freedesktop.ModemManager1
Exec=@sbindir@/ModemManager
User=root
SystemdService=ModemManager.service

View File

@@ -0,0 +1,11 @@
# 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