Closed liuming50 closed 2 years ago
Interesting. It would be great if this also included an official way of accessing this information instead of poking around in the internals. Meaning, could you please add a way of inspecting this through initctl status foo
as well?
Also, and possibly more importantly. A one-shot task per spec. runs once per runlevel it's allowed to run in, so when changing runelevel the task is run once again. Maybe this file should be removed for all tasks that are restarted?
Interesting. It would be great if this also included an official way of accessing this information instead of poking around in the internals. Meaning, could you please add a way of inspecting this through
initctl status foo
as well?Also, and possibly more importantly. A one-shot task per spec. runs once per runlevel it's allowed to run in, so when changing runelevel the task is run once again. Maybe this file should be removed for all tasks that are restarted?
Thanks for the review, will rework a V2.
Any progress on this? I'm gearing up for release 4.2 very soon ... :)
Finit v4.2 was released during the weekend. Maybe we can get this into the next release cycle? :pray:
@troglobit sorry for the delayed feedback, we are currently being blocked by https://github.com/troglobit/finit/issues/216, so have not managed time work on this.
@troglobit
Please kindly help me review this V2.
If I understood you correctly, when SM enters SVC_DONE_STATE, we set done condition, and when it enters SVC_HALTED_STATE, we clear the done condition. So I think the svc_set_state function is still the proper place to put the logic in.
Much better, thank you! :)
We like to know when a oneshot task is done, so as to start the services that depending on it, set a oneshot condition 'done' for that case.
Signed-off-by: Robert Andersson robert.m.andersson@atlascopco.com Signed-off-by: Ming Liu liu.ming50@gmail.com