public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Init scripts acting weird with baselayout 1.12
@ 2006-09-07 22:00 Fredrik Tolf
  2006-09-08  5:46 ` Richard Fish
  0 siblings, 1 reply; 3+ messages in thread
From: Fredrik Tolf @ 2006-09-07 22:00 UTC (permalink / raw
  To: gentoo-user

Ever since I got baselayout upgraded to 1.12, the init scripts that I
have written for a couple of program are acting really weird. What
happens is that they start the program normally, but then, when the
program daemonizes and detaches, it immediately kills it (with a
SIGTERM).

These scripts are also really simple, so I don't understand at all what
I could be doing wrong. Here's a sample:

#!/sbin/runscript

opts="start stop restart"

depend() {
    need net
}

start() {
    ebegin "Starting cidd"
    start-stop-daemon -S -p /var/run/cidd.pid -qx /usr/local/sbin/cidd
    eend $?
}

stop() {
    ebegin "Stopping cidd"
    start-stop-daemon -K -p /var/run/cidd.pid -qx /usr/local/sbin/cidd
    eend $?
}

Is there anything wrong with this script that should cause it do act as
I described?

Fredrik Tolf


-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Init scripts acting weird with baselayout 1.12
  2006-09-07 22:00 [gentoo-user] Init scripts acting weird with baselayout 1.12 Fredrik Tolf
@ 2006-09-08  5:46 ` Richard Fish
  2006-09-11  0:21   ` Fredrik Tolf
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Fish @ 2006-09-08  5:46 UTC (permalink / raw
  To: gentoo-user

On 9/7/06, Fredrik Tolf <fredrik@dolda2000.com> wrote:
>     start-stop-daemon -S -p /var/run/cidd.pid -qx /usr/local/sbin/cidd

Is cidd the actual daemon, or a starter shell script?  IIRC,
start-stop-daemon has a problem with starting things that end up with
a different exe name, and thus the --startas option.

You also might try fiddling with the RC_WAIT_ON_START setting in
/etc/conf.d/rc.  If the service can't be detected as running 100ms
after starting, then you might have a problem.

-Richard
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Init scripts acting weird with baselayout 1.12
  2006-09-08  5:46 ` Richard Fish
@ 2006-09-11  0:21   ` Fredrik Tolf
  0 siblings, 0 replies; 3+ messages in thread
From: Fredrik Tolf @ 2006-09-11  0:21 UTC (permalink / raw
  To: gentoo-user

On Thu, 2006-09-07 at 22:46 -0700, Richard Fish wrote:
> On 9/7/06, Fredrik Tolf <fredrik@dolda2000.com> wrote:
> >     start-stop-daemon -S -p /var/run/cidd.pid -qx /usr/local/sbin/cidd
> 
> Is cidd the actual daemon, or a starter shell script?  IIRC,
> start-stop-daemon has a problem with starting things that end up with
> a different exe name, and thus the --startas option.

It is indeed the actual daemon.

> You also might try fiddling with the RC_WAIT_ON_START setting in
> /etc/conf.d/rc.  If the service can't be detected as running 100ms
> after starting, then you might have a problem.

What does this actually mean? How does it "detect" if it is running? The
case with these daemons (as usual) is that they do some initialization
and then daemonize using the standard C daemon() call (fork and exit in
the parent). What is it that is detected?

Thanks for responding!

Fredrik Tolf


-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2006-09-11  0:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 22:00 [gentoo-user] Init scripts acting weird with baselayout 1.12 Fredrik Tolf
2006-09-08  5:46 ` Richard Fish
2006-09-11  0:21   ` Fredrik Tolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox