Condition when service is first started #264
Replies: 2 comments 3 replies
-
I understand what you want to achieve, but conditions weren't really designed for this, as you discovered yourself; crashing or stopping syslogd would bring all dependent services. I'd suggest using the runlevel trick (below) or the following setup: For the systems I've been involved in we set up syslogd (the sysklogd project) to always run, i.e. runlevels To emulate what I believe systemd does, you can let syslogd start up properly in runlevel 2 and have a script/daemon transition the system to runlevel 3 when it detects syslogd is up. In runlevel 3 everything else in your system is brought up. |
Beta Was this translation helpful? Give feedback.
-
i've also come across a requirement for sequencing-only (not-quite-)dependencies on an low-powered embedded box recently, where starting many services in parallel causes thrashing and seriously bad system load. like hongkongkiwi i just want to sequence the initial boot steps. as the services in question are independent, adding fake but strict service dependencies is undesirable because restarting one now unnecessarily nukes a whole bunch of them. personally i've worked around this with user conditions (in 4.5rc5):
this feels a bit hackish, but works and doesn't require changes to finit's dependency system. |
Beta Was this translation helpful? Give feedback.
-
So I'm trying to make syslogd to run first and then everything else run later.
Apart from a plugin, is there anyway in the current configuration to achieve this?
Right now I've setup dependencies, but I found if syslogd goes down or can't start it takes the whole system down. What happens with syslogd is it actually appears in the running state, but then crashes.
So, I was thinking as a solution to this, what about if there was an additional cond that's set for each service. For example
<service/SERVICE/started>
(or something similar) and as long as the service has been started once, this will be set as true. I'm not sure if this is the best name, but basically the idea is once this condition is set it's never unset.That way, I can have it so that syslogd will start first, but then once it's started if it crashes or gets stopped in future for some reason, it won't take down everything else.
Beta Was this translation helpful? Give feedback.
All reactions