Hi,
There is a caveat when using -F to prevent forking. While -F is a
best approach method for most daemons, I have noticed from frequent
initng use that a few daemons are best run with forking.
One example is: daemon/bluetooth/sdpd
which on Gentoo, installs from: bluez-utils-2.25-r1
The daemon has an option '-n' for no detach.
# initng-ifiles-0.0.6
daemon daemon/bluetooth/sdpd {
need = system/bootmisc daemon/bluetooth/hcid;
exec daemon = @/usr/sbin/sdpd@ -n;
}
However, with this configuration, a daemon restart fails approx. 50%
of the time with:
% ngc -r
This misbehavior is fixed with SVN r4544 :
# initng-file-svn
daemon daemon/bluetooth/sdpd {
need = system/bootmisc daemon/bluetooth/hcid;
pid_of = sdpd;
exec daemon = @/usr/sbin/sdpd@;
forks;
}
Note that in this special case, forking is necessary for the buggy
daemon to behave. I am guessing that it is due to the daemon returning
a code > 0 when encountering a "quit" signal.
Perhaps Jimmy will have some insights on this?
-timotheus
--
http://tstotts.net/
>From: Jimmy Wennlung <[EMAIL PROTECTED]>
>Date: Tue, 24 Oct 2006 16:06:09 +0200
>
>Better configure your daemons not to fork, all daemons have some
>diffrent options to manage this.
>
>Like samba, smbd -F (foreground)
>
>Then make sure you dont have the fork keyword in your .i file.
>
>/Jimmy
>
--
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng