Drop --with-syslogd-pidfile from configure, use -P option to syslogd

This patch drops the configure flag --with-syslogd-pidfile=foo since
syslogd now natively supports custom PID file using -P foo.

Also, the default PID file and syslog.conf paths have been changed from
the hard-coded /var/run (_PATH_VARRUN) and /etc to use configure paths.
This may not be appreciated by everyone but allows the project to have
support for all use-cases in a de facto standard fashion.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2019-11-13 11:52:15 +01:00
parent 4b175653cb
commit 3b6199aaef
3 changed files with 6 additions and 23 deletions

View File

@@ -45,7 +45,7 @@
static struct syslog_data log = SYSLOG_DATA_INIT;
static char *PidFile = _PATH_VARRUN "klogd.pid";
static char *PidFile = LOCALSTATEDIR "/run/klogd.pid";
static int kmsg;
static int change_state = 0;

View File

@@ -68,16 +68,11 @@
#endif
#ifndef _PATH_LOGCONF
#define _PATH_LOGCONF "/etc/syslog.conf"
#define _PATH_LOGCONF SYSCONFDIR "/syslog.conf"
#endif
#if defined(SYSLOGD_PIDNAME)
#undef _PATH_LOGPID
#define _PATH_LOGPID _PATH_VARRUN SYSLOGD_PIDNAME
#else
#ifndef _PATH_LOGPID
#define _PATH_LOGPID _PATH_VARRUN "syslogd.pid"
#endif
#define _PATH_LOGPID LOCALSTATEDIR "/run/syslogd.pid"
#endif
#ifndef _PATH_DEV