Skip to content

Consider adding Requisite/Conflict equivalents that do not trigger OnFailure #12352

@benzea

Description

@benzea

There are two slightly different use cases for this. The commonality in these two cases is the idea of using use OnFailure in GNOME to start the full screen "Session Failed" dialog. i.e. I have a gnome-session-failed.target which should be executed if certain services fail.

However, some of these services should only run when certain other targets are already present or not present. There are two scenarios:

  • The service should only run when another target is present (not used yet, but planned). This means it should run for example when both bluetooth.target and gnome-session-initialized.target are up (i.e. both in Requisite/After/PartOf/WantedBy).
  • The service conflicts with another target. An actual example is not running a specific service in the GDM session, which I right now solve using Conflicts=gnome-session@gnome-login.target (gnome-login is the session type).

I believe in both cases the Requisite or Conflicts will cause the unit to go into the failed state, triggering OnFailure. I can easily work around this by having a .target with the dependencies and a separate .service with the OnFailure entry. This works great, but it is a kind of cumbersome (and causes unnecessary logging).

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestpid1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions