corosync/corosync — pull request #30 by takehironet (2014-06-29 15:37:13+00:00)
Title: Fix return codes to be LSB compliant

`systemctl start corosync` always fail, however `/usr/share/corosync/corosync start` works properly.
systemd expects it returns 0 but `/usr/share/corosync/corosync start` returns 1.

To work properly with systemd, fix return codes.
* `status` returns 3 when Corosync is already stopped.
* `stop` returns 0 when Corosync is already stopped.

Tested following on systemd214 on Arch Linux, corosync is configured with `./configure --enable-systemd`.

```
~]# /usr/share/corosync/corosync status
corosync is stopped

~]# /usr/share/corosync/corosync status; echo $?
corosync is stopped
3

~]# /usr/share/corosync/corosync start; echo $?
Starting Corosync Cluster Engine (corosync): [ OK ]
0

~]# /usr/share/corosync/corosync status; echo $?
corosync (pid 29953) is running...
0

~]# /usr/share/corosync/corosync stop; echo $?
Signaling Corosync Cluster Engine (corosync) to terminate: [ OK ]
Waiting for corosync services to unload:.[ OK ]
0

~]# /usr/share/corosync/corosync stop; echo $?
0
```