[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#445203: debian-policy: 10.8. Log files: /etc/logrotate.d/<package> preferred



Thijs Kinkhorst <thijs@debian.org> writes:
> On snein 11 July 2010, Steve Langasek wrote:
>>  On Thu, Jul 08, 2010 at 09:22:28AM -0700, Russ Allbery wrote:
>>> Guillem Jover <guillem@debian.org> writes:

>>>> Probably better to recommend using start-stop-daemon, as it's more
>>>> robust and should properly handle for example the case of a stale pid
>>>> file pointing to the wrong binary (which with HUP might terminate an
>>>> unsuspecting victim).

>>> Good point.  I now have:
>>>     postrotate
>>>         start-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo
>>>-q endscript

>> Heh, that's just makes me want to weep at the awkwardness of
>> duplicating information that should be encapsulated in the init
>> script. :)  I really think "/etc/init.d/$foo reload" makes a more
>> suitable example, but I at least don't think the above is wrong - so no
>> objections.  I'll just focus on making sysvinit scripts obsolete by way
>> of upstart, I think. :)

> I would also use Steve's suggestion as the most straightforward example. 

> Proposal seconded either with Rus's line quoted above or Steve's suggested 
> line for postrotate.

I've gone ahead and merged this using start-stop-daemon while we discuss
how to deal with init scripts in the other bug.  I think we need to
overhaul the init script policy, both for that and for other reasons (such
as LSB headers), and once we do that, we can fix up this example again.
The start-stop-daemon example has the advantage of not taking a side and
not being wrong whichever direction we go.

Thank you all for the review!

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: