diff options
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog.inc | 35 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/initscript | 90 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf | 60 | ||||
-rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog_5.8.0.bb | 5 |
4 files changed, 190 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog.inc b/meta-oe/recipes-extended/rsyslog/rsyslog.inc new file mode 100644 index 0000000000..8af2049907 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog.inc | |||
@@ -0,0 +1,35 @@ | |||
1 | DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd" | ||
2 | DEPENDS = "zlib systemd" | ||
3 | HOMEPAGE = "http://www.rsyslog.com/" | ||
4 | LICENSE = "GPLv3" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973" | ||
6 | |||
7 | INC_PR = "r0" | ||
8 | |||
9 | SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \ | ||
10 | file://rsyslog.conf" | ||
11 | |||
12 | |||
13 | inherit autotools | ||
14 | |||
15 | do_install_append() { | ||
16 | install -d ${D}/${sysconfdir}/${PN} | ||
17 | install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf | ||
18 | } | ||
19 | |||
20 | |||
21 | pkg_postinst_${PN} () { | ||
22 | if test "x$D" != "x"; then | ||
23 | exit 1 | ||
24 | fi | ||
25 | systemctl enable rsyslog.service | ||
26 | } | ||
27 | |||
28 | pkg_postrm_${PN} () { | ||
29 | systemctl disable rsyslog.service | ||
30 | } | ||
31 | |||
32 | RRECOMMENDS_${PN} += "systemd" | ||
33 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" | ||
34 | FILES_${PN} += "${base_libdir}/systemd" | ||
35 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/initscript b/meta-oe/recipes-extended/rsyslog/rsyslog/initscript new file mode 100644 index 0000000000..8dee684a82 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/initscript | |||
@@ -0,0 +1,90 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/rsyslog and type | ||
5 | # > update-rc.d rsyslog defaults 5 | ||
6 | # | ||
7 | |||
8 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
9 | NAME=rsyslog | ||
10 | RSYSLOGD=rsyslogd | ||
11 | RSYSLOGD_BIN=/usr/sbin/rsyslogd | ||
12 | RSYSLOGD_OPTIONS="-c5" | ||
13 | RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid | ||
14 | SCRIPTNAME=/etc/init.d/$NAME | ||
15 | # Exit if the package is not installed | ||
16 | [ -x "$RSYSLOGD_BIN" ] || exit 0 | ||
17 | # Read configuration variable file if it is present | ||
18 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | ||
19 | # | ||
20 | # Function that starts the daemon/service | ||
21 | # | ||
22 | do_start() | ||
23 | { | ||
24 | DAEMON=$1 | ||
25 | DAEMON_ARGS=$2 | ||
26 | PIDFILE=$3 | ||
27 | # Return | ||
28 | # 0 if daemon has been started | ||
29 | # 1 if daemon could not be started | ||
30 | start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 1 | ||
31 | } | ||
32 | # | ||
33 | # Function that stops the daemon/service | ||
34 | # | ||
35 | do_stop() | ||
36 | { | ||
37 | NAME=$1 | ||
38 | PIDFILE=$2 | ||
39 | # Return | ||
40 | # 0 if daemon has been stopped | ||
41 | # 1 if daemon was already stopped | ||
42 | # 2 if daemon could not be stopped | ||
43 | # other if a failure occurred | ||
44 | # QUIT/TERM/INT should work here, but they don't ????? | ||
45 | start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME | ||
46 | RETVAL="$?" | ||
47 | rm -f $PIDFILE | ||
48 | return "$RETVAL" | ||
49 | } | ||
50 | # | ||
51 | # Function that sends a SIGHUP to the daemon/service | ||
52 | # | ||
53 | do_reload() { | ||
54 | NAME=$1 | ||
55 | PIDFILE=$2 | ||
56 | start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME | ||
57 | return 0 | ||
58 | } | ||
59 | case "$1" in | ||
60 | start) | ||
61 | echo -n "starting $RSYSLOGD ... " | ||
62 | do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE" | ||
63 | case "$?" in | ||
64 | 0) echo "done" ;; | ||
65 | 1) echo "failed" ;; | ||
66 | esac | ||
67 | ;; | ||
68 | stop) | ||
69 | echo -n "stopping $RSYSLOGD ... " | ||
70 | do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE" | ||
71 | case "$?" in | ||
72 | 0|1) echo "done" ;; | ||
73 | 2) echo "failed" ;; | ||
74 | esac | ||
75 | ;; | ||
76 | reload|force-reload) | ||
77 | echo -n "reloading $RSYSLOGD ... " | ||
78 | do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE" | ||
79 | echo "done" | ||
80 | ;; | ||
81 | restart) | ||
82 | $0 stop | ||
83 | $0 start | ||
84 | ;; | ||
85 | *) | ||
86 | echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 | ||
87 | exit 3 | ||
88 | ;; | ||
89 | esac | ||
90 | exit 0 | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf new file mode 100644 index 0000000000..47fc4402a1 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf | |||
@@ -0,0 +1,60 @@ | |||
1 | # if you experience problems, check | ||
2 | # http://www.rsyslog.com/troubleshoot for assistance | ||
3 | |||
4 | # rsyslog v3: load input modules | ||
5 | # If you do not load inputs, nothing happens! | ||
6 | # You may need to set the module load path if modules are not found. | ||
7 | |||
8 | $ModLoad immark # provides --MARK-- message capability | ||
9 | $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | ||
10 | $ModLoad imklog # kernel logging (formerly provided by rklogd) | ||
11 | |||
12 | # Log all kernel messages to the console. | ||
13 | # Logging much else clutters up the screen. | ||
14 | #kern.* /dev/console | ||
15 | |||
16 | # Log anything (except mail) of level info or higher. | ||
17 | # Don't log private authentication messages! | ||
18 | *.info;mail.none;authpriv.none;cron.none -/var/log/messages | ||
19 | |||
20 | # The authpriv file has restricted access. | ||
21 | authpriv.* /var/log/secure | ||
22 | |||
23 | # Log all the mail messages in one place. | ||
24 | mail.* -/var/log/maillog | ||
25 | |||
26 | |||
27 | # Log cron stuff | ||
28 | cron.* -/var/log/cron | ||
29 | |||
30 | # Everybody gets emergency messages | ||
31 | *.emerg * | ||
32 | |||
33 | # Save news errors of level crit and higher in a special file. | ||
34 | uucp,news.crit -/var/log/spooler | ||
35 | |||
36 | # Save boot messages also to boot.log | ||
37 | local7.* /var/log/boot.log | ||
38 | |||
39 | # Remote Logging (we use TCP for reliable delivery) | ||
40 | # An on-disk queue is created for this action. If the remote host is | ||
41 | # down, messages are spooled to disk and sent when it is up again. | ||
42 | #$WorkDirectory /rsyslog/spool # where to place spool files | ||
43 | #$ActionQueueFileName uniqName # unique name prefix for spool files | ||
44 | #$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) | ||
45 | #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown | ||
46 | #$ActionQueueType LinkedList # run asynchronously | ||
47 | #$ActionResumeRetryCount -1 # infinite retries if host is down | ||
48 | # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional | ||
49 | #*.* @@remote-host:514 | ||
50 | |||
51 | |||
52 | # ######### Receiving Messages from Remote Hosts ########## | ||
53 | # TCP Syslog Server: | ||
54 | # provides TCP syslog reception and GSS-API (if compiled to support it) | ||
55 | #$ModLoad imtcp.so # load module | ||
56 | #$InputTCPServerRun 514 # start up TCP listener at port 514 | ||
57 | |||
58 | # UDP Syslog Server: | ||
59 | #$ModLoad imudp.so # provides UDP syslog reception | ||
60 | #$UDPServerRun 514 # start a UDP syslog server at standard port 514 | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_5.8.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_5.8.0.bb new file mode 100644 index 0000000000..3a6540d6a0 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_5.8.0.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require rsyslog.inc | ||
2 | PR = "${INC_PR}.0" | ||
3 | |||
4 | SRC_URI[md5sum] = "37562d0e71a24938a9ed7f242bd32d35" | ||
5 | SRC_URI[sha256sum] = "e034b02473fd7e5313522173ec2f6c57e6fbcaec2c6b289edb968b1d64ae3ffd" | ||