On Friday 17 June 2005 16:28, The Undefined wrote:
> On Fri, Jun 17, 2005 at 04:09:21PM +0300, Elan Ruusamäe wrote:
> > > How do you want to make bind log outside the chroot??
> >
> > hmm, if bind chroot is %{_var}/lib/named
> > then %{_var}/lib/named/named.log is inside chroot
>
> what about logrotate then? when archive is on /var/log?
> (logrotate can't work, when source and archive are on different
> partitions)
unless you have /var/log as separate partition thenm yes. but usually people 
have /var in one piece :)

and logrotate can be made work using lastaction script:

/var/lib/named/named.log {
        create 640 named named

        # must be on same partition as log itself.
        olddir /var/lib/named

        # lastaction script does the compress
        nocompress

        # just to limit for on expression below
        rotate 9

        postrotate
                /bin/killall -HUP named
        endscript

        lastaction
                for a in /var/lib/named/*.?; do
                        /usr/bin/bzip2 < $a > /var/log/archiv/named/$(basename 
$a) && rm -f $a
                done
        endscript
}

(note: this script is not tested)

also it can be made working with copytruncate option, i believe, that could 
cause lost loglines, which isn't good either.

-- 
glen
_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to