Mosquitto won't start on boot after raspbian and emonsd update

Hello,

I had a look to overlayFS but it seems that you cannot “commit” the changes without unmounting the upper fs so it makes it tricky. And I definitely found ramlog too complex.

I finally pushed a new version of the logfile init/backup/restore here on github. It is working much as log2ram

So here are the results

On startup : it restores the backup if any and restore the default logfile “template” if needed.
Every hour and on shutdown, it makes a backup.

I did a test and it seems to work quite nicely. Looking at /var/log/messages :

Mar 14 20:35:32 emonpi rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="534" x-info="http://www.rsyslog.com"] start
Mar 14 20:35:32 emonpi kernel: [    0.000000] Booting Linux on physical CPU 0x0
...
Mar 14 20:40:06 emonpi rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="534" x-info="http://www.rsyslog.com"] exiting on signal 15.
Mar 14 20:40:16 emonpi rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="544" x-info="http://www.rsyslog.com"] start

So it seems :

  • last backup on shutdown occurs after rsyslogd is stopped which may be late enough
  • restore on boot occurs before rsyslogd starts which may be soon enough

I will push that to my live emonpi a see how it goes.
Any comment, correction, improvement is welcome.

If you think it is usefull, I will do a PR !

1 Like