From 3b6199aaefa2feba84ee5d6907e0a8959e9216e7 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Nov 2019 11:52:15 +0100 Subject: [PATCH] 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 --- configure.ac | 18 +++--------------- src/klogd.c | 2 +- src/syslogd.h | 9 ++------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index 63bd764..dd1d685 100644 --- a/configure.ac +++ b/configure.ac @@ -54,17 +54,13 @@ AC_ARG_WITH(klogd, [klogd=$withval], [klogd='no']) AC_ARG_WITH(klogd-delay, - AS_HELP_STRING([--with-klogd-delay=SEC], [When klogd is started at the same time as syslogd, default: 0]), + AS_HELP_STRING([--with-klogd-delay=SEC], [Delay before klogd connects to syslogd, default: 0]), [klogd_delay=$withval], [klogd_delay='no']) AC_ARG_WITH(suspend-time, - AS_HELP_STRING([--with-suspend-time=SEC], [Retry timeout for remote syslogd servers, default: 180]), + AS_HELP_STRING([--with-suspend-time=SEC], [Retry delay for sending to remote, default: 180]), [suspend_time=$withval], [suspend_time='no']) -AC_ARG_WITH(syslogd-pidfile, - AS_HELP_STRING([--with-syslogd-pidfile=FILE], [custom PID file, default: syslogd.pid]), - [syslogd_pidfile=$withval], [syslogd_pidfile='no']) - AC_ARG_WITH(systemd, [AS_HELP_STRING([--with-systemd=DIR], [Directory for systemd service files])],, [with_systemd=auto]) @@ -86,16 +82,9 @@ AS_IF([test "x$suspend_time" != "xno"],[ AS_IF([test "x$suspend_time" = "xyes"],[ AC_MSG_ERROR([Must supply argument])]) ] - AC_DEFINE_UNQUOTED(INET_SUSPEND_TIME, $suspend_time, [Retry timeout for remote syslgod servers, default: 180]), + AC_DEFINE_UNQUOTED(INET_SUSPEND_TIME, $suspend_time, [Retry delay for sending to remote syslog servers, default: 180]), suspend_time=180) -AS_IF([test "x$syslogd_pidfile" != "xno"],[ - AS_IF([test "x$syslogd_pidfile" = "xyes"],[ - AC_MSG_ERROR([Must supply argument])]) - ] - AC_DEFINE_UNQUOTED(SYSLOGD_PIDNAME, "$syslogd_pidfile", [Custom syslogd PID file]), - syslogd_pidfile="syslogd.pid") - # Check where to install the systemd .service file AS_IF([test "x$with_systemd" = "xyes" -o "x$with_systemd" = "xauto"], [ def_systemd=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) @@ -132,7 +121,6 @@ cat <