I've been banging away at this and ended up last night not being able to start syslog-ng at all, so this morning I blew everything away. I deleted all of /syslog-ng.d, all of /logrotate.d, the S01 script, the conf files, the syslog-log files, the /jffs/syslog-log directories, reset the skynet custom location to default, rebooted and started fresh. I will note that this is on a 56U, so I'm stuck at 384.6.
I then did "scribe update" and got 0.5.5. Then I did "scribe install". I ended up roughly where
@faria is, that is, syslogd exits, syslog-ng starts, at some point if syslog.log is a symlink it gets destroyed and recreated. messages continues to receive all syslog-ng messages, but syslog.log gets created from syslog.log-1 from somewhere and then stops.
I now have two important sources of failure, and one less important one.
The first is that skynet's location never got pointed to messages. I think that is what is creating syslog.log anew. Not sure why.
The second is that the symlink creation in rc.func.syslog-ng is never getting invoked. I put in a bunch of logger messages in there. I can see the file getting called the first time, and then exiting. So that will have formed the precmd string. Then I can see rc.func getting called, and I can see the precmd function starting and doing the kill_all. But the logger I put inside what runs if the symlink doesn't exist never is triggered. Creating the directories did work though.
Here's what I had
Code:
if [ ! -L "/tmp/syslog.log" ]; then
logger -t rc.func.syslog-ng "starting forming symlink"
cat /tmp/syslog.log >> /opt/var/log/messages
rm /tmp/syslog.log /tmp/syslog.log-1
ln -s /opt/var/log/messages /tmp/syslog.log
logger -t rc.func.syslog-ng "finishing forming symlink"
fi
Rebooting when no symlink existed didn't trigger either of those logger messages. So something about that if statement seems to be misfiring. I tried it with the ! outside the test brackets, too. I also tried replacing ! -L with -f, and that didn't work. But when I manually changed skynet's location, the prior symlinks held through a reboot.
The less important one is that when "I blew everything away" I forgot to do "opkg remove syslog-ng" and "opkg remove logrotate". So the scribe install got to the installation opkg saw they were installed and failed to do anything else.