From b0d4e4cc3f8b8a923aa8c256b0817d8c52a9af11 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 26 Jul 2021 14:04:45 +0200 Subject: [PATCH] Fix #40: update docs and online help text wrt. caching of kmsg seqno Signed-off-by: Joachim Wiberg --- README.md | 5 +++++ man/syslogd.8 | 12 +++++++++++- src/syslogd.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e8e906e..e518591 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,11 @@ sudo make install-strip You may want to remove the `--prefix=/usr` option. Most users prefer non-distro binaries in `/usr/local` or `/opt`. +> **Note:** the `--runstatedir` option should point to a filesystem +> that is cleaned at reboot. syslogd relies on this for +> its `syslogd.cache` file, which keeps track of the last +> read kernel log message from `/dev/kmsg`. + Building from GIT ----------------- diff --git a/man/syslogd.8 b/man/syslogd.8 index a123cc9..e053f97 100644 --- a/man/syslogd.8 +++ b/man/syslogd.8 @@ -220,6 +220,13 @@ If cannot write to, or read from, this file it will cause repeated kernel log messages when restarting .Nm . +.Pp +.Sy Note: +.Nm +relies on this file being removed at system reboot. The default +location depends on the system and how +.Nm +was configured. .It Fl d Put .Nm @@ -461,7 +468,10 @@ conventional name for default rules. default process ID file .It Pa /var/run/syslogd.cache cache of last read sequence number from -.Pa /dev/kmsg +.Pa /dev/kmsg . +Please note, +.Nm +relies on this file being removed at system reboot. .It Pa /dev/log name of the .Ux diff --git a/src/syslogd.c b/src/syslogd.c index d73f079..cfd5317 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -275,6 +275,7 @@ int usage(int code) " default: 'syslog', port 514\n" "\n" " -C FILE File to cache last read kernel seqno, default: %s\n" + " Note: syslogd relies on this file being removed at system reboot.\n" " -d Enable debug mode, implicitly enables -F to prevent backgrounding\n" " -F Run in foreground, required when monitored by init(1)\n" " -f FILE Alternate .conf file, default: %s\n"