Control: tags -1 patch

Bjarni,

On Mon, Apr 10, 2023 at 08:38:34PM +0100, Mark Hindley wrote:
> Yes, I think this code might be cruft from before the change to bootlog using
> /run/bootlog.
> 
> We may still need to implement savelog rotation for /run/bootlog ->
> /var/log/boot though. I will test that.

I have confirmed that boot logging works with the correct initscripts installed.

The code you quoted is obsolete handling of /var/log/boot~ which predates the
switch to /run/bootlog.

The only thing that appears missing is rotation of /var/log/boot*.

I proposed the following patch to address these issues.

Mark

commit 2443d3ad1c977a2e7948ba1884b8a099411a1b95
Author: Mark Hindley <[email protected]>
Date:   Wed Apr 12 09:48:11 2023 +0100

    Remove obsolete handling of /var/log/boot~ and restore rotation of 
/var/log/boot.

diff --git a/debian/src/bootlogd/etc/init.d/bootlogd 
b/debian/src/bootlogd/etc/init.d/bootlogd
index 5e810e90..0e8a734b 100644
--- a/debian/src/bootlogd/etc/init.d/bootlogd
+++ b/debian/src/bootlogd/etc/init.d/bootlogd
@@ -68,22 +68,10 @@ case "$ACTION" in
        [ "$VERBOSE" != no ] && log_end_msg $ES
        if [ -r "$TMPLOG" ]
        then
+               savelog -q -p -n -c 5 /var/log/boot
                cat "$TMPLOG" >> /var/log/boot
                rm -f "$TMPLOG"
        fi
-       if [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
-       then
-               [ "$VERBOSE" = no ] || log_action_begin_msg "Moving boot log 
file"
-               # bootlogd writes to boot, making backup at boot~
-               cd /var/log && {
-                       chgrp adm boot || :
-                       savelog -q -p -c 5 boot &&
-                           mv boot.0 boot      &&
-                           mv boot~ boot.0
-               }
-               ES=$?
-               [ "$VERBOSE" = no ] || log_action_end_msg $ES
-       fi
        ;;
   restart|force-reload)
        "$0" stop

Reply via email to