From 4ebccc614956fb6e7782a896d51931993fef6ef2 Mon Sep 17 00:00:00 2001 From: dgsudharsan Date: Wed, 2 Nov 2022 03:56:50 +0000 Subject: [PATCH] [logrotate]Fix logrotate firstaction script to reflect correct size --- files/image_config/logrotate/rsyslog.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/image_config/logrotate/rsyslog.j2 b/files/image_config/logrotate/rsyslog.j2 index 28a7d9dd2ee0..25db65ac48b8 100644 --- a/files/image_config/logrotate/rsyslog.j2 +++ b/files/image_config/logrotate/rsyslog.j2 @@ -50,7 +50,11 @@ NUM_LOGS_TO_ROTATE=8 # Adjust LOG_FILE_ROTATE_SIZE_KB to reflect the "size" parameter specified above, in kB +{% if var_log_kb <= 204800 %} LOG_FILE_ROTATE_SIZE_KB=1024 +{% else %} + LOG_FILE_ROTATE_SIZE_KB=16384 +{% endif %} # Reserve space for btmp, wtmp, dpkg.log, monit.log, etc., as well as logs that # should be disabled, just in case they get created and rotated