archlinux / contrib

Arch contrib scripts
GNU General Public License v2.0
63 stars 18 forks source link

Add a configurable "ignored service" list to checkservices #78

Closed Antiz96 closed 1 month ago

Antiz96 commented 1 month ago

This commit aims to introduce an ignored service list that contains services that are known to cause parsing errors and/or issues when being restarted. Elements can be added to the list with the -i "service_name".service option (e.g. checkservices -i sddm.service -i NetworkManager.service)

Show usage and exit if the -i argument does not finish with .service (to ensure a precise parsing and avoid unexpected filtering)

Fixes https://github.com/archlinux/contrib/issues/44

lahwaacz commented 1 month ago

At this point it might be worth making the ignore list configurable. E.g. I would add sddm.service which would take down the whole active user session, unless the service has an override with KillMode=process.

Antiz96 commented 1 month ago

At this point it might be worth making the ignore list configurable. E.g. I would add sddm.service which would take down the whole active user session, unless the service has an override with KillMode=process.

That's kind of a different issue than the one this PR was initially opened for but I agree in would be great to make it configurable. IMO we should even add the few ones we know are problematic to restart by default (e.g. systemd-login, dbus-broker.service, etc...) and then provide an option to add more ignored services to the list. I'll work on that in a few.

Antiz96 commented 1 month ago

@lahwaacz The list now contains services that are known to create issues by default and element can be added to the list like so: checkservices -i sddm.service NetworkManager.service

Antiz96 commented 1 month ago

@lahwaacz The -i option is now getops compliant. How does that look?