ColinTaylor
Part of the Furniture
This was previously discussed in the 386.4 beta thread, for example here. Since then I've revisited this problem and think I have a better understanding of it now.
When the logger is first started it attempts to copy the previous copies of syslog.log and syslog.log-1 from /jffs to /tmp. It appears that neither of these files are being copied and therefore syslogd creates a new syslog.log file in /tmp. watchdog subsequently copies this file from /tmp back to /jffs, effectively overwriting the pre-boot file.
As syslog.log-1 does not exist in /tmp the pre-boot version is still intact in /jffs for now. However, the GUI System Log is looking at files in /tmp so it doesn't display the contents of this old file. Restarting logger causes syslog.log to be copied to /jffs (like watchdog does) and then copies syslog.log and syslog.log-1 from /jffs to /tmp. This causes the contents of syslog.log-1 to reappear in the GUI.
So the question is, what has changed that causes the old files to not be copied to /tmp on startup? I believe it's because of this change. The following lines were added to init.c:
Those new lines appear immediately before this:
I suspect that when the logger is started this early /jffs has not been mounted. I believe /jffs is mounted in the following sysinit() procedure.
So the question now is why have Asus done this? Why is there specific code added just for the RT-AX86U and RT-AX68U that effects the logger? Is the solution simply a case of moving those new lines to after the sysinit()?
@RMerlin : Any thoughts?
P.S. The following new code was also added. It's obviously connected in some way that I don't understand.
When the logger is first started it attempts to copy the previous copies of syslog.log and syslog.log-1 from /jffs to /tmp. It appears that neither of these files are being copied and therefore syslogd creates a new syslog.log file in /tmp. watchdog subsequently copies this file from /tmp back to /jffs, effectively overwriting the pre-boot file.
As syslog.log-1 does not exist in /tmp the pre-boot version is still intact in /jffs for now. However, the GUI System Log is looking at files in /tmp so it doesn't display the contents of this old file. Restarting logger causes syslog.log to be copied to /jffs (like watchdog does) and then copies syslog.log and syslog.log-1 from /jffs to /tmp. This causes the contents of syslog.log-1 to reappear in the GUI.
So the question is, what has changed that causes the old files to not be copied to /tmp on startup? I believe it's because of this change. The following lines were added to init.c:
Code:
#if defined(RTAX86U) || defined(RTAX68U)
start_logger();
#endif
Code:
sysinit();
I suspect that when the logger is started this early /jffs has not been mounted. I believe /jffs is mounted in the following sysinit() procedure.
So the question now is why have Asus done this? Why is there specific code added just for the RT-AX86U and RT-AX68U that effects the logger? Is the solution simply a case of moving those new lines to after the sysinit()?
@RMerlin : Any thoughts?
P.S. The following new code was also added. It's obviously connected in some way that I don't understand.
Code:
case SIGUSR2: /* START */
#if !defined(RTAX86U) && !defined(RTAX68U)
stop_logger();
start_logger();
#endif
Last edited: