[sr-dev] git:master: proper LSB return values of init script
Iñaki Baz Castillo
ibc at aliax.net
Tue Mar 15 15:40:30 CET 2011
2011/3/15 Klaus Darilion <klaus.mailinglists at pernau.at>:
> (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.
And what about if I start kamailio with init script and then delete
the PID file. In this case all the init actions would fail.
Obviously we can suggest lot of exotic cases in which the whole
mechanism gets broken. IMHO we shouldn't cover such cases.
> Anyway, IMo if the service is not configured it should not report success.
Ok, then a better status code (for *any* init action) would be 4:
0 program is running or service is OK
1 program is dead and /var/run pid file exists
2 program is dead and /var/lock lock file exists
3 program is not running
4 program or service status is unknown
5-99 reserved for future LSB use
100-149 reserved for distribution use
150-199 reserved for application use
200-254 reserved
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
Regards.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-dev
mailing list