init script fails with error code 0 when configuration test doesn't pass
Bug #1413555 reported by
Stratos Moros
This bug affects 7 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
Trusty |
Confirmed
|
Low
|
Unassigned | ||
Utopic |
Won't Fix
|
Undecided
|
Unassigned | ||
Vivid |
Invalid
|
Low
|
Unassigned |
Bug Description
Ubuntu version: Ubuntu 14.04.1 LTS
Nginx version: 1.4.6-1ubuntu3.1
Steps to reproduce:
1. install nginx
2. add a configuration error to nginx's configuration (echo error > /etc/nginx/
3. reload nginx and check its exit code (/etc/init.d/nginx reload; echo $?)
What should happen:
Nginx should fail to reload with a non zero exit code.
What happens instead
Nginx does not reload, but the init script's exit code is 0. This confuses certain configuration management tools that rely on init scripts' exit codes to determine success.
To post a comment you must log in.
Confirmed in 1.4.6-1ubuntu3.2 from trusty-updates. Not tested with later releases.
I'm marking this as "Confirmed" against Trusty, however it needs testing in Utopic and Vivid to determine the full extent of what's affected.