summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-12-29 06:44:47 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-01-09 10:31:00 +0100
commitc48a6a605c6d8d38cfbc5df39b3dc310bffc07c1 (patch)
tree7cb743daa976ef892ccb835346b2de48a2e573fb
parent458db1ad63e1086ab16184e4aef22b0f352efe9c (diff)
downloadmeta-openembedded-c48a6a605c6d8d38cfbc5df39b3dc310bffc07c1.tar.gz
busybox: add systemd support for syslog service
This uses a busybox-syslog default file to pass options to syslogd. For it, the 'OPTIONS' variable needs to be set. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--meta-oe/recipes-core/busybox/busybox/busybox-klogd.service.in8
-rw-r--r--meta-oe/recipes-core/busybox/busybox/busybox-syslog.default1
-rw-r--r--meta-oe/recipes-core/busybox/busybox/busybox-syslog.service.in13
-rw-r--r--meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend30
4 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/busybox/busybox/busybox-klogd.service.in b/meta-oe/recipes-core/busybox/busybox/busybox-klogd.service.in
new file mode 100644
index 0000000000..d7c77558f3
--- /dev/null
+++ b/meta-oe/recipes-core/busybox/busybox/busybox-klogd.service.in
@@ -0,0 +1,8 @@
1[Unit]
2Description=Kernel Logging Service
3
4[Service]
5ExecStart=@base_sbindir@/klogd -n
6
7[Install]
8WantedBy=multi-user.target
diff --git a/meta-oe/recipes-core/busybox/busybox/busybox-syslog.default b/meta-oe/recipes-core/busybox/busybox/busybox-syslog.default
new file mode 100644
index 0000000000..8a21e6dafd
--- /dev/null
+++ b/meta-oe/recipes-core/busybox/busybox/busybox-syslog.default
@@ -0,0 +1 @@
OPTIONS="-C64"
diff --git a/meta-oe/recipes-core/busybox/busybox/busybox-syslog.service.in b/meta-oe/recipes-core/busybox/busybox/busybox-syslog.service.in
new file mode 100644
index 0000000000..db90082596
--- /dev/null
+++ b/meta-oe/recipes-core/busybox/busybox/busybox-syslog.service.in
@@ -0,0 +1,13 @@
1[Unit]
2Description=System Logging Service
3
4[Service]
5ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
6EnvironmentFile=-/etc/default/busybox-syslog
7ExecStart=@base_sbindir@/syslogd -n $OPTIONS
8Sockets=syslog.socket
9Wants=busybox-klogd.service
10
11[Install]
12WantedBy=multi-user.target
13Also=busybox-klogd.service
diff --git a/meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend b/meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend
new file mode 100644
index 0000000000..46177e3dd4
--- /dev/null
+++ b/meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend
@@ -0,0 +1,30 @@
1inherit systemd
2
3PRINC := "${@int(PRINC) + 1}"
4
5# look for files in the layer first
6FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
7
8SRC_URI += "file://busybox-syslog.service.in \
9 file://busybox-klogd.service.in \
10 file://busybox-syslog.default"
11
12SYSTEMD_PACKAGES = "${PN}-syslog-systemd"
13SYSTEMD_SERVICE_${PN}-syslog-systemd = "busybox-syslog.service"
14
15do_install_append() {
16 install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
17
18 install -d ${D}${base_libdir}/systemd/system
19 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
20 > ${D}${base_libdir}/systemd/system/busybox-syslog.service
21 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
22 > ${D}${base_libdir}/systemd/system/busybox-klogd.service
23
24 ln -sf /dev/null ${D}${base_libdir}/systemd/system/syslog.service
25}
26
27PACKAGES += "${PN}-syslog-systemd"
28
29RDEPENDS_${PN}-syslog-systemd += "${PN}-syslog"
30FILES_${PN}-syslog-systemd = "${base_libdir}/systemd"