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

Klaus Darilion klaus.mailinglists at pernau.at
Tue Mar 15 08:30:12 CET 2011



Am 15.03.2011 00:25, schrieb Iñaki Baz Castillo:
> 2011/3/14 Klaus Darilion <klaus.mailinglists at pernau.at>:
>>  if [ "$RUN_KAMAILIO" != "yes" ]; then
>>     echo "Kamailio not yet configured. Edit /etc/default/kamailio first."
>> -    exit 0
>> +    case "$1" in
>> +    status)
>> +        exit 4
>> +       ;;
>> +    *)
>> +       exit 1
>> +       ;;
>> +    esac
>>  fi
> 
> 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.

regards
Klaus



More information about the sr-dev mailing list