回复评论

修正syslog-ng.2.x默认配置文件

  做完syslog-ng for rhel的rpm,并安装起来,准备替换系统的默认syslog,发现随安装包自带的配置文件竟然有错...,找了些资料,才发现是2.x和1.6版本的区别。主要是2.x的语法更规范一点,另外还有一处小错误,不知道是不是官方故意的,因为官方有自己的binary提供,不过似乎要付费。

写了个patch

mllm © 2004-2008, allblue
--- syslog-ng.old.conf 2007-05-20 15:43:22.000000000\
 +0800
+++ syslog-ng.conf     2007-05-20 15:44:07.000000000\
 +0800
@@ -14,14 +14,14 @@
 #
 #source s_local {
 #      unix-dgram("/dev/log");
-#      file("/proc/kmsg" log_prefix "kernel:");
+#      file("/proc/kmsg" log_prefix("kernel: "));
 #};
 #
 # Local filters
 #
 #filter f_messages { level(info..emerg); };
 #filter f_secure { facility(authpriv); };
-#filter f_mail { facility(mail); };
+#filter f_maillog { facility(mail); };
 #filter f_cron { facility(cron); };
 #filter f_emerg { level(emerg); };
Parsed in 0.002 seconds

回复

此内容将保密,不会被其他人看见。
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
请输入图中的字母(区分大小写)