Lars Müller said the following on 03/29/2010 06:08 PM:
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
OH WOW! Just like to code in syslog-ng except for the "syslogd"/"syslog-ng" (see my other post)
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.
OH WOW! Exactly what I would expect! Whichever is installed last is the one that appears in /etc/sysconfig/syslog
If you have a testcase which demonstrates this approach as broken please file a bug report.
Not me! -- Rule of Feline Frustration: When your cat has fallen asleep on your lap and looks utterly content and adorable, you will suddenly have to go to the bathroom. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org