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 <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2021-02-21 13:07:56 +01:00
parent d00c9dac74
commit e58b0cf180
2 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ AS_IF([test "x$with_systemd" != "xno"],
[AC_SUBST([systemddir], [$with_systemd])]) [AC_SUBST([systemddir], [$with_systemd])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemd" != "xno"]) 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 # NOTE: This does *not* take prefix/exec_prefix override at "make
# install" into account, unfortunately. # install" into account, unfortunately.
test "x$prefix" = xNONE && prefix=$ac_default_prefix 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`
SBINDIR=`eval echo $SBINDIR` SBINDIR=`eval echo $SBINDIR`
AC_SUBST(SBINDIR) AC_SUBST(SBINDIR)
SYSCONFDIR=`eval echo $sysconfdir`
AC_SUBST(SYSCONFDIR)
# Workaround for as-of-yet unreleased runstatedir support, planned for # Workaround for as-of-yet unreleased runstatedir support, planned for
# autoconf 2.70, which some major distros have backported. # autoconf 2.70, which some major distros have backported.
@ -108,9 +110,7 @@ AC_SUBST(runstatedir)
AC_OUTPUT AC_OUTPUT
# Expand directories for configuration summary, unexpanded defaults: # Expand directories for configuration summary, unexpanded defaults:
# sysconfdir => ${prefix}/etc
# runstatedir => ${localstatedir}/run # runstatedir => ${localstatedir}/run
SYSCONFDIR=`eval echo $sysconfdir`
RUNSTATEDIR=`eval echo $runstatedir` RUNSTATEDIR=`eval echo $runstatedir`
RUNSTATEDIR=`eval echo $RUNSTATEDIR` RUNSTATEDIR=`eval echo $RUNSTATEDIR`

View File

@ -5,8 +5,8 @@ Documentation=man:syslog.conf
Requires=syslog.socket Requires=syslog.socket
[Service] [Service]
Type=simple EnvironmentFile=-@SYSCONFDIR@/default/syslogd
ExecStart=@SBINDIR@/syslogd -sF ExecStart=@SBINDIR@/syslogd -F $SYSLOGD_OPTS
StandardOutput=null StandardOutput=null
Restart=on-failure Restart=on-failure