rsyslog: add 5.8.0

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Koen Kooi
2011-06-17 17:12:49 +02:00
parent f9c4fd0b31
commit c85efd2281
4 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
DEPENDS = "zlib systemd"
HOMEPAGE = "http://www.rsyslog.com/"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973"
INC_PR = "r0"
SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \
file://rsyslog.conf"
inherit autotools
do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
}
pkg_postinst_${PN} () {
if test "x$D" != "x"; then
exit 1
fi
systemctl enable rsyslog.service
}
pkg_postrm_${PN} () {
systemctl disable rsyslog.service
}
RRECOMMENDS_${PN} += "systemd"
CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
FILES_${PN} += "${base_libdir}/systemd"

View File

@@ -0,0 +1,90 @@
#! /bin/sh
#
# This is an init script for openembedded
# Copy it to /etc/init.d/rsyslog and type
# > update-rc.d rsyslog defaults 5
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
NAME=rsyslog
RSYSLOGD=rsyslogd
RSYSLOGD_BIN=/usr/sbin/rsyslogd
RSYSLOGD_OPTIONS="-c5"
RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$RSYSLOGD_BIN" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
#
# Function that starts the daemon/service
#
do_start()
{
DAEMON=$1
DAEMON_ARGS=$2
PIDFILE=$3
# Return
# 0 if daemon has been started
# 1 if daemon could not be started
start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 1
}
#
# Function that stops the daemon/service
#
do_stop()
{
NAME=$1
PIDFILE=$2
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
# QUIT/TERM/INT should work here, but they don't ?????
start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME
RETVAL="$?"
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
NAME=$1
PIDFILE=$2
start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
echo -n "starting $RSYSLOGD ... "
do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE"
case "$?" in
0) echo "done" ;;
1) echo "failed" ;;
esac
;;
stop)
echo -n "stopping $RSYSLOGD ... "
do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
case "$?" in
0|1) echo "done" ;;
2) echo "failed" ;;
esac
;;
reload|force-reload)
echo -n "reloading $RSYSLOGD ... "
do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
echo "done"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
exit 3
;;
esac
exit 0

View File

@@ -0,0 +1,60 @@
# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance
# rsyslog v3: load input modules
# If you do not load inputs, nothing happens!
# You may need to set the module load path if modules are not found.
$ModLoad immark # provides --MARK-- message capability
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # kernel logging (formerly provided by rklogd)
# 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
# Remote Logging (we use TCP for reliable delivery)
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$WorkDirectory /rsyslog/spool # where to place spool files
#$ActionQueueFileName uniqName # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ######### Receiving Messages from Remote Hosts ##########
# TCP Syslog Server:
# provides TCP syslog reception and GSS-API (if compiled to support it)
#$ModLoad imtcp.so # load module
#$InputTCPServerRun 514 # start up TCP listener at port 514
# UDP Syslog Server:
#$ModLoad imudp.so # provides UDP syslog reception
#$UDPServerRun 514 # start a UDP syslog server at standard port 514

View File

@@ -0,0 +1,5 @@
require rsyslog.inc
PR = "${INC_PR}.0"
SRC_URI[md5sum] = "37562d0e71a24938a9ed7f242bd32d35"
SRC_URI[sha256sum] = "e034b02473fd7e5313522173ec2f6c57e6fbcaec2c6b289edb968b1d64ae3ffd"