Artix Linux Forum

Init systems => OpenRC => Topic started by: twann on 07 December 2023, 00:14:45

Title: Init script for modemmanager?
Post by: twann on 07 December 2023, 00:14:45
Hi,
I noticed that while there are ModemManager init scripts for runit and s6 , there seems to be none for OpenRC?
Is that intentional?

Thanks in advance.
Twann
Title: Re: Init script for modemmanager?
Post by: Danny on 20 March 2024, 16:44:09
Are you using
https://gitea.artixlinux.org/packages/networkmanager-openrc

as your network manager, then configuring it from within network manager?
Title: Re: Init script for modemmanager?
Post by: kiblaster on 20 March 2024, 17:00:03
It's missing for dinit too.

It is started automatically by dbus file:
Code: [Select]
/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service
I have a dinit service and I removed that file so I can stop the service.

https://github.com/davmac314/dinit/discussions/224#discussioncomment-6785825
Quote
The S6/runit services are most likely allowing to start it early, but that's probably unnecessary anyway.
Title: Re: Init script for modemmanager?
Post by: Danny on 21 March 2024, 00:25:31
hello twann

is this what you are looking for?
https://gitea.artixlinux.org/packages/networkmanager-openrc/src/branch/master/NetworkManager.initd
Title: Re: Init script for modemmanager?
Post by: konimex on 21 March 2024, 15:09:03

The lack of ModemManager service is intentional (in dinit's case at least), since it's invoked by NetworkManager via dbus, and thus doesn't need standalone service.

I do plan on making a service for ModemManager (and other various services) and have dbus activate it via the service file instead of directly running the daemon (https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/main/data/org.freedesktop.ModemManager1.service.in?ref_type=heads#L9), but this needs to work on all service managers supported by Artix (since if we modify the dbus file, it needs to be service manager-neutral).
Title: Re: Init script for modemmanager?
Post by: kiblaster on 21 March 2024, 19:23:17
Nice project so you can start/stop/enable/disable the service.

Currently is there a way to stop the "service"? I had to delete the /usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service file.
Title: Re: Init script for modemmanager?
Post by: konimex on 22 March 2024, 15:58:16
Nice project so you can start/stop/enable/disable the service.

Currently is there a way to stop the "service"? I had to delete the /usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service file.

Unfortunately no.
You can however make dinit handle the service by creating a new service for ModemManager, keep it disabled and modify the dbus file to run /bin/dinitctl start modemmanager.

This is getting off-topic since this is on the OpenRC subforum so I'm going to stop here.