Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong debian systemv init script exit codes #552

Closed
mahe-ymc opened this issue Apr 14, 2015 · 4 comments
Closed

Wrong debian systemv init script exit codes #552

mahe-ymc opened this issue Apr 14, 2015 · 4 comments

Comments

@mahe-ymc
Copy link

This affects sbt-native-packager in version 0.7.4

The init script when run with argument 'status' always returns an exit code 0, no matter in what state the program is in. This is bad, as a caller (e.g. puppet) cannot determine the state of the application. One should change this to exit codes specified by LSB (http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html).

Fixing this can easily be done by remembering the status code of "start-stop-daemon --status" and by exiting using the value of that status code and not by the one resulted from "echo". Unfortunately "$?" is not referential transparent :(

I can do a pull request for this by myself if you like.
Thanks, Matthias

@muuki88
Copy link
Contributor

muuki88 commented Apr 15, 2015

Thanks for pointing out. Is this not the case for the current 1.0.0 version?
If you do a pr for 0.7.4. I'll shape a release, otherwise we will only keep this
issue open if this is an issue for 1.0.0 as well. PR always welcome :)

@huntc
Copy link
Contributor

huntc commented Apr 15, 2015

Just received from a customer:

start script returns 0 even if application failed to start

@huntc
Copy link
Contributor

huntc commented Apr 15, 2015

...that's using 1.0.0

@muuki88
Copy link
Contributor

muuki88 commented Apr 17, 2015

@mahe-ymc so pull request on any branch are welcome :)

kardapoltsev added a commit to kardapoltsev/sbt-native-packager that referenced this issue Apr 26, 2015
kardapoltsev added a commit to kardapoltsev/sbt-native-packager that referenced this issue Apr 26, 2015
@kardapoltsev kardapoltsev removed the rpm label Apr 26, 2015
muuki88 added a commit that referenced this issue Apr 26, 2015
Fix debian systemV init script status command #552
@muuki88 muuki88 added 0.7.x and removed 0.7.x labels Mar 20, 2016
@muuki88 muuki88 closed this as completed Mar 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants