diff options
| -rw-r--r-- | meta-extras/packages/syslog-ng/files/initscript | 45 | ||||
| -rw-r--r-- | meta-extras/packages/syslog-ng/files/syslog-ng.conf | 89 | ||||
| -rw-r--r-- | meta-extras/packages/syslog-ng/syslog-ng_1.6.8.bb | 30 |
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 | |||
| 9 | syslog_ng=/usr/sbin/syslog-ng | ||
| 10 | test -x "$syslog_ng" || exit 0 | ||
| 11 | |||
| 12 | case "$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 | ||
| 43 | esac | ||
| 44 | |||
| 45 | exit 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 | |||
| 12 | options { long_hostnames(off); sync(0); }; | ||
| 13 | |||
| 14 | source src { file("/proc/kmsg"); unix-stream("/dev/log"); internal(); }; | ||
| 15 | source net { udp(); }; | ||
| 16 | |||
| 17 | destination authlog { file("/var/log/auth.log"); }; | ||
| 18 | destination syslog { file("/var/log/syslog"); }; | ||
| 19 | destination cron { file("/var/log/cron.log"); }; | ||
| 20 | destination daemon { file("/var/log/daemon.log"); }; | ||
| 21 | destination kern { file("/var/log/kern.log"); }; | ||
| 22 | destination lpr { file("/var/log/lpr.log"); }; | ||
| 23 | destination user { file("/var/log/user.log"); }; | ||
| 24 | destination uucp { file("/var/log/uucp.log"); }; | ||
| 25 | destination ppp { file("/var/log/ppp.log"); }; | ||
| 26 | destination mail { file("/var/log/mail.log"); }; | ||
| 27 | |||
| 28 | destination mailinfo { file("/var/log/mail.info"); }; | ||
| 29 | destination mailwarn { file("/var/log/mail.warn"); }; | ||
| 30 | destination mailerr { file("/var/log/mail.err"); }; | ||
| 31 | |||
| 32 | destination newscrit { file("/var/log/news/news.crit"); }; | ||
| 33 | destination newserr { file("/var/log/news/news.err"); }; | ||
| 34 | destination newsnotice { file("/var/log/news/news.notice"); }; | ||
| 35 | |||
| 36 | destination debug { file("/var/log/debug"); }; | ||
| 37 | destination messages { file("/var/log/messages"); }; | ||
| 38 | destination console { usertty("root"); }; | ||
| 39 | destination console_all { file("/dev/tty12"); }; | ||
| 40 | #destination loghost { udp("loghost" port(999)); }; | ||
| 41 | |||
| 42 | |||
| 43 | destination xconsole { pipe("/dev/xconsole"); }; | ||
| 44 | |||
| 45 | filter f_auth { facility(auth); }; | ||
| 46 | filter f_authpriv { facility(auth, authpriv); }; | ||
| 47 | filter f_syslog { not facility(authpriv, mail); }; | ||
| 48 | filter f_cron { facility(cron); }; | ||
| 49 | filter f_daemon { facility(daemon); }; | ||
| 50 | filter f_kern { facility(kern); }; | ||
| 51 | filter f_lpr { facility(lpr); }; | ||
| 52 | filter f_mail { facility(mail); }; | ||
| 53 | filter f_user { facility(user); }; | ||
| 54 | filter f_uucp { facility(cron); }; | ||
| 55 | filter f_ppp { facility(local2); }; | ||
| 56 | filter f_news { facility(news); }; | ||
| 57 | filter f_debug { not facility(auth, authpriv, news, mail); }; | ||
| 58 | filter f_messages { level(info..warn) | ||
| 59 | and not facility(auth, authpriv, mail, news); }; | ||
| 60 | filter f_emergency { level(emerg); }; | ||
| 61 | |||
| 62 | filter f_info { level(info); }; | ||
| 63 | filter f_notice { level(notice); }; | ||
| 64 | filter f_warn { level(warn); }; | ||
| 65 | filter f_crit { level(crit); }; | ||
| 66 | filter f_err { level(err); }; | ||
| 67 | |||
| 68 | log { source(src); filter(f_authpriv); destination(authlog); }; | ||
| 69 | log { source(src); filter(f_syslog); destination(syslog); }; | ||
| 70 | log { source(src); filter(f_cron); destination(cron); }; | ||
| 71 | log { source(src); filter(f_daemon); destination(daemon); }; | ||
| 72 | log { source(src); filter(f_kern); destination(kern); }; | ||
| 73 | log { source(src); filter(f_lpr); destination(lpr); }; | ||
| 74 | log { source(src); filter(f_mail); destination(mail); }; | ||
| 75 | log { source(src); filter(f_user); destination(user); }; | ||
| 76 | log { source(src); filter(f_uucp); destination(uucp); }; | ||
| 77 | log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); }; | ||
| 78 | log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); }; | ||
| 79 | log { source(src); filter(f_mail); filter(f_err); destination(mailerr); }; | ||
| 80 | log { source(src); filter(f_news); filter(f_crit); destination(newscrit); }; | ||
| 81 | log { source(src); filter(f_news); filter(f_err); destination(newserr); }; | ||
| 82 | log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); }; | ||
| 83 | log { source(src); filter(f_debug); destination(debug); }; | ||
| 84 | log { source(src); filter(f_messages); destination(messages); }; | ||
| 85 | log { source(src); filter(f_emergency); destination(console); }; | ||
| 86 | log { source(src); filter(f_ppp); destination(ppp); }; | ||
| 87 | log { 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 @@ | |||
| 1 | PR = "r9" | ||
| 2 | DESCRIPTION = "Alternative system logger daemon" | ||
| 3 | DEPENDS = "libol flex" | ||
| 4 | |||
| 5 | SRC_URI = "http://www.balabit.com/downloads/syslog-ng/1.6/src/${PN}-${PV}.tar.gz \ | ||
| 6 | file://syslog-ng.conf \ | ||
| 7 | file://initscript" | ||
| 8 | |||
| 9 | S = "${WORKDIR}/${PN}-${PV}" | ||
| 10 | inherit autotools update-rc.d | ||
| 11 | |||
| 12 | EXTRA_OECONF = "--with-libol=${STAGING_BINDIR}/" | ||
| 13 | CONFFILES_${PN} = "${sysconfdir}/${PN}/syslog-ng.conf" | ||
| 14 | INITSCRIPT_NAME = "syslog-ng" | ||
| 15 | INITSCRIPT_PARAMS = "defaults 05" | ||
| 16 | |||
| 17 | do_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 | |||
| 24 | pkg_postinst() { | ||
| 25 | update-rc.d -f syslog remove | ||
| 26 | } | ||
| 27 | |||
| 28 | pkg_postrm() { | ||
| 29 | update-rc.d syslog add 5 | ||
| 30 | } | ||
