(#14151) Stopping a stopped service and starting a started service should return 0 #36

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@haus
Contributor

haus commented Apr 24, 2012

According to LSB guidelines, starting a started service and stopping a stopped
service should be considered successful and return 0. This fix adds --okonodo
to both the start and stop actions for debian to achieve that goal. It also
wrapps the daemon and killproc calls in a rh_status_q call so that daemon is
only called if mcollective is not already started and killproc is only called
if mcollective is running.
The commit also lines up exit codes for lack of binary to be 5, which lines
up with a 'program not installed' error, which would be the likely cause of
the mcollective binary to be absent. It also uses an exit code of 2 for no or
unknown arguments to the init script (the * case), which is in line with LSB
guidelines.
It also includes some trailing whitespace cleanup.

(#14151) Stopping a stopped service and starting a started service sh…
…ould return 0

According to LSB guidelines, starting a started service and stopping a stopped
service should be considered successful and return 0. This fix adds --okonodo
to both the start and stop actions for debian to achieve that goal. It also
wrapps the daemon and killproc calls in a rh_status_q call so that daemon is
only called if mcollective is not already started and killproc is only called
if mcollective is running.
The commit also lines up exit codes for lack of binary to be 5, which lines
up with a 'program not installed' error, which would be the likely cause of
the mcollective binary to be absent. It also uses an exit code of 2 for no or
unknown arguments to the init script (the * case), which is in line with LSB
guidelines.
It also includes some trailing whitespace cleanup.

@ripienaar ripienaar closed this Apr 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment