This patch to the logrotate() function extends the log rotattion of a
file with a gzip of .2 and older log files. If gzip is not available
in $PATH then @num files are left uncompressed.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds a simple log-rotate function to the UTMP, WTMP, BTMP,
and lastlog files. Enabled by default, disable with:
configure --disable-logrotate
Even though it can rotate /run/utmp it is unlikely this file will grow
that much during a system's uptime.
The hard-coded defaults are to keep up to two (2) previous versions
of the files and rotate on file size >= 100k.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>