Bug 948404 - Please add systemd unit file for ModemManager
Summary: Please add systemd unit file for ModemManager
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ModemManager
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 829610 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-04 17:20 UTC by Lennart Poettering
Modified: 2015-02-17 14:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-17 14:56:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lennart Poettering 2013-04-04 17:20:38 UTC
Currently ModemManager is being forked off dbus-daemon by dbus's own activation logic. It would be a good thing if ModemManager would be turned into its own systemd service instead, so that it can be introspected and controlled like any other system service, gets its own set of indexed logs, and so on. ModemManager is currently one of the very few services we install by default that isn't a systemd service of its own.

Please make the following changes:

Add the following line to /usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service:

<snip>
SystemdService=dbus-org.freedesktop.ModemManager.service
</snip>

Then, introduce /usr/lib/systemd/system/ModemManager.service in your RPM:

<snip>
[Unit]
Description=Modem Manager Service

[Service]
Type=dbus
BusName=org.freedesktop.ModemManager
ExecStart=/usr/sbin/modem-manager

[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.ModemManager.service
</snip>

Finally, add the snippets listed in https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd to you spec file:

<snip>
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd

[...]

%post
%systemd_post ModemManager.service

%preun
%systemd_preun ModemManager.service

%postun
%systemd_postun
</snip>

I will add ModemManager to the preset file we ship, to ensure it is enabled by default.

Comment 1 Lennart Poettering 2013-06-20 17:07:00 UTC
*** Bug 829610 has been marked as a duplicate of this bug. ***

Comment 2 Lennart Poettering 2013-06-20 17:15:05 UTC
If ModemManager should not be run at boot, drop the "WantedBy=multi-user.target" bit from the suggestion above.

If it should be pulled in by hardware we should do this via an udev rule, which matches on known modems and then pulls in "modem.target" or so, and MM should then hook into that.

Comment 3 Lennart Poettering 2013-06-20 17:15:53 UTC
Also see:

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

Comment 4 Dan Williams 2013-06-21 22:20:25 UTC
(In reply to Lennart Poettering from comment #2)
> If ModemManager should not be run at boot, drop the
> "WantedBy=multi-user.target" bit from the suggestion above.
> 
> If it should be pulled in by hardware we should do this via an udev rule,
> which matches on known modems and then pulls in "modem.target" or so, and MM
> should then hook into that.

At the moment, it should probably just be dbus activated, but in the future it should be auto-started based on specific udev rules so it can probe hardware it's interested in.  There are some classes of hardware that shouldn't be probed (we keep a graylist that's manual-probe-only) so in those cases dbus activation would suffice.

Comment 5 Juha Tuomala 2014-01-15 13:20:22 UTC
System logs get filled with these lines:

Jan 15 15:03:17 wasa dbus-daemon: dbus[591]: [system] Activating via systemd: service name='org.freedesktop.ModemManager1' unit='dbus-org.freedesktop.ModemManager1.service'
Jan 15 15:03:17 wasa dbus[591]: [system] Activating via systemd: service name='org.freedesktop.ModemManager1' unit='dbus-org.freedesktop.ModemManager1.service'
Jan 15 15:03:17 wasa dbus[591]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.ModemManager1.service': Unit dbus-org.freedesktop.ModemManager1.service failed to load: No such file or directory.
Jan 15 15:03:17 wasa dbus-daemon: dbus[591]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.ModemManager1.service': Unit dbus-org.freedesktop.ModemManager1.service failed to load: No such file or directory.


Could this cause network hickups? I get constantly KDE errors for lost home directory that is on NFS.

Why should a desktop machine connected to a LAN have anything to do with Modems?

Could we go back to initscripts. Systemd has been a big mistake and certainly not worth of all the trouble (read, lost work hours, money) it has already caused.

Comment 6 Juha Tuomala 2014-01-15 13:21:51 UTC
Comment #5 errors appear in Fedora 20.

Comment 7 Fedora End Of Life 2015-01-09 17:51:19 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2015-02-17 14:56:38 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.