Bug 521828
| Summary: | firstboot init script is not LSB compliant - returns 3 instead of 2 when missing arguments | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alexander Todorov <atodorov> | ||||
| Component: | firstboot | Assignee: | Chris Lumens <clumens> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | rawhide | CC: | clumens | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2009-09-15 13:47:07 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 521669 | ||||||
| Attachments: |
|
||||||
I'd prefer one bug for the whole pile of things like this. I'd even more prefer patches, since I'm busily working on a million other things and won't have time to get to script nitpicking any time soon. --- firstboot.orig 2009-09-10 09:33:32.584803675 -0400
+++ firstboot 2009-09-10 09:33:49.785807178 -0400
@@ -76,6 +76,6 @@
*)
echo $"Usage: $0 {start|stop}"
- exit 3
+ exit 2
;;
esac
this one fixes the exit code. I have to look more carefully into the other things (to be sure they are valid bugs) and will post patches here.
Pulled this fix in - thanks. I'll wait for the rest before closing this bug. Created attachment 361074 [details] firstboot lsb compliance patch Patch is against firstboot-1.109-1.fc12.i686 in rawhide. It does: - add additional # character for the LSB header start/end lines - add check if root is running the program - add check if the program executable exists - add restart/reload/status, etc actions and exit with 3 - not implemented and print usage - move the usage statement into a function because it's used twice Changes follow: https://fedoraproject.org/wiki/Packaging/SysVInitScript Sections: Exit_Codes_for_non-Status_Actions Required actions You can close the bug after applying this patch. Great, thanks for the patch. |
Description of problem: service firstboot ; echo $? Usage: /etc/init.d/firstboot {start|stop} 3 Version-Release number of selected component (if applicable): firstboot-1.108-1.fc12.i686 How reproducible: Always Steps to Reproduce: 1. service firstboot ; echo $? 2. 3. Actual results: 3 Expected results: 2 Additional info: See: https://fedoraproject.org/wiki/Packaging/SysVInitScript#Exit_Codes_for_non-Status_Actions 2: invalid or excess argument(s)