cancel
Showing results for 
Search instead for 
Did you mean: 

Service dependency

Aravindh Rajaram
Honored Contributor

Service dependency

How can we mark that certian services are dependendant on another service? Also, is there a way to force a service to follow the dependancy as in Windows? Like, if I stop a service, all its dependant services should stop too.

Thanks,
AMicSys
3 REPLIES
OldSchool
Honored Contributor

Re: Service dependency

generally speaking, the services are started and stopped by transitioning run levels. The S(tart) and K(ill) scripts run in order as the transition is made.

typically, you would not start or stop services manually. If you need to cleanly shutdown all of the dependencies when stopping (or start them all for that matter) you are going to have to do some scripting to track what you need to stop/start.
Olivier Masse
Honored Contributor

Re: Service dependency

As far as I know, HP-UX still uses old style SYSV rc scripts which, back in their time, were actually good... but I admit that they are outdated now.

The only way to create "dependencies" with them is to start all the services in a sequential order, which leads to a much longer startup time than many Linux distributions.

If you really need to be sure that a service actually started before starting another one, the only way to do this that I can imagine right now is writing this case in your startup script. That's not very nice.

Good luck

Emil Velez
Honored Contributor

Re: Service dependency

You can do this with the ServiceGuard software but that assumes that the services are part of a serviceguard package.

Unix OSs do not really have the concept of dependent services but that is what scripting is for. YOu can cause the shutdown of a script to stop other things and the startup of a script can start other things via scripting. I am not sure why scripting is not the answer.