Monthly cron generates error if wtmp hasn't been rotated

Bug #1886048 reported by Rowan Wookey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acct (Ubuntu)
New
Undecided
Unassigned

Bug Description

The logrotate config for wtmp on focal looks like this:

# no packages own wtmp -- we'll rotate it here
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    minsize 1M
    rotate 1
}

It only rotates if wtmp is larger than 1M. In the case of a fresh install that has a wtmp smaller than 1M it won't rotate and /var/log/wtmp.1 won't exist, in this case we should use /var/log/wtmp

I've attached a patch.

Revision history for this message
Rowan Wookey (rwky) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.