diverting the diversion (serious question)

Lorenzo plorenzo at disroot.org
Tue Mar 4 22:12:11 GMT 2025


Hi Mark,

On Tue, 4 Mar 2025 11:03:46 +0000
Mark Hindley <mark at hindley.org.uk> wrote:

> Lorenzo,
> 
> On Tue, Mar 04, 2025 at 12:41:34AM +0100, Lorenzo wrote:
> > not a theoretical question: I have the same issue with logrotate and
> > rsyslogd as there was in o-s-s[1], but o-s-s already diverts the
> > file in /usr/lib/rsyslog so I was wondering if runit-services and
> > o-s-s could cooperate by agree to use an identical version of the
> > diverted file..
> 
> Do you have a patch for the o-s-s version of
> /usr/lib/rsyslog/rsyslog-rotate that would add runit support? How can
> you reliably identify a system running runit?
> 
> Mark

the check would be something like

if [ -f /etc/runit/stopit ] && [ -e /etc/service/rsyslog ]; then
# runit is init and rsyslog service is enabled
	sv hup rsyslog
fi

but since I can't divert the same file o-s-s already diverts, I prefer
to keep the funny and imperfect fix[1] that I already have in place
for this.

[1] I'm adding a "aa-rsyslog-runit" logrotate file in /etc/logrotate.d/
which in fact overrides the one from rsyslog package, with the "only"
problem that logrotate complains on daily basis of duplicate entries
(see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092031)

Thanks,
Lorenzo



More information about the Debian-init-diversity mailing list