From e58b0cf180f5b26ed02788ac1833d05b8031f60f Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 21 Feb 2021 13:07:56 +0100 Subject: [PATCH] syslogd.service: read SYSLOGD_OPTS from /etc/default/syslogd - drop hard-coded -s from syslogd command line - allow options to be read from /etc/default/syslogd Signed-off-by: Joachim Wiberg --- configure.ac | 6 +++--- syslogd.service.in | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 418582b..3ff8a77 100644 --- a/configure.ac +++ b/configure.ac @@ -91,7 +91,7 @@ AS_IF([test "x$with_systemd" != "xno"], [AC_SUBST([systemddir], [$with_systemd])]) AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemd" != "xno"]) -# Expand $sbindir early, into $SBINDIR, for systemd unit file +# Expand $sbindir and @$sysconfdir early, for systemd unit file # NOTE: This does *not* take prefix/exec_prefix override at "make # install" into account, unfortunately. test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -99,6 +99,8 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' SBINDIR=`eval echo $sbindir` SBINDIR=`eval echo $SBINDIR` AC_SUBST(SBINDIR) +SYSCONFDIR=`eval echo $sysconfdir` +AC_SUBST(SYSCONFDIR) # Workaround for as-of-yet unreleased runstatedir support, planned for # autoconf 2.70, which some major distros have backported. @@ -108,9 +110,7 @@ AC_SUBST(runstatedir) AC_OUTPUT # Expand directories for configuration summary, unexpanded defaults: -# sysconfdir => ${prefix}/etc # runstatedir => ${localstatedir}/run -SYSCONFDIR=`eval echo $sysconfdir` RUNSTATEDIR=`eval echo $runstatedir` RUNSTATEDIR=`eval echo $RUNSTATEDIR` diff --git a/syslogd.service.in b/syslogd.service.in index f967dd5..bc82af9 100644 --- a/syslogd.service.in +++ b/syslogd.service.in @@ -5,8 +5,8 @@ Documentation=man:syslog.conf Requires=syslog.socket [Service] -Type=simple -ExecStart=@SBINDIR@/syslogd -sF +EnvironmentFile=-@SYSCONFDIR@/default/syslogd +ExecStart=@SBINDIR@/syslogd -F $SYSLOGD_OPTS StandardOutput=null Restart=on-failure