summaryrefslogtreecommitdiffstats
path: root/meta-extras
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-30 22:52:51 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-30 22:52:51 +0000
commit52c2e1a00f220905c4b28347c15daac3df5881b2 (patch)
treef5a754176d30bcea095ad5d84b58dc763a478a77 /meta-extras
parent81f0ee53d5c1bbb33c256c909bb5b7b16dcf8f7c (diff)
downloadpoky-52c2e1a00f220905c4b28347c15daac3df5881b2.tar.gz
Add syslog-ng to poky-extras
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1235 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras')
-rw-r--r--meta-extras/packages/syslog-ng/files/initscript45
-rw-r--r--meta-extras/packages/syslog-ng/files/syslog-ng.conf89
-rw-r--r--meta-extras/packages/syslog-ng/syslog-ng_1.6.8.bb30
3 files changed, 164 insertions, 0 deletions
diff --git a/meta-extras/packages/syslog-ng/files/initscript b/meta-extras/packages/syslog-ng/files/initscript
new file mode 100644
index 0000000000..b95e8adc20
--- /dev/null
+++ b/meta-extras/packages/syslog-ng/files/initscript
@@ -0,0 +1,45 @@
1#! /bin/sh
2#
3# This is an init script for openembedded
4# Copy it to /etc/init.d/syslog-ng and type
5# > update-rc.d syslog-ng defaults 5
6#
7
8
9syslog_ng=/usr/sbin/syslog-ng
10test -x "$syslog_ng" || exit 0
11
12case "$1" in
13 start)
14 echo -n "Starting syslog-ng:"
15 start-stop-daemon --start --quiet --exec $syslog_ng
16 echo "."
17 ;;
18 stop)
19 echo -n "Stopping syslog-ng:"
20 start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid
21 echo "."
22 ;;
23 reload|force-reload)
24 start-stop-daemon --stop --quiet --signal 1 --exec $syslog_ng
25 ;;
26 restart)
27 echo "Stopping syslog-ng:"
28 start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid
29 echo -n "Waiting for syslog-ng to die off"
30 for i in 1 2 3 ;
31 do
32 sleep 1
33 echo -n "."
34 done
35 echo ""
36 echo -n "Starting syslog-ng:"
37 start-stop-daemon --start --quiet --exec $syslog_ng
38 echo "."
39 ;;
40 *)
41 echo "Usage: /etc/init.d/syslog-ng {start|stop|reload|restart|force-reload}"
42 exit 1
43esac
44
45exit 0
diff --git a/meta-extras/packages/syslog-ng/files/syslog-ng.conf b/meta-extras/packages/syslog-ng/files/syslog-ng.conf
new file mode 100644
index 0000000000..4d1e9f8b22
--- /dev/null
+++ b/meta-extras/packages/syslog-ng/files/syslog-ng.conf
@@ -0,0 +1,89 @@
1#
2# Syslog-ng example configuration for for Debian GNU/Linux
3#
4# Copyright (c) 1999 anonymous
5# Copyright (c) 1999 Balazs Scheidler
6# $Id: syslog-ng.conf.sample,v 1.3 2003/05/20 08:57:27 asd Exp $
7#
8# Syslog-ng configuration file, compatible with default Debian syslogd
9# installation.
10#
11
12options { long_hostnames(off); sync(0); };
13
14source src { file("/proc/kmsg"); unix-stream("/dev/log"); internal(); };
15source net { udp(); };
16
17destination authlog { file("/var/log/auth.log"); };
18destination syslog { file("/var/log/syslog"); };
19destination cron { file("/var/log/cron.log"); };
20destination daemon { file("/var/log/daemon.log"); };
21destination kern { file("/var/log/kern.log"); };
22destination lpr { file("/var/log/lpr.log"); };
23destination user { file("/var/log/user.log"); };
24destination uucp { file("/var/log/uucp.log"); };
25destination ppp { file("/var/log/ppp.log"); };
26destination mail { file("/var/log/mail.log"); };
27
28destination mailinfo { file("/var/log/mail.info"); };
29destination mailwarn { file("/var/log/mail.warn"); };
30destination mailerr { file("/var/log/mail.err"); };
31
32destination newscrit { file("/var/log/news/news.crit"); };
33destination newserr { file("/var/log/news/news.err"); };
34destination newsnotice { file("/var/log/news/news.notice"); };
35
36destination debug { file("/var/log/debug"); };
37destination messages { file("/var/log/messages"); };
38destination console { usertty("root"); };
39destination console_all { file("/dev/tty12"); };
40#destination loghost { udp("loghost" port(999)); };
41
42
43destination xconsole { pipe("/dev/xconsole"); };
44
45filter f_auth { facility(auth); };
46filter f_authpriv { facility(auth, authpriv); };
47filter f_syslog { not facility(authpriv, mail); };
48filter f_cron { facility(cron); };
49filter f_daemon { facility(daemon); };
50filter f_kern { facility(kern); };
51filter f_lpr { facility(lpr); };
52filter f_mail { facility(mail); };
53filter f_user { facility(user); };
54filter f_uucp { facility(cron); };
55filter f_ppp { facility(local2); };
56filter f_news { facility(news); };
57filter f_debug { not facility(auth, authpriv, news, mail); };
58filter f_messages { level(info..warn)
59 and not facility(auth, authpriv, mail, news); };
60filter f_emergency { level(emerg); };
61
62filter f_info { level(info); };
63filter f_notice { level(notice); };
64filter f_warn { level(warn); };
65filter f_crit { level(crit); };
66filter f_err { level(err); };
67
68log { source(src); filter(f_authpriv); destination(authlog); };
69log { source(src); filter(f_syslog); destination(syslog); };
70log { source(src); filter(f_cron); destination(cron); };
71log { source(src); filter(f_daemon); destination(daemon); };
72log { source(src); filter(f_kern); destination(kern); };
73log { source(src); filter(f_lpr); destination(lpr); };
74log { source(src); filter(f_mail); destination(mail); };
75log { source(src); filter(f_user); destination(user); };
76log { source(src); filter(f_uucp); destination(uucp); };
77log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
78log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
79log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
80log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
81log { source(src); filter(f_news); filter(f_err); destination(newserr); };
82log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
83log { source(src); filter(f_debug); destination(debug); };
84log { source(src); filter(f_messages); destination(messages); };
85log { source(src); filter(f_emergency); destination(console); };
86log { source(src); filter(f_ppp); destination(ppp); };
87log { source(src); destination(console_all); };
88
89
diff --git a/meta-extras/packages/syslog-ng/syslog-ng_1.6.8.bb b/meta-extras/packages/syslog-ng/syslog-ng_1.6.8.bb
new file mode 100644
index 0000000000..af7a9b4502
--- /dev/null
+++ b/meta-extras/packages/syslog-ng/syslog-ng_1.6.8.bb
@@ -0,0 +1,30 @@
1PR = "r9"
2DESCRIPTION = "Alternative system logger daemon"
3DEPENDS = "libol flex"
4
5SRC_URI = "http://www.balabit.com/downloads/syslog-ng/1.6/src/${PN}-${PV}.tar.gz \
6 file://syslog-ng.conf \
7 file://initscript"
8
9S = "${WORKDIR}/${PN}-${PV}"
10inherit autotools update-rc.d
11
12EXTRA_OECONF = "--with-libol=${STAGING_BINDIR}/"
13CONFFILES_${PN} = "${sysconfdir}/${PN}/syslog-ng.conf"
14INITSCRIPT_NAME = "syslog-ng"
15INITSCRIPT_PARAMS = "defaults 05"
16
17do_install_append() {
18 install -d ${D}/${sysconfdir}/${PN}
19 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${PN}/syslog-ng.conf
20 install -d ${D}/${sysconfdir}/init.d
21 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog-ng
22}
23
24pkg_postinst() {
25 update-rc.d -f syslog remove
26}
27
28pkg_postrm() {
29 update-rc.d syslog add 5
30}