From 8d2bf370d1b816e7f642ce714948378afbccbcd3 Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Wed, 15 Sep 2021 23:28:27 -0700 Subject: [PATCH] [baseimage]: Logrotate for wtmp and btmp files. (#8743) Added logrotate file for wtmp and btmp to override default conf and set size cap as 100K as done in PR: #865. For buster this is control by separate file wtmp and btmp. Signed-off-by: Abhishek Dosi --- files/image_config/logrotate/logrotate.d/btmp | 7 +++++++ files/image_config/logrotate/logrotate.d/wtmp | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 files/image_config/logrotate/logrotate.d/btmp create mode 100644 files/image_config/logrotate/logrotate.d/wtmp diff --git a/files/image_config/logrotate/logrotate.d/btmp b/files/image_config/logrotate/logrotate.d/btmp new file mode 100644 index 000000000000..e3554d3e6773 --- /dev/null +++ b/files/image_config/logrotate/logrotate.d/btmp @@ -0,0 +1,7 @@ +# no packages own btmp -- we'll rotate it here +/var/log/btmp { + missingok + size 100k + create 0660 root utmp + rotate 1 +} diff --git a/files/image_config/logrotate/logrotate.d/wtmp b/files/image_config/logrotate/logrotate.d/wtmp new file mode 100644 index 000000000000..8eb2663e6b66 --- /dev/null +++ b/files/image_config/logrotate/logrotate.d/wtmp @@ -0,0 +1,7 @@ +# no packages own wtmp -- we'll rotate it here +/var/log/wtmp { + missingok + size 100k + create 0664 root utmp + rotate 1 +}