[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
This commit is contained in:
Sudharsan Dhamal Gopalarathnam 2022-11-08 03:38:14 -08:00 committed by GitHub
parent c8c2b7fc45
commit e6a0fba9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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