SOURCES: syslog-ng2.conf, syslog-ng2-datadir.patch, syslog-ng2.init, syslog...
arekm
arekm at pld-linux.org
Tue Mar 31 16:03:26 CEST 2009
Author: arekm Date: Tue Mar 31 14:03:26 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- back to 2.0.x state
---- Files affected:
SOURCES:
syslog-ng2.conf (1.32 -> 1.33) , syslog-ng2-datadir.patch (1.2 -> 1.3) , syslog-ng2.init (1.28 -> 1.29) , syslog-ng2-link.patch (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SOURCES/syslog-ng2.conf
diff -u SOURCES/syslog-ng2.conf:1.32 SOURCES/syslog-ng2.conf:1.33
--- SOURCES/syslog-ng2.conf:1.32 Wed Jan 21 22:48:54 2009
+++ SOURCES/syslog-ng2.conf Tue Mar 31 16:03:19 2009
@@ -1,4 +1,3 @@
- at version: 3.0
#
# Syslog-ng configuration for PLD Linux
#
@@ -6,6 +5,7 @@
#
options {
+ chain_hostnames(no);
flush_lines(0);
owner(root);
group(logs);
@@ -22,7 +22,7 @@
};
source s_sys {
- file ("/proc/kmsg" program_override("kernel"));
+ pipe ("/proc/kmsg" log_prefix("kernel: "));
unix-stream("/dev/log" max-connections(1000));
internal();
};
@@ -30,36 +30,36 @@
# uncomment the line below if you want to setup syslog server
#source s_net { udp(); };
-#destination d_loghost { udp("loghost" port(514)); };
+#destination loghost { udp("loghost" port(514)); };
-destination d_kern { file("/var/log/kernel"); };
-destination d_messages { file("/var/log/messages"); };
-destination d_authlog { file("/var/log/secure"); };
-destination d_mail { file("/var/log/maillog"); };
-destination d_uucp { file("/var/log/spooler"); };
-destination d_debug { file("/var/log/debug"); };
-destination d_cron { file("/var/log/cron" owner(root) group(crontab) perm(0660)); };
-destination d_syslog { file("/var/log/syslog"); };
-destination d_daemon { file("/var/log/daemon"); };
-destination d_lpr { file("/var/log/lpr"); };
-destination d_user { file("/var/log/user"); };
-destination d_ppp { file("/var/log/ppp"); };
-destination d_ftp { file("/var/log/xferlog"); };
-destination d_audit { file("/var/log/audit"); };
-destination d_postgres { file("/var/log/pgsql"); };
-destination d_freshclam { file("/var/log/freshclam.log"); };
+destination kern { file("/var/log/kernel"); };
+destination messages { file("/var/log/messages"); };
+destination authlog { file("/var/log/secure"); };
+destination mail { file("/var/log/maillog"); };
+destination uucp { file("/var/log/spooler"); };
+destination debug { file("/var/log/debug"); };
+destination cron { file("/var/log/cron" owner(root) group(crontab) perm(0660)); };
+destination syslog { file("/var/log/syslog"); };
+destination daemon { file("/var/log/daemon"); };
+destination lpr { file("/var/log/lpr"); };
+destination user { file("/var/log/user"); };
+destination ppp { file("/var/log/ppp"); };
+destination ftp { file("/var/log/xferlog"); };
+destination audit { file("/var/log/audit"); };
+destination postgres { file("/var/log/pgsql"); };
+destination freshclam { file("/var/log/freshclam.log"); };
# Log iptables messages to separate file
-destination d_iptables { file("/var/log/iptables"); };
+destination iptables { file("/var/log/iptables"); };
-destination d_console { usertty("root"); };
-#destination d_console_all { file("/dev/tty12"); };
+destination console { usertty("root"); };
+#destination console_all { file("/dev/tty12"); };
-destination d_xconsole { pipe("/dev/xconsole"); };
+destination xconsole { pipe("/dev/xconsole"); };
-destination d_newscrit { file("/var/log/news/news.crit" owner(news) group(news)); };
-destination d_newserr { file("/var/log/news/news.err" owner(news) group(news)); };
-destination d_newsnotice { file("/var/log/news/news.notice" owner(news) group(news)); };
+destination newscrit { file("/var/log/news/news.crit" owner(news) group(news)); };
+destination newserr { file("/var/log/news/news.err" owner(news) group(news)); };
+destination newsnotice { file("/var/log/news/news.notice" owner(news) group(news)); };
# Filters for standard syslog(3) facilities
#filter f_audit { facility(audit); };
@@ -97,39 +97,39 @@
filter f_freshclam { program(freshclam); };
filter f_ppp { program(pppd) or program(chat); };
filter f_postgres { program(postgres); };
-filter f_iptables { match("IN=[A-Za-z0-9\.]* OUT=[A-Za-z0-9\.]*" value("MESSAGE")); };
+filter f_iptables { match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*"); };
-log { source(s_sys); filter(f_authpriv); destination(d_authlog); };
-log { source(s_sys); filter(f_cron); destination(d_cron); };
-log { source(s_sys); filter(f_daemon); destination(d_daemon); };
-log { source(s_sys); filter(f_ftp); destination(d_ftp); };
-log { source(s_sys); filter(f_kern); destination(d_kern); };
-log { source(s_sys); filter(f_lpr); destination(d_lpr); };
-log { source(s_sys); filter(f_mail); destination(d_mail); };
-log { source(s_sys); filter(f_news); filter(p_crit); destination(d_uucp); };
-log { source(s_sys); filter(f_news); filter(p_crit); destination(d_newscrit); };
-log { source(s_sys); filter(f_news); filter(p_err); destination(d_newserr); };
-log { source(s_sys); filter(f_news); filter(p_warn); destination(d_newsnotice); };
-log { source(s_sys); filter(f_news); filter(p_notice); destination(d_newsnotice); };
-log { source(s_sys); filter(f_news); filter(p_info); destination(d_newsnotice); };
-log { source(s_sys); filter(f_news); filter(p_debug); destination(d_newsnotice); };
-log { source(s_sys); filter(f_syslog); destination(d_syslog); };
-log { source(s_sys); filter(f_user); destination(d_user); };
-log { source(s_sys); filter(f_uucp); destination(d_uucp); };
-
-log { source(s_sys); filter(p_debug); destination(d_debug); };
-
-log { source(s_sys); filter(f_daemon); filter(f_ppp); destination(d_ppp); };
-log { source(s_sys); filter(f_local6); filter(f_freshclam); destination(d_freshclam); };
-log { source(s_sys); filter(f_local0); filter(f_postgres); destination(d_postgres); };
-#log { source(s_sys); filter(f_iptables); destination(d_iptables); };
+log { source(s_sys); filter(f_authpriv); destination(authlog); };
+log { source(s_sys); filter(f_cron); destination(cron); };
+log { source(s_sys); filter(f_daemon); destination(daemon); };
+log { source(s_sys); filter(f_ftp); destination(ftp); };
+log { source(s_sys); filter(f_kern); destination(kern); };
+log { source(s_sys); filter(f_lpr); destination(lpr); };
+log { source(s_sys); filter(f_mail); destination(mail); };
+log { source(s_sys); filter(f_news); filter(p_crit); destination(uucp); };
+log { source(s_sys); filter(f_news); filter(p_crit); destination(newscrit); };
+log { source(s_sys); filter(f_news); filter(p_err); destination(newserr); };
+log { source(s_sys); filter(f_news); filter(p_warn); destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_notice); destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_info); destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_debug); destination(newsnotice); };
+log { source(s_sys); filter(f_syslog); destination(syslog); };
+log { source(s_sys); filter(f_user); destination(user); };
+log { source(s_sys); filter(f_uucp); destination(uucp); };
+
+log { source(s_sys); filter(p_debug); destination(debug); };
+
+log { source(s_sys); filter(f_daemon); filter(f_ppp); destination(ppp); };
+log { source(s_sys); filter(f_local6); filter(f_freshclam); destination(freshclam); };
+log { source(s_sys); filter(f_local0); filter(f_postgres); destination(postgres); };
+#log { source(s_sys); filter(f_iptables); destination(iptables); };
-log { source(s_sys); filter(p_emergency); destination(d_console); };
-#log { source(s_sys); destination(d_console_all); };
+log { source(s_sys); filter(p_emergency); destination(console); };
+#log { source(s_sys); destination(console_all); };
# This is a catchall statement, and should catch all messages which were not
# accepted any of the previous statements.
-log { source(s_sys); destination(d_messages); flags(fallback); };
+log { source(s_sys); destination(messages); flags(fallback); };
# Network syslogging
-#log { source(s_sys); destination(d_loghost); };
+#log { source(s_sys); destination(loghost); };
================================================================
Index: SOURCES/syslog-ng2-datadir.patch
diff -u SOURCES/syslog-ng2-datadir.patch:1.2 SOURCES/syslog-ng2-datadir.patch:1.3
--- SOURCES/syslog-ng2-datadir.patch:1.2 Fri Dec 26 23:14:33 2008
+++ SOURCES/syslog-ng2-datadir.patch Tue Mar 31 16:03:19 2009
@@ -1,16 +1,12 @@
diff -ur syslog-ng-2.0.6.orig/src/syslog-ng.h syslog-ng-2.0.6/src/syslog-ng.h
--- syslog-ng-2.0.6.orig/src/syslog-ng.h 2007-09-22 16:16:15.000000000 +0200
+++ syslog-ng-2.0.6/src/syslog-ng.h 2007-12-08 08:25:22.000000000 +0100
-@@ -50,9 +50,9 @@
- #define PATH_SYSLOGNG PATH_PREFIX "/libexec/syslog-ng"
- #endif
+@@ -38,7 +38,7 @@
+ #define PATH_SYSLOG_NG_CONF PATH_SYSCONFDIR "/syslog-ng.conf"
+ #define PATH_PIDFILE "/var/run/syslog-ng.pid"
-#define PATH_PERSIST_CONFIG PATH_LOCALSTATEDIR "/syslog-ng.persist"
--#define PATH_QDISK PATH_LOCALSTATEDIR
--#define PATH_PATTERNDB_FILE PATH_LOCALSTATEDIR "/patterndb.xml"
+#define PATH_PERSIST_CONFIG "/var/lib/syslog-ng/syslog-ng.persist"
-+#define PATH_QDISK "/var/lib/syslog-ng"
-+#define PATH_PATTERNDB_FILE "/var/lib/syslog-ng/patterndb.xml"
#define LOG_PRIORITY_LISTEN 0
#define LOG_PRIORITY_READER 0
================================================================
Index: SOURCES/syslog-ng2.init
diff -u SOURCES/syslog-ng2.init:1.28 SOURCES/syslog-ng2.init:1.29
--- SOURCES/syslog-ng2.init:1.28 Mon Feb 2 08:44:22 2009
+++ SOURCES/syslog-ng2.init Tue Mar 31 16:03:20 2009
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# syslog Starts syslog-ng (syslogd replacement).
+# syslog Starts syslog-ng (syslogd replacment).
#
# chkconfig: 2345 30 70
# description: Syslog is the facility by which many daemons use to log \
@@ -21,28 +21,15 @@
. /etc/sysconfig/syslog-ng
fi
-checkconfig() {
- syslog-ng $OPTIONS -F -s -p /var/run/syslog-ng-syntaxcheck.pid
- RETVAL=$?
- return $RETVAL
-}
-
configtest() {
- checkconfig 2>/dev/null
- RETVAL=$?
- if [ $RETVAL != 0 ]; then
- show "Checking syslog-ng config syntax"
- fail
- echo >&2 "Configuration file syntax test failed. Run $0 configtest to see errors."
- exit $RETVAL
- fi
+ syslog-ng $OPTIONS -s || exit 1
}
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/syslog-ng ]; then
msg_starting "syslog-ng"
- daemon /usr/sbin/syslog-ng -f /etc/syslog-ng/syslog-ng.conf $OPTIONS
+ daemon syslog-ng $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/syslog-ng
else
@@ -56,42 +43,7 @@
killproc syslog-ng
rm -f /var/lock/subsys/syslog-ng >/dev/null 2>&1
else
- msg_not_running "syslog-ng"
- fi
-}
-
-condrestart() {
- if [ -f /var/lock/subsys/syslog-ng ]; then
- configtest
- stop
- start
- else
- msg_not_running "syslog-ng"
- RETVAL=$1
- fi
-}
-
-reload() {
- if [ -f /var/lock/subsys/syslog-ng ]; then
- configtest
- msg_reloading "syslog-ng"
- killproc syslog-ng -HUP
- RETVAL=$?
- else
- msg_not_running "syslog-ng"
- exit 7
- fi
-}
-
-flush_logs() {
- if [ -f /var/lock/subsys/syslog-ng ]; then
- configtest
- msg_reloading "syslog-ng"
- killproc syslog-ng -HUP
- RETVAL=$?
- else
- msg_not_running "syslog-ng"
- exit 7
+ msg_not_running syslog-ng
fi
}
@@ -99,39 +51,57 @@
# See how we were called.
case "$1" in
start)
- configtest
- start
+ start
;;
stop)
- stop
+ stop
;;
restart)
- configtest
+ configtest
stop
start
;;
- try-restart)
- condrestart 0
+ configtest)
+ configtest
+ exit $?
;;
reload|force-reload)
- reload
+ if [ -f /var/lock/subsys/syslog-ng ]; then
+ msg_reloading "syslog-ng"
+ configtest
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ killproc syslog-ng -HUP
+ RETVAL=$?
+ else
+ fail
+ echo >&2 "Configuration file syntax test failed."
+ fi
+ else
+ msg_not_running syslog-ng
+ exit 7
+ fi
;;
flush-logs)
- flush_logs
- ;;
- configtest)
- show "Checking syslog-ng config syntax"
- res=$(checkconfig 2>&1)
- RETVAL=$?
- [ $RETVAL = 0 ] && ok || fail
- echo >&2 "$res"
+ if [ -f /var/lock/subsys/syslog-ng ]; then
+ msg_reloading "syslog-ng"
+ configtest
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ killproc syslog-ng -HUP
+ RETVAL=$?
+ else
+ fail
+ echo >&2 "Configuration file syntax test failed."
+ fi
+ fi
;;
status)
status syslog-ng
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status|configtest|flush-logs}"
+ msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
exit 3
esac
================================================================
Index: SOURCES/syslog-ng2-link.patch
diff -u SOURCES/syslog-ng2-link.patch:1.6 SOURCES/syslog-ng2-link.patch:1.7
--- SOURCES/syslog-ng2-link.patch:1.6 Fri Dec 26 23:14:34 2008
+++ SOURCES/syslog-ng2-link.patch Tue Mar 31 16:03:20 2009
@@ -1,13 +1,18 @@
--- syslog-ng-2.0.3/configure.in.orig 2007-03-04 10:58:00.000000000 +0100
+++ syslog-ng-2.0.3/configure.in 2007-04-03 23:53:53.219462987 +0200
-@@ -265,9 +265,8 @@
- AC_CHECK_LIB(door, door_create, BASE_LIBS="$BASE_LIBS -ldoor")
- AC_CHECK_LIB(socket, socket, BASE_LIBS="$BASE_LIBS -lsocket")
- AC_CHECK_LIB(rt, nanosleep, BASE_LIBS="$BASE_LIBS -lrt")
--AC_CHECK_LIB(nsl, gethostbyname, BASE_LIBS="$BASE_LIBS -lnsl")
-+AC_CHECK_LIB(resolv, gethostbyname, BASE_LIBS="$BASE_LIBS -lresolv")
- AC_CHECK_LIB(regex, regexec, REGEX_LIBS="-lregex")
--AC_CHECK_LIB(resolv, res_init, RESOLV_LIBS="-lresolv")
+@@ -149,11 +149,10 @@
+
+ dnl Checks for library functions.
+ AC_CHECK_LIB(door, door_create)
+-AC_CHECK_LIB(socket, socket)
+-AC_CHECK_LIB(rt, nanosleep)
+-AC_CHECK_LIB(nsl, gethostbyname)
+-AC_CHECK_LIB(regex, regexec)
+-AC_CHECK_LIB(resolv, res_init)
++AC_SEARCH_LIBS(socket, socket)
++AC_SEARCH_LIBS(nanosleep, rt)
++AC_SEARCH_LIBS(gethostbyname, nsl resolv)
++AC_SEARCH_LIBS(regexec, regex)
+
+ AC_CHECK_FUNCS(strdup strtol inet_aton inet_ntoa getopt_long getaddrinfo getutent)
- if test "x$enable_linux_caps" = "xyes" -o "x$enable_linux_caps" = "xauto"; then
- AC_CHECK_LIB(cap, cap_set_proc, LIBCAP_LIBS="-lcap")
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/syslog-ng2.conf?r1=1.32&r2=1.33&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/syslog-ng2-datadir.patch?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/syslog-ng2.init?r1=1.28&r2=1.29&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/syslog-ng2-link.patch?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list