[Linux-HA] exit code for status when program is stopped, 7 or 3
pavlos.parissis at gmail.com
Fri Oct 1 02:44:18 MDT 2010
On 1 October 2010 10:38, Andrew Beekhof <andrew at beekhof.net> wrote:
> On Fri, Oct 1, 2010 at 10:25 AM, Pavlos Parissis
> <pavlos.parissis at gmail.com> wrote:
>> I am checking if my script which starts a program is LSB compliant.
>> So, I followed the steps mentioned here  and in one of the steps
>> Status (stopped):
>> /etc/init.d/some_service status ; echo "result: $?"
>> Did the script accept the command?
>> Did the script indicate the service was not running?
>> Did the command print result: 3 (in addition to the regular output)?
>> So, if the program is stopped the status should return 3, is that exit
>> code equivalent with the OCF_NOT_RUNNING return code?
>> Where is set to 7
>> [root at node-01 ~]# grep OCF_NOT_RUNNING
>> Reading the code of /usr/lib/ocf/resource.d/heartbeat/Dummy I conclude
>> that my script should return 7 and not 3.
>> Am I right?
> LSB scripts should return 3, only OCF scripts should return 7.
More information about the Linux-HA