summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2006-10-12 08:04:52 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2006-10-12 08:04:52 +0000
commit8b0083e89d5899c4f2e73845a293f563b36d8d10 (patch)
tree04a84ab1a5b489252b603d51396a42d4ff80e02a /redhat
parentf604d64776c0c16b7b02dcc1a1707ebade65f5f0 (diff)
downloadrsyslog-8b0083e89d5899c4f2e73845a293f563b36d8d10.tar.gz
rsyslog-8b0083e89d5899c4f2e73845a293f563b36d8d10.tar.xz
rsyslog-8b0083e89d5899c4f2e73845a293f563b36d8d10.zip
added redhat subdiretory supplied by James Bergamin (thanks!!!)
Diffstat (limited to 'redhat')
-rw-r--r--redhat/rsyslog12
-rw-r--r--redhat/rsyslog.conf26
-rw-r--r--redhat/rsyslog.init84
-rw-r--r--redhat/rsyslog.log6
4 files changed, 128 insertions, 0 deletions
diff --git a/redhat/rsyslog b/redhat/rsyslog
new file mode 100644
index 00000000..ee9be79b
--- /dev/null
+++ b/redhat/rsyslog
@@ -0,0 +1,12 @@
+# Options to syslogd
+# -m 0 disables 'MARK' messages.
+# -r enables logging from remote machines
+# -x disables DNS lookups on messages recieved with -r
+# See syslogd(8) for more details
+SYSLOGD_OPTIONS="-m 0"
+# Options to klogd
+# -2 prints all kernel oops messages twice; once for klogd to decode, and
+# once for processing with 'ksymoops'
+# -x disables all klogd processing of oops messages entirely
+# See klogd(8) for more details
+KLOGD_OPTIONS="-x"
diff --git a/redhat/rsyslog.conf b/redhat/rsyslog.conf
new file mode 100644
index 00000000..9d34c805
--- /dev/null
+++ b/redhat/rsyslog.conf
@@ -0,0 +1,26 @@
+# 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
diff --git a/redhat/rsyslog.init b/redhat/rsyslog.init
new file mode 100644
index 00000000..0a45a39f
--- /dev/null
+++ b/redhat/rsyslog.init
@@ -0,0 +1,84 @@
+#!/bin/bash
+#
+# rsyslog Starts rsyslogd/klogd.
+#
+#
+# chkconfig: 2345 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: $rsyslog
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+[ -f /usr/sbin/rsyslogd ] || exit 0
+[ -f /sbin/klogd ] || exit 0
+
+# Source config
+if [ -f /etc/sysconfig/rsyslog ] ; then
+ . /etc/sysconfig/rsyslog
+else
+ SYSLOGD_OPTIONS="-m 0"
+ KLOGD_OPTIONS="-2"
+fi
+
+RETVAL=0
+
+umask 077
+
+start() {
+ echo -n $"Starting system logger (rsyslog): "
+ daemon rsyslogd $SYSLOGD_OPTIONS
+ RETVAL=$?
+ echo
+ echo -n $"Starting kernel logger: "
+ daemon klogd $KLOGD_OPTIONS
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rsyslog
+ return $RETVAL
+}
+stop() {
+ echo -n $"Shutting down kernel logger: "
+ killproc klogd
+ echo
+ echo -n $"Shutting down system logger (rsyslog): "
+ killproc rsyslogd
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rsyslog
+ return $RETVAL
+}
+rhstatus() {
+ status rsyslogd
+ status klogd
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ rhstatus
+ ;;
+ restart|reload)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/rsyslog ] && restart || :
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart}"
+ exit 1
+esac
+
+exit $?
diff --git a/redhat/rsyslog.log b/redhat/rsyslog.log
new file mode 100644
index 00000000..e0593a26
--- /dev/null
+++ b/redhat/rsyslog.log
@@ -0,0 +1,6 @@
+/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
+ sharedscripts
+ postrotate
+ /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
+ endscript
+}