Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367819 - net-analyzer/fail2ban-0.8.4-r3: initscript not completely openrc compatible
Summary: net-analyzer/fail2ban-0.8.4-r3: initscript not completely openrc compatible
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 367793
  Show dependency tree
 
Reported: 2011-05-17 21:05 UTC by Robert Trace
Modified: 2011-05-18 18:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Remove svc_(start|stop) and make openrc compatible (gentoo-initd_openrc_support.patch,573 bytes, patch)
2011-05-17 21:06 UTC, Robert Trace
Details | Diff
fail2ban-0.8.4-r3.ebuild add openrc support patch (fail2ban-0.8.4-r3.ebuild-openrc.patch,531 bytes, patch)
2011-05-17 21:07 UTC, Robert Trace
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Trace 2011-05-17 21:05:03 UTC
Initscript uses svc_(start|stop).  These functions don't appear to be supported
in openrc.

Reproducible: Always
Comment 1 Robert Trace 2011-05-17 21:06:30 UTC
Created attachment 273719 [details, diff]
Remove svc_(start|stop) and make openrc compatible
Comment 2 Robert Trace 2011-05-17 21:07:49 UTC
Created attachment 273721 [details, diff]
fail2ban-0.8.4-r3.ebuild add openrc support patch
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2011-05-18 09:01:49 UTC
So you mean that the restart() function does not properly restart the service? It does nothing? Cause for me it works just fine. But I will have a look anyway
Comment 4 Robert Trace 2011-05-18 17:52:43 UTC
(In reply to comment #3)
> So you mean that the restart() function does not properly restart the service?
> It does nothing? Cause for me it works just fine. But I will have a look anyway

Openrc hardcodes the restart() function and ignores anything in the script.  So, yes, a "/etc/init.d/fail2ban restart" will work, but it's not executing the code in the initscript.  Since svc_stop/svc_start no longer exist, there's no way a restart should ever work.  The fact that it's working means that openrc is ignoring it.

Is this wrong/broken?  Functionally, not really, but since the restart() function in the script isn't doing anything (if it ever does, then it _is_ broken, since svc_stop won't work), it should be removed.  This would also clean up a misleading example of how the init system works.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2011-05-18 18:05:38 UTC
You are right. I fixed the code but I didn't revbump the ebuild since it didn't affect the functionality of the package. Thanks for reporting