* runit & bluetooth daemons
@ 2004-10-18 18:55 julle80
2004-10-22 10:19 ` Gerrit Pape
0 siblings, 1 reply; 2+ messages in thread
From: julle80 @ 2004-10-18 18:55 UTC (permalink / raw)
Hi!
I know that one time initialization tasks should go into stage 1, but
isn't there really any way to make a init script for these tasks to be
run at stage 2?
The reason why I need this kind of operation is the following:
If I want full bluetooth support in my system I need to start hcid &
hidd daemons which offcourse I want to start on stage2, but AFTER
starting those I need to run the hid2hci program (not daemon) so I
really can't place it on the stage1 without placing the daemons too.
Any suggestions how to resolve this situation?
I have couple other scripts too which I would like to place on stage 2
(for faster system startup) but haven't found any reasonable way to do
this as runit expects all init scrtipts to stay running.
Thanks, J
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: runit & bluetooth daemons
2004-10-18 18:55 runit & bluetooth daemons julle80
@ 2004-10-22 10:19 ` Gerrit Pape
0 siblings, 0 replies; 2+ messages in thread
From: Gerrit Pape @ 2004-10-22 10:19 UTC (permalink / raw)
On Mon, Oct 18, 2004 at 09:55:55PM +0300, julle80@nic.fi wrote:
> I know that one time initialization tasks should go into stage 1, but
> isn't there really any way to make a init script for these tasks to be
> run at stage 2?
>
> The reason why I need this kind of operation is the following:
>
> If I want full bluetooth support in my system I need to start hcid &
> hidd daemons which offcourse I want to start on stage2, but AFTER
> starting those I need to run the hid2hci program (not daemon) so I
> really can't place it on the stage1 without placing the daemons too.
> Any suggestions how to resolve this situation?
I don't know the daemons/program you mention, but had a similar problem
with the cfs daemon; to have the cfs service actually enabled, ``mount
...'' must be called after cfsd has been started. But _when_ after cfsd
started should mount be run?, immediately, one second, more? The answer
was: after cfsd has successfully initialized and entered a select loop.
So the time span could vary, and only cfsd knows when mount can be run
successfully. I ended up changing cfsd to start a script itself at the
time initialization was done.
Another possibility could be to repeatedly run ``hid2hci'' (as a service)
until it succeeds, and then take the service down, e.g.:
#!/bin/sh
! hid2hci || runsvctrl down .
> I have couple other scripts too which I would like to place on stage 2
> (for faster system startup) but haven't found any reasonable way to do
> this as runit expects all init scrtipts to stay running.
Yes, runit separates one-time-tasks from long-running-services. You
could try to experiment with the workaround to have a service just run
``once'', as discussed here:
http://thread.gmane.org/gmane.comp.sysutils.supervision.general/363
HTH, Gerrit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-22 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-18 18:55 runit & bluetooth daemons julle80
2004-10-22 10:19 ` Gerrit Pape
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).