![](https://seccdn.libravatar.org/avatar/e01b8e9d7672014c0a2b6cf5b65a67e6.jpg?s=120&d=mm&r=g)
On Mon, Mar 29, 2010 at 10:44:24PM +0100, Peter Suetterlin wrote:
Anton Aylward wrote:
Peter Suetterlin said the following on 03/29/2010 11:33 AM: [ 8< ] And I still think you are wrong. Installing syslog-ng with zypper/rpm fires off an installation script that changes the sysconfig file to make use of it.
and that one is the interesting part. In the other posting Lars said that this script(*) only changes the logger if there is none defined, or the currently defined one does not point to an existing program. And my trial-install with an existing rsyslog seems to confirm that.
(*) you can check it with rpm -q --scripts syslog-ng but it's rather cryptic imho...
Here the code part for syslogd case. # # check if daemon configured in SYSLOG_DAEMON is # installed and switch to ourself if it's missed # source etc/sysconfig/syslog replace_syslog=no if test "$SYSLOG_DAEMON" != "syslogd" ; then if test -z "$SYSLOG_DAEMON" || \ test ! -x sbin/${SYSLOG_DAEMON} ; then replace_syslog=yes fi fi Two conditions: a) SYSLOG_DAEMON from etc/sysconfig/syslog isn't set to syslogd b) It is empty or sbin/${SYSLOG_DAEMON} is not an executeable. If that's the case we set replace_syslog=yes The next additional if statement checks for replace_syslog=yes and performs one inline sed operation to set SYSLOG_DAEMON="syslogd" if test "$replace_syslog" == "yes" ; then sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="syslogd"/g' \ etc/sysconfig/syslog fi I expect the last part got split of to make the spec file easier to read. For syslog-ng and rsyslog we see exactly the same approach. If you have a testcase which demonstrates this approach as broken please file a bug report. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany