Florian Lohoff <flo@rfc822.org> writes:
On Thu, Apr 05, 2001 at 02:29:52PM +0200, David Rohleder wrote:
I was looking for debian package, but i was not able to find it. I was quite happy with that, because I wanted to become a debian developper. Bad luck this time. I will have to look for another package.
You are using interesting init.d script :-) I have never seen this before.
You mean this ?
if [ -d /proc -a -z "`cat /proc/ksyms | grep rtnetlink`" ]; then
I wanted to give a resonable output if people dont compile in "rtnetlink" - I mean if they even skip proc there is no hope.
No, I mean this kind of starting and other operations with bird ---- echo quit | birdc >/dev/null 2>&1 if [ $? -eq 0 ]; then echo already running fi ---- if [ -S /var/bird.ctl ] ; then echo already running fi does the same thing. --- And off course many daemons are using start-stop-daemon -- ------------------------------------------------------------------------- David Rohleder davro@ics.muni.cz Institute of Computer Science, Masaryk University Brno, Czech Republic -------------------------------------------------------------------------
On Thu, Apr 05, 2001 at 03:48:34PM +0200, David Rohleder wrote:
if [ -S /var/bird.ctl ] ; then echo already running fi
does the same thing.
And off course many daemons are using start-stop-daemon
Just by staring at it i saw a couple of ugly things - Must have been very early when i actually did it. The above would only imply that the pipe exists but not actually tell you if bird is running. "birdc" exits with an error code > 0 if bird is not reachable which i try to detect. The problem with the start-stop-daemon is that it needs a pid file which when i remember correctly is not written by bird. One solution would have been to make a patch to bird (Which i had done if i remember) but i dropped it because of lazyness. Flo -- Florian Lohoff flo@rfc822.org +49-5201-669912 Why is it called "common sense" when nobody seems to have any?
On Thu, 5 Apr 2001, Florian Lohoff wrote:
On Thu, Apr 05, 2001 at 03:48:34PM +0200, David Rohleder wrote:
if [ -S /var/bird.ctl ] ; then echo already running fi
does the same thing.
And off course many daemons are using start-stop-daemon
Just by staring at it i saw a couple of ugly things - Must have been very early when i actually did it.
The above would only imply that the pipe exists but not actually tell you if bird is running.
"birdc" exits with an error code > 0 if bird is not reachable which i try to detect.
The problem with the start-stop-daemon is that it needs a pid file which when i remember correctly is not written by bird. One solution would have been to make a patch to bird (Which i had done if i remember) but i dropped it because of lazyness.
I have my own init system which uses a C program similar to debian's start-stop-daemon. I've written it such that given a command line flag the daemon spawning program will write a pid file if you know the daemon you're running doesn't write one (such as with bird). Once I did this I had no trouble starting and stopping bird using the pid file mechanism. Perhaps you might patch debian's start-stop-daemon to do a similar thing? It's a thought. 'james -- James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska, Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W, Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System, Y(F) = F(Y(F)) \_,-_/ Milky Way.
participants (3)
-
David Rohleder -
Florian Lohoff -
James A. Crippen