This package installs systemd file, yet its logrotate file assumes OpenRC. Reproducible: Always
Some more details on what to fix would be nice!
The logrotate file calls the openrc init script /etc/init.d/denyhosts stop/start in prerotate and postrotate hooks. This will not work with systemd. One possible solution: Create a shell script to detect if the system is booted via systemd or openrc, and invoke the appropriate init system. It's pretty ugly, but it could work. As a general comment, stopping/starting the service is a rather ugly method for doing this. Does the daemon not offer some way to do this more cleanly?
There could be at least two ways which I have seen. a) like in app-admin/syslog-ng if use systemd ; then sed \ 's/@GENTOO_RESTART@/systemctl kill -s HUP syslog-ng/' \ $f > ${f/.in/} || die else sed \ 's:@GENTOO_RESTART@:/etc/init.d/syslog-ng reload:' \ $f > ${f/.in/} || die fi b) like in net-analyzer/munin (logrotate.d-munin.3) test -e /run/openrc/softlevel && /etc/init.d/munin-node restart 1>/dev/null || true test -e /run/systemd/system && systemctl restart munin-node 1>/dev/null || true
(In reply to Christoph Junghans from comment #1) > Some more details on what to fix would be nice! if you insist :)
(In reply to SN (Enlik) from comment #3) That syslog-ng example is rather bad. I'm tempted to go fix that.
I also prefer "munin's way"
(In reply to Pacho Ramos from comment #6) > I also prefer "munin's way" Agreed, Enlik can you create a patch for us?
I don't even use it - just wanted to have it sorted for Sabayon, but I can try to come up with something within a few days. With something that hopefully addresses Mike's comment: "As a general comment, stopping/starting the service is a rather ugly method for doing this. Does the daemon not offer some way to do this more cleanly?"
+*denyhosts-2.6-r10 (14 May 2014) + + 14 May 2014; Christoph Junghans <ottxor@gentoo.org> +denyhosts-2.6-r10.ebuild, + +files/denyhosts.logrotate-r2: + provide logrotate.d entry that works with systemd (bug #508524) +
I was really going to! Sorry for the delay and thanks for this.