supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* svwaitup/check
@ 2007-03-29  8:36 Jorge Almeida
  2007-03-29 14:03 ` svwaitup/check Charlie Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Jorge Almeida @ 2007-03-29  8:36 UTC (permalink / raw)
  To: supervision

I'm trying to setup the network "service" with a run script like this:
 	#!/bin/bash
 	exec 2>&1
 	echo "*** Bringing up network..."
 	# wait for ulogd...
 	exec /etc/sysconfig/network-devices/ifup eth0

The system is LFS. The finish script will just "touch down". This means
I'm considering the task of bringing up the network as a one-time
initialization task, not a real service. But I want the network to start
after ulogd is up, and the latter is a real service, hence this
workaround to start network in stage2. (Comments/suggestions would be
appreciated. I'm familiar with daemontools, but I'm just starting with
runit.)

Now, as for the "wait for ulogd" part, the hint I found is the use of
svwaitup in http://smarden.org/pape/djb/daemontools/noinit.html. The
"svwaitup" link is broken and I'm assuming that it belongs to an older
release. I'm using the current developement one.
I suppose it should be done with sv, using the check command. Something
like this?
 	sv -w 3 check ????? ulogd || exit 1
How to "request a state" of the ulogd service? This part of the man page
is not clear to me.
Moreover, if the ./check script exists then sv check will not report to
STDOUT but will rather execute ./check. Is this correct?

TIA,

Jorge Almeida


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: svwaitup/check
  2007-03-29  8:36 svwaitup/check Jorge Almeida
@ 2007-03-29 14:03 ` Charlie Brady
  2007-03-29 14:29   ` svwaitup/check Jorge Almeida
  0 siblings, 1 reply; 3+ messages in thread
From: Charlie Brady @ 2007-03-29 14:03 UTC (permalink / raw)
  To: Jorge Almeida; +Cc: supervision


On Thu, 29 Mar 2007, Jorge Almeida wrote:

> I'm trying to setup the network "service" with a run script like this:
> 	 #!/bin/bash
> 	 exec 2>&1
> 	 echo "*** Bringing up network..."
> 	 # wait for ulogd...
> 	 exec /etc/sysconfig/network-devices/ifup eth0
>
> The system is LFS. The finish script will just "touch down".

That won't do what you think it will do. runsv only looks for the down 
file when it first starts up. Perhaps you want "sv down ." in the finish 
script.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: svwaitup/check
  2007-03-29 14:03 ` svwaitup/check Charlie Brady
@ 2007-03-29 14:29   ` Jorge Almeida
  0 siblings, 0 replies; 3+ messages in thread
From: Jorge Almeida @ 2007-03-29 14:29 UTC (permalink / raw)
  To: Charlie Brady; +Cc: Jorge Almeida, supervision

On Thu, 29 Mar 2007, Charlie Brady wrote:

>
> On Thu, 29 Mar 2007, Jorge Almeida wrote:
>
>>  I'm trying to setup the network "service" with a run script like this:
>>    #!/bin/bash
>>    exec 2>&1
>>    echo "*** Bringing up network..."
>>    # wait for ulogd...
>>    exec /etc/sysconfig/network-devices/ifup eth0
>>
>>  The system is LFS. The finish script will just "touch down".
>
> That won't do what you think it will do. runsv only looks for the down file 
> when it first starts up. Perhaps you want "sv down ." in the finish script.
>
>
Thank you, it's an important point, and easy to fix!
As for the other part of my post (sv check...), I think the "requested
state" is the state the service (ulogd) is supposed to be in (as in
"want up", etc), and it's not something to include in the sv command.
Can someone confirm this?
-- 
Jorge Almeida


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-29 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-29  8:36 svwaitup/check Jorge Almeida
2007-03-29 14:03 ` svwaitup/check Charlie Brady
2007-03-29 14:29   ` svwaitup/check Jorge Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).