Am Dienstag, 30. März 2010 03:02:41 schrieb Anton Aylward:
Peter Suetterlin said the following on 03/29/2010 05:44 PM: . ..
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.
[...]
You mean the line Updating etc/sysconfig/syslog... Yes, seen that, too. That means the script runs and investigates *if* something is to be done. In my case, it didn't
When I look at the postinstall part of the syslog-ng installation I see this:
# 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" != "syslog-ng" ; then if test -z "$SYSLOG_DAEMON" || \ test ! -x sbin/${SYSLOG_DAEMON} ; then replace_syslog=yes fi fi if test "$replace_syslog" = "yes" ; then sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="syslog-ng"/g' \ etc/sysconfig/syslog fi
There we are. Its editing the etc/sysconfig/syslog file. This would happen if, for example, there was a
SYSLOG_DAEMON="rsyslog"
in there.
Duh? Just did that and it *did* install a new sysconfig file.
Which is the weird part. Following Lars you should report this as a bug...
I think you have that logic backward. As I see it, whichever is installed LAST is the one you want to use.
No. Why do you think, that the LAST installed one will take over? When you _remove_ an active system logger, it will reset the variable. [You removed it and _want_ to switch]. The next installed one will take over, e.g.: SYSLOG_DAEMON set to syslog-ng rpm -e syslog-ng --nodeps ; rpm -U rsyslog syslog-ng will change SYSLOG_DAEMON to rsyslog. When SYSLOG_DAEMON is set to syslog-ng and you just install rsyslog additionally, no switch happens: source etc/sysconfig/syslog replace_syslog=no if test "$SYSLOG_DAEMON" != "rsyslogd" ; then # true if test -z "$SYSLOG_DAEMON" || \ # false, set to syslog-ng test ! -x sbin/${SYSLOG_DAEMON} ; then # false, syslog-ng installed ==> replace_syslog is not set to yes and the sed call wil be not executed. From "rpm -Uvvh rsyslog-4.4.1-3.1.x86_64.rpm" output: + source etc/sysconfig/syslog ++ KERNEL_LOGLEVEL=1 ++ SYSLOGD_PARAMS= ++ KLOGD_PARAMS=-x ++ SYSLOG_DAEMON=syslog-ng ++ RSYSLOGD_COMPAT_VERSION= ++ RSYSLOGD_PARAMS= ++ SYSLOG_NG_PARAMS= ++ RSYSLOGD_NATIVE_VERSION=4 + replace_syslog=no + test syslog-ng '!=' rsyslogd + test -z syslog-ng + test '!' -x sbin/syslog-ng + test no = yes ^^^^^^^^^^^^^ This is the "if test "$replace_syslog" = "yes" ; then" line; the sed call is not executed.
Hang on a moment. Doesn't installing a service mean you want to use it?
No it doesn't. Maybe you want, maybe you just want to take a look at a man page it provides. Gruesse / Regards, Marius Tomaschewski <mt@suse.de> <mt@novell.com> -- Server Technologies Team, SUSE LINUX Products GmbH, Nuernberg; GF: Markus Rex; HRB 16746 (AG Nuernberg) GPG/PGP public key fingerprint: DF17 271A AD15 006A 5BB9 6C96 CA2F F3F7 373A 1CC0 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org