Skip to content

Commit e6a0fba

Browse files
authored
[logrotate]Fix logrotate firstaction script to reflect correct size (#12599)
- Why I did it Fix logrotate firstaction script to reflect correct size. The size was modified to change dynamically based on disk size. However this variable was not updated #9504 - How I did it Updated the variable based on disk size - How to verify it Verify in the generated rsyslog file if the variable is correctly generated from jinja template
1 parent c8c2b7f commit e6a0fba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

files/image_config/logrotate/rsyslog.j2

+4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@
5050
NUM_LOGS_TO_ROTATE=8
5151

5252
# Adjust LOG_FILE_ROTATE_SIZE_KB to reflect the "size" parameter specified above, in kB
53+
{% if var_log_kb <= 204800 %}
5354
LOG_FILE_ROTATE_SIZE_KB=1024
55+
{% else %}
56+
LOG_FILE_ROTATE_SIZE_KB=16384
57+
{% endif %}
5458

5559
# Reserve space for btmp, wtmp, dpkg.log, monit.log, etc., as well as logs that
5660
# should be disabled, just in case they get created and rotated

0 commit comments

Comments
 (0)