Bug 729932
| Summary: | systemd returns [OK] when program is not configured | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Honza Horak <hhorak> |
| Component: | systemd | Assignee: | Lennart Poettering <lpoetter> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | harald, johannbg, kay, lpoetter, madko, metherid, mschmidt, notting, plautrba |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-10-03 14:30:34 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
LSB exit codes 5 and 6 have been intentionally treated as success since the fix for bug 619931. (In reply to comment #1) > LSB exit codes 5 and 6 have been intentionally treated as success since the fix > for bug 619931. Personally, I don't like this solution, but I definitely can live with that. Since nobody else has a problem with that, I'm closing this. |
Description of problem: When we start a service (which uses SysV init script) using the old style (service test start), systemd prints [OK] or [FAILED] according the returned code. If the init script returns 6 (program is not configured), systemd prints [OK] instead of [FAILED]. This can confuse a user, because he sees [OK], but no service is actually started. Asking systemd for a service's status after then works fine. Version-Release number of selected component (if applicable): systemd-26-8.fc15.x86_64 How reproducible: every-time Steps to Reproduce: 1. create a very simple SysV init file in /etc/init.d/test: #!/bin/bash # Source function library. . /etc/init.d/functions exit 6 2. run "systemctl daemon-reload" 3. run "service test start" 4. see output Actual results: Starting test (via systemctl): [ OK ] Expected results: Starting test (via systemctl): Job failed. See system logs and 'systemctl status' for details. [FAILED] Additional info: Info about init script return codes: http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_non-Status_Actions When we change exit code in init script to 1, 2, 3 or 4, it works as expected. I think one of the following changes will fix this issue: 1) to print [FAILED] even if code 5 or 6 is returned 2) not print any message at all, like it is done when we use "systemctl start test.service"