On 15.03.2011 11:03, IƱaki Baz Castillo wrote:
2011/3/15 Klaus
Darilion<klaus.mailinglists(a)pernau.at>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.
(this whole discussion is very theoretically)
So, what if I start kamailio with init script. Then I configure RUN=NO
and then I call "stop". Then it will report 0 although kamailio is still
running. Anyway, IMo if the service is not configured it should not
report success.
regards
klaus
PS: Feel free to fix it, I won't fix it as IMO it is not a bug.