Date: Thu, 14 Jun 2001 17:38:36 -0400 From: "Patrick Bihan-Faou" <patrick@netzuno.com> To: <freebsd-hackers@freebsd.org> Subject: Re: import NetBSD rc system Message-ID: <HAEIJMBEIPIGEFCFDNDIMEDECGAA.patrick@netzuno.com>
next in thread | raw e-mail | index | archive | help
""Koster, K.J."" <K.J.Koster@kpn.com> wrote in message news:<59063B5B4D98D311BC0D0001FA7E452205FD9CAE@l04.research.kpn.com>... > Dear All, > > > > > To do some of the hierarchal start/stop at runtime stuff, you > > really need > > a stateful rc system that stores its start/stop state in > > /var/run/rc.d or > > the like. In this way, the system could track various > > activities and know > > which dependencies were already started. > > > How about /var/run/{$deamon}.pid? > Or better yet, leave each independent script the responsibility of knowing its own state. I am assuming that the various rc.d scripts must have well defined entry points (i.e. start|stop|restart), adding a "status" entry point would solve this issue. I implemented something more or less similar to the netbsd rc system once (I did it in perl however). This system tracked the dependencies and the states of each services. And the state tracking proved to be the worst part. This is why I would suggest to leave the service state tracking to the service scripts themselves. This is far easier to implement at that level than at a global level. Of course the "status" (or whatever name is suitable) call must have well defined return values; 0 -> running and happy 1 -> not started ... Patrick. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?HAEIJMBEIPIGEFCFDNDIMEDECGAA.patrick>