| Summary: | sys-apps/openrc: allow init scripts to override default status function | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Tomáš Chvátal (RETIRED) <scarabeus> |
| Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | hollow, roy |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Tomáš Chvátal (RETIRED)
2008-03-29 19:21:59 UTC
Can you give a functional example? I'm opposed to this unless there's some real benefit. How about rc-status? How do you expect that to work? rc-status doesnt work the same way overriding the default status function is fine as the output is meant for humans to consume (In reply to comment #2) > overriding the default status function is fine as the output is meant for > humans to consume What about the return value? A lot of 3rd party scripts do this if /etc/init.d/foo --quiet status; then $action_if_started else $action_if_stopped fi that is why i referred to the output, not the exit status Well aware that rc-status doesn't work the same. But let's say the proposal is the have Apache say "Serving # vhosts". Would you want rc-status to just say "started" or some shortened version there of. That was my question to the user what HE expected in his suggestion. ok i put status function to my firewall just for testing. on old baselayout output looks like: root@hlukotvor: ~ # rc-status firewall [ started ] ... root@hlukotvor: ~ # /etc/init.d/firewall status * status: started ### /sbin/iptables -nvL ################################# Chain INPUT (policy DROP 4012 packets, 474K bytes) ... with baselayout2 and openrc: scarab@Ugly-Elf: ~ > s rc-status firewall [ started ] ... scarab@Ugly-Elf: ~ > s /etc/init.d/firewall status * status: started so allow another functions into initscripts and i will use them unless that i need more info from some scripts than "status: started" really Roy? Mike? fixed in 0.4.3-r2, thanks (In reply to comment #9) > fixed in 0.4.3-r2, thanks > I LOVE YOU :] (note this is not spam i am really happy and really sorry i had no time to do it myself) |