Repository navigation
Conversation
When syslog symlinks (`/tmp/syslog.log` or `/jffs/syslog.log`) are broken, desynchronized by in-place edits (such as `sed -i` from firewall scripts), or checked during firmware service events, `kill_logger` in `rc.func.syslog-ng` assumed any non-symlink state was an unparsed boot log from stock `syslogd`. As a result, it copied the active system log into `syslogd.ScribeInitReboot.LOG`. Because `syslog-ng` monitors this staging file via `wildcard_file()`, it re-ingested the entire log back into `messages` and remote syslog servers, creating a feedback loop that multiplied log entries on restarts and runtime service events. - `init.d/rc.func.syslog-ng`: Guard the log transfer block in `kill_logger()` so early boot logs are only copied into `syslogd.ScribeInitReboot.LOG` or `messages` during initial service start when `syslog-ng` is not yet running. When `syslog-ng` is active or during runtime link maintenance (`serviceCallOK=false`), repair the broken symlink without copying active system log entries. - `scribe.sh`: Pass `false` to `kill_logger` in `Check_Dir_Links` to avoid treating link checks as fresh service starts. - `scribe.sh`: Truncate `syslogd.ScribeInitReboot.LOG` in `SysLoggerCheck` after `syslog-ng` has ingested the initial boot logs. Fixes AMTM-OSR#101
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #101
When syslog symlinks (
/tmp/syslog.logor/jffs/syslog.log) are broken, desynchronized by in-place edits (such assed -ifrom firewall scripts), or checked during firmware service events,kill_loggerinrc.func.syslog-ngassumed any non-symlink state was an unparsed boot log from stocksyslogd.As a result, it copied the active system log into
syslogd.ScribeInitReboot.LOG. Becausesyslog-ngmonitors this staging file viawildcard_file(), it re-ingested the entire log back intomessagesand remote syslog servers, creating a feedback loop that multiplied log entries on restarts and runtime service events.Changes
init.d/rc.func.syslog-ng: Guard the log transfer block inkill_logger()so early boot logs are only copied intosyslogd.ScribeInitReboot.LOGormessagesduring initial service start whensyslog-ngis not yet running ([ -z "$($pidofCmd syslog-ng)" ] && "$serviceCallOK"). Whensyslog-ngis active or during runtime link maintenance (serviceCallOK=false), repair the broken symlink without copying active system log entries.scribe.sh: Passfalsetokill_loggerinCheck_Dir_Linksto avoid treating routine link checks as fresh service starts.scribe.sh: Truncatesyslogd.ScribeInitReboot.LOGinSysLoggerCheckaftersyslog-nghas finished ingesting the initial boot logs.Testing & Verification
/tmp/syslog.logto a symlink.service_eventandCheck_Dir_Links) restores broken symlinks without copying active log data or pollutingsyslogd.ScribeInitReboot.LOG.SYSLOG_LOC=/tmp/syslog.logandSYSLOG_LOC=/jffs/syslog.log.