diff --git a/rc.earlysyslog b/rc.earlysyslog index 81d9389..974d5c9 100644 --- a/rc.earlysyslog +++ b/rc.earlysyslog @@ -21,6 +21,15 @@ BINDIR=/sbin +# update $SYSLOG_DAEMON if not up-to-date +test -n "$SYSLOG_DAEMON" && \ +test -x "${BINDIR}/$SYSLOG_DAEMON" || { + for SYSLOG_DAEMON in syslog-ng syslogd ; do + test -x "${BINDIR}/$SYSLOG_DAEMON" && break + done +} + +# set daemon dependent variables case "$SYSLOG_DAEMON" in syslog-ng) syslog=syslog-ng diff --git a/rc.syslog b/rc.syslog index ab2cb6f..f616f69 100644 --- a/rc.syslog +++ b/rc.syslog @@ -22,6 +22,15 @@ BINDIR=/sbin +# update $SYSLOG_DAEMON if not up-to-date +test -n "$SYSLOG_DAEMON" && \ +test -x "${BINDIR}/$SYSLOG_DAEMON" || { + for SYSLOG_DAEMON in syslog-ng syslogd ; do + test -x "${BINDIR}/$SYSLOG_DAEMON" && break + done +} + +# set daemon dependent variables case "$SYSLOG_DAEMON" in syslog-ng) syslog=syslog-ng diff --git a/sysconfig.syslog b/sysconfig.syslog index edafbfc..ca66cc2 100644 --- a/sysconfig.syslog +++ b/sysconfig.syslog @@ -29,13 +29,12 @@ SYSLOGD_PARAMS="" # KLOGD_PARAMS="-x" -## Type: list(syslogd,syslog-ng) -## Default: syslogd -## Config: syslog-ng -## Command: /sbin/rcsyslog restart -## PreSaveCommand: /sbin/rcsyslog status && /sbin/rcsyslog stop +## Type: list(syslogd,syslog-ng,"") +## Default: "" +## Config: "" +## ServiceRestart: syslog # -# The name of the syslog daemon used as -# syslog service: "syslogd", "syslog-ng" +# The name of the syslog daemon to use as syslog service: +# "syslogd", "syslog-ng" or "" for autodetect. # -SYSLOG_DAEMON="syslogd" +SYSLOG_DAEMON="" diff --git a/syslogd.changes b/syslogd.changes index 1a3cadf..d1c1a48 100644 --- a/syslogd.changes +++ b/syslogd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 14 13:36:34 CEST 2007 - mt@suse.de + +- Bug #256671: Changed default value of SYSLOG_DAEMON variable in + /etc/sysconfig/syslog to "" (autodetect), adopted description. + Added check to init scripts, that sets SYSLOG_DAEMON variable + to one of the currently installed daemons in case it is empty + or not up-to-date. Added reset of the variable in rpm postun. + ------------------------------------------------------------------- Tue Jan 9 13:32:17 CET 2007 - mt@suse.de diff --git a/syslogd.spec b/syslogd.spec index 057e2b6..864a16a 100644 --- a/syslogd.spec +++ b/syslogd.spec @@ -19,7 +19,7 @@ PreReq: klogd Provides: syslog Autoreqprov: on Version: 1.4.1 -Release: 591 +Release: 605 Summary: The Syslog daemon Source: sysklogd-1.4.1.tar.bz2 Source1: logrotate.syslog @@ -182,6 +182,14 @@ chown news:news var/log/news/news.notice %postun %restart_on_update syslog %{insserv_cleanup} +# reset SYSLOG_DAEMON variable +if test -f etc/sysconfig/syslog ; then + source etc/sysconfig/syslog + if test "$SYSLOG_DAEMON" == "syslogd" ; then + sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \ + etc/sysconfig/syslog + fi +fi %preun -n klogd %stop_on_removal syslog @@ -211,7 +219,13 @@ chown news:news var/log/news/news.notice %dir %{omc_svcdir}/ %{omc_svcdir}/syslog.xml -%changelog -n syslogd +%changelog +* Mon May 14 2007 - mt@suse.de +- Bug #256671: Changed default value of SYSLOG_DAEMON variable in + /etc/sysconfig/syslog to "" (autodetect), adopted description. + Added check to init scripts, that sets SYSLOG_DAEMON variable + to one of the currently installed daemons in case it is empty + or not up-to-date. Added reset of the variable in rpm postun. * Tue Jan 09 2007 - mt@suse.de - Changed to install syslog.xml to /usr/share/omc/svcinfo.d, fate #301833.