:: Re: [DNG] bootlogd: /var/log/boot d…
Top Page
Delete this message
Reply to this message
Author: KatolaZ
Date:  
To: dng
New-Topics: Re: [DNG] bootlogd: /var/log/boot does not get rotated SOLVED
Subject: Re: [DNG] bootlogd: /var/log/boot does not get rotated
On Sat, Mar 02, 2019 at 05:06:10PM +0100, Stefan Krusche wrote:
> Hi KatolaZ,
>
> thank you for the quick reply.
>
> Am Samstag, 2. März 2019 schrieb KatolaZ:
> > Stefan, bootlogd will always log the current boot in /var/log/boot
> > after having renamed it into /var/log/boot~.
>
> Yes, makes sense. Unfortunately this is not happening on my system.
>
> $ ls -l /var/log/boo*
> -rw-r----- 1 root adm 1239019 Mär 2 11:27 /var/log/boot
>
> > In this way you always
> > have the log of the current boot in /var/log/boot and the log of the
> > previous one in /var/log/boot~. So there should be no need to rotate
> > them.
>
> I only have looked into /etc/init.d/bootlogd so far. The copied code
> snippets (with line numbers) tell me that bootlogd logs
> to /run/bootlog:
>
> 16 TMPLOG=/run/bootlog
>
> 20 BOOTLOGD_OPTS="-c -l $TMPLOG"
>


Dear Stefan,

bootlogd only replaces /var/log/boot~ if it is given the option "-r"
(see the bootlogd manpage). It looks like this option is missing from
BOOTLOGD_OPTS above. It should be sufficient to add "-r" there. This
means that you would only keep the log for the last two boots, though.

Another possibility would be to have a logrotate config file for that,
and keep as many logs as you want.

HTH

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[     "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[       @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[     @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]