Closed hongkongkiwi closed 1 year ago
It could definitely be a plugin, but I don't think you'll need it.
At $OLDJOB we did this, which was pretty neat. The first two links is the common call to set up a static/one-shot condition based on the product model and the third is an example of how to use it:
Remember, static/one-shot conditions are always asserted, following the current configuration generation.
I've added this to the v4.4 release with the intent of documenting the above trick.
I would like to set some conditions in finit based on whats in the device tree.
This way certain services can be started based on hardware configuration.
Do you think a finit plugin is the best task for this or do you think it makes sense to have this as a built in feature? If it's in a finit plugin, could you give me a code snipped to set a condition at an early stage? (I would like to set these just after fs are mounted)
e.g. have a finit section in the dtb: