Hi, On Saturday 03 July 2010 15:13:41 Russ Allbery wrote: > > Here's a proposed patch that implements this. Objections or seconds? > > diff --git a/policy.sgml b/policy.sgml > index bad28af..a676e71 100644 > --- a/policy.sgml > +++ b/policy.sgml > @@ -7868,11 +7868,13 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq > </p> > > <p> > - Log files must be rotated occasionally so that they don't > - grow indefinitely; the best way to do this is to drop a log > - rotation configuration file into the directory > - <file>/etc/logrotate.d</file> and use the facilities provided by > - logrotate.<footnote> > + Log files must be rotated occasionally so that they don't grow > + indefinitely. The best way to do this is to install a log > + rotation configuration file in the > + directory <file>/etc/logrotate.d</file>, normally > + named <file>/etc/logrotate.d/<var>package</var></file>, and use > + the facilities provided by <prgn>logrotate</prgn>. > + <footnote> > <p> > The traditional approach to log files has been to set up > <em>ad hoc</em> log rotation schemes using simple shell > @@ -7897,25 +7899,28 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq > section="8">): > <example compact="compact"> > /var/log/foo/*.log { > -rotate 12 > -weekly > -compress > -postrotate > -/etc/init.d/foo force-reload > -endscript > + rotate 12 > + weekly > + compress > + missingok > + postrotate > + /etc/init.d/foo force-reload > + endscript > }
While we are at it please let's use invoke-rc.d, which is what should be used. The current example could actually be considered as a violation of section 9.3.3.2 (if a logrotate file is considered as a "package maintainer script,") so please take this email as an objection. If invoke-rc.d is not used and the init script follows Policy's requirements for 'force-reload' and 'restart,' the service could be started in a runlevel where it has been explicitly disabled by the administrator. This does not address the case where a service has been stopped but is not disabled for the current runlevel, but that's an issue with invoke-rc.d. The rest looks good. Cheers, -- Raphael Geissert - Debian Developer www.debian.org - get.debian.net
signature.asc
Description: This is a digitally signed message part.