Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow + or - to action only on condition set or unset #330

Open
hongkongkiwi opened this issue Dec 9, 2022 · 3 comments
Open

Allow + or - to action only on condition set or unset #330

hongkongkiwi opened this issue Dec 9, 2022 · 3 comments

Comments

@hongkongkiwi
Copy link
Contributor

I'd really like the option to link conditions so that they only trigger when the condition comes up, but not when it goes down.

Currently I have 3 things running as plugins, dbus, chrony & qmi-proxy. These need to be run early for various reasons.

I'd love to be able to link other services to these without having them take down the other services.

For example, I'd like to link the condition so that mdevd starts after chrony, but if chrony goes down, I don't want mdevd to be taken down because of it.

I wanted to propose a + or - character, such that + means that the condition only operates when it's set and - means it only triggers when it's not set. No operator means it triggers the service when it's up or down.

To me this feels like a nice extension and is backwards compatible but could provide a lot of flexibility.

What do you think? With this, I think I could stop using plugins for starting services completely.

Another example could be klogd and syslogd. E.g. I want my service to start after syslog starts, but if syslog dies or gets restarted I don't want my critical service to die.

@hongkongkiwi hongkongkiwi changed the title Act only on condition set or unset Allow + or - to action only on condition set or unset Dec 9, 2022
@hongkongkiwi
Copy link
Contributor Author

I think we have discussed it in #21 but that is a separate item. I wanted to add an issue for this as it would be incredibly useful for me and a powerful feature I think.

@troglobit
Copy link
Owner

It's a good suggestion, and I understand the use-case even though >90% of our own cases have had the reverse requirement (to actually ensure mdevd be taken down if chrony goes down), which is the reason for why it's designed this way.

Adapting Finit to your suggestion is a HUGE amount of work to the internals and I don't see us implementing this any time soon.

@az143
Copy link

az143 commented Oct 23, 2023

how i achieve (more or less exactly) this behaviour with user conditions and no changes to finit is described in #264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants