SOURCES: rsyslog.conf (NEW), rsyslog.init (NEW), rsyslog.sysconfig (NEW) - ...

paszczus paszczus at pld-linux.org
Thu Jul 3 11:36:21 CEST 2008


Author: paszczus                     Date: Thu Jul  3 09:36:21 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from fedora

---- Files affected:
SOURCES:
   rsyslog.conf (NONE -> 1.1)  (NEW), rsyslog.init (NONE -> 1.1)  (NEW), rsyslog.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rsyslog.conf
diff -u /dev/null SOURCES/rsyslog.conf:1.1
--- /dev/null	Thu Jul  3 11:36:21 2008
+++ SOURCES/rsyslog.conf	Thu Jul  3 11:36:14 2008
@@ -0,0 +1,41 @@
+#rsyslog v3 config file
+
+# provides support for local system logging (e.g. via logger command)
+$ModLoad imuxsock.so 
+# provides kernel logging support (previously done by rklogd)
+$ModLoad imklog.so
+
+# provides --MARK-- message capability
+#$ModLoad immark.so  
+# provides UDP syslog reception
+#$ModLoad imudp.so  
+# provides TCP syslog reception and GSS-API (if compiled to support it)
+#$ModLoad imtcp.so  
+
+
+# Log all kernel messages to the console.
+# Logging much else clutters up the screen.
+#kern.*                                                 /dev/console
+
+# Log anything (except mail) of level info or higher.
+# Don't log private authentication messages!
+*.info;mail.none;authpriv.none;cron.none                /var/log/messages
+
+# The authpriv file has restricted access.
+authpriv.*                                              /var/log/secure
+
+# Log all the mail messages in one place.
+mail.*                                                  -/var/log/maillog
+
+
+# Log cron stuff
+cron.*                                                  /var/log/cron
+
+# Everybody gets emergency messages
+*.emerg                                                 *
+
+# Save news errors of level crit and higher in a special file.
+uucp,news.crit                                          /var/log/spooler
+
+# Save boot messages also to boot.log
+local7.*                                                /var/log/boot.log

================================================================
Index: SOURCES/rsyslog.init
diff -u /dev/null SOURCES/rsyslog.init:1.1
--- /dev/null	Thu Jul  3 11:36:22 2008
+++ SOURCES/rsyslog.init	Thu Jul  3 11:36:15 2008
@@ -0,0 +1,99 @@
+#!/bin/bash
+#
+# rsyslog        Starts rsyslogd/rklogd.
+#
+#
+# chkconfig: - 12 88
+# description: Syslog is the facility by which many daemons use to log \
+# messages to various system log files.  It is a good idea to always \
+# run rsyslog.
+### BEGIN INIT INFO
+# Provides: $syslog
+# Required-Start: $local_fs $network $remote_fs
+# Required-Stop: $local_fs $network $remote_fs
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: Enhanced system logging and kernel message trapping daemons
+# Description: Rsyslog is an enhanced multi-threaded syslogd supporting, 
+#              among others, MySQL, syslog/tcp, RFC 3195, permitted 
+#              sender lists, filtering on any message part, and fine 
+#              grain output format control.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+start() {
+	[ -x /sbin/rsyslogd ] || exit 5
+
+	# Source config
+        if [ -f /etc/sysconfig/rsyslog ] ; then
+                . /etc/sysconfig/rsyslog
+	fi
+	umask 077
+
+        echo -n $"Starting system logger: "
+        daemon rsyslogd $SYSLOGD_OPTIONS
+        RETVAL=$?
+        echo
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rsyslog
+        return $RETVAL
+}
+stop() {
+        echo -n $"Shutting down system logger: "
+        killproc rsyslogd
+        RETVAL=$?
+        echo
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rsyslog
+        return $RETVAL
+}
+reload()  {
+    RETVAL=1
+    syslog=`cat /var/run/syslogd.pid 2>/dev/null`
+    echo -n "Reloading system logger..."
+    if [ -n "${syslog}" ] && [ -e /proc/"${syslog}" ]; then
+	kill -HUP "$syslog";
+	RETVAL=$?
+    fi
+    if [ $RETVAL -ne 0 ]; then
+	failure
+    else
+	success
+    fi
+    echo
+    return $RETVAL
+}
+rhstatus() {
+        status rsyslogd
+}
+restart() {
+        stop
+        start
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  restart)
+        restart
+        ;;
+  reload|force-reload)
+	reload
+	;;
+  status)
+        rhstatus
+        ;;
+  condrestart)
+        [ -f /var/lock/subsys/rsyslog ] && restart || :
+        ;;
+  *)
+        echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart}"
+        exit 2
+esac
+
+exit $?

================================================================
Index: SOURCES/rsyslog.sysconfig
diff -u /dev/null SOURCES/rsyslog.sysconfig:1.1
--- /dev/null	Thu Jul  3 11:36:22 2008
+++ SOURCES/rsyslog.sysconfig	Thu Jul  3 11:36:15 2008
@@ -0,0 +1,5 @@
+# Options to syslogd
+# syslogd options are deprecated in rsyslog v3 
+# if you want to use them, switch to compatibility mode 2 by "-c 2"
+SYSLOGD_OPTIONS="-c 3"
+
================================================================


More information about the pld-cvs-commit mailing list