[sr-dev] git:master: proper LSB return values of init script

Iñaki Baz Castillo ibc at aliax.net
Tue Mar 15 11:03:02 CET 2011


2011/3/15 Klaus Darilion <klaus.mailinglists at pernau.at>:
>> Hi Klaus, I agree, but in case of "stop" action is should return 0 as
>> the daemon is indeed stoped (LSB compliant).
>
> Is it really stoped? Kamailio is not configured so it is hard to tell if
> it is running or not. The script does not perform any checks to find out
> if Kamailio is stopped, thus I think it is more correct to indicate an
> error.

Hi Klaus, I don't agree. If the daemon is not enabled
(/etc/default/kamailio has RUN=NO) then it must be uspposed not to be
running. In fact, you can not run the daemon using the init script
(due to RUN=NO).
Note that the init script is supposed to manage a process which has
been started using same init script (so you control de PID file and
so). If you run kamailio from command line by setting some other PID
file then the "stop" action of the init script would not find the PID
file so would also return 0. This is, a init script is not supposed to
control a process started without its init script.

So I insist that the stop action should return 0 in case of kamailio
not enabled in its default file.

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-dev mailing list