Additional cond's via kernel cmdline #249
hongkongkiwi
started this conversation in
General
Replies: 2 comments
-
Cool, yeah this is definitely something that would be beneficial to Finit and its users! 😃👍 I'll give it a think how this should be integrated, namespace etc., right now I'm thinking |
Beta Was this translation helpful? Give feedback.
0 replies
-
There, fixed in caa3988, issue #250. Documentation updated with info on A cmdline with
:-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be neat if we could use the kernel cmdline mechanism to pass a custom condition to finit. This allows some very simple and flexible options to be set in the bootloader script.
e.g. -- finit.cond=mycond1 finit.cond=mycond2
Then when the system starts it can react to a specific condition.
It may make sense to make these something like <cmdline/mycond1> instead of <usr/mycond1> but the downside is then you couldn't clear them like a normal usr signal with initctl clear .... (but maybe that's fine, I can't think of a reason why you want to clear it to be honest, but just a thought.
As a real life example, this could be useful for a mfgtest mode for the device, so the bootloader can set finit.cond=test_mode or finit.cond=user_mode and then specific services can start up in test mode which wouldn't normally start.
Or perhaps a custom firmware update mode such as finit.cond=fw_update_mode which performs some specific firmware update steps and doesn't launch normal processes.
P.S. The same behaviour can currently be done via a task, which then sets the usr signals, but it's nice if the extra step isn't needed since finit already reads it's input vars and in some cases you might not want normal services to start at all (e.g. if a firmware update mode). Alternatively a run could also work, but my preference is not to slow down system booting by holding up for a run script to complete (even if it's fast).
Beta Was this translation helpful? Give feedback.
All reactions