-
Notifications
You must be signed in to change notification settings - Fork 7
RDKEMW-10363: Update logrotate Conf from Middleware Layer on RDK devices #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /opt/logs/*.txt | ||
| /opt/logs/*.log | ||
| /opt/logs/*.txt.0{ | ||
| size 2097152 | ||
| rotate 1 | ||
| create | ||
|
||
| missingok | ||
| ignoreduplicates | ||
| postrotate | ||
| syslog-ng-ctl reopen --control=/tmp/syslog-ng/syslog-ng.ctl | ||
| endscript | ||
|
Comment on lines
+6
to
+11
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,6 @@ do_install(){ | |
| mkdir -p ${D}${sysconfdir}/logrotate.d | ||
| mkdir -p ${D}${localstatedir}/lib | ||
| install -p -m 644 ${S}/examples/logrotate.conf ${D}${sysconfdir}/logrotate.conf | ||
| install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp | ||
| install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp | ||
| touch ${D}${localstatedir}/lib/logrotate.status | ||
|
Comment on lines
70
to
73
|
||
|
|
||
|
|
||
|
|
@@ -84,5 +82,5 @@ do_install(){ | |
|
|
||
|
|
||
| do_install:append:client(){ | ||
| install -m 0644 ${S}/logrotate_nohdd.conf ${D}${sysconfdir}/logrotatemax.conf | ||
| install -m 0644 ${WORKDIR}/logrotate_nohdd.conf ${D}${sysconfdir}/logrotatemax.conf | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,15 @@ | ||||||||||||||||||
| FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" | ||||||||||||||||||
|
|
||||||||||||||||||
| SRC_URI:append = " file://logrotate-update-service-files.patch \ | ||||||||||||||||||
| file://logrotate_memory_issues.patch \ | ||||||||||||||||||
| SRC_URI:append = " file://logrotate_memory_issues.patch \ | ||||||||||||||||||
| file://logrotate-update-log-files.patch \ | ||||||||||||||||||
| file://fix_fd_leak.patch \ | ||||||||||||||||||
| file://logrotate_nohdd.conf \ | ||||||||||||||||||
| " | ||||||||||||||||||
|
|
||||||||||||||||||
| PACKAGES =+ "${PN}-conf" | ||||||||||||||||||
|
|
||||||||||||||||||
| FILES:${PN}-conf += "${sysconfdir}/logrotatemax.conf" | ||||||||||||||||||
| FILES:${PN}-conf += "${sysconfdir}/logrotate.conf" | ||||||||||||||||||
|
|
||||||||||||||||||
| FILES:${PN}:remove = "${sysconfdir}/logrotatemax.conf" | ||||||||||||||||||
|
Comment on lines
+11
to
+14
|
||||||||||||||||||
| FILES:${PN}-conf += "${sysconfdir}/logrotatemax.conf" | |
| FILES:${PN}-conf += "${sysconfdir}/logrotate.conf" | |
| FILES:${PN}:remove = "${sysconfdir}/logrotatemax.conf" | |
| FILES:${PN}-conf:client += "${sysconfdir}/logrotatemax.conf" | |
| FILES:${PN}-conf += "${sysconfdir}/logrotate.conf" | |
| FILES:${PN}:client:remove = "${sysconfdir}/logrotatemax.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logrotate configuration includes overlapping file patterns: '/opt/logs/.txt', '/opt/logs/.log', and '/opt/logs/.txt.0'. The third pattern '/opt/logs/.txt.0' appears to target already-rotated files, which would match files like 'example.txt.0'. This could cause logrotate to attempt rotating already rotated files, leading to unexpected behavior. Verify if this is intentional or if it should be adjusted to only target active log files.