summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRadu Moisan <radu.moisan@intel.com>2013-01-17 15:09:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-26 22:43:01 +0000
commit58a6a7c056ff86d69b25528f8235b3bbc8cd8c12 (patch)
tree4c1b7f320809c96f9455e6873426fd67686adfd0 /meta
parentbdca49274173153b1b0a72887de6321b4756b684 (diff)
downloadpoky-58a6a7c056ff86d69b25528f8235b3bbc8cd8c12.tar.gz
busybox: enable systemd integration for syslogd
(From OE-Core rev: cf3618f9a57e46fb78d5be35d473e2dd5290e961) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/busybox/busybox.inc18
-rw-r--r--meta/recipes-core/busybox/busybox_1.20.2.bb2
-rw-r--r--meta/recipes-core/busybox/files/busybox-klogd.service.in8
-rw-r--r--meta/recipes-core/busybox/files/busybox-syslog.service.in13
4 files changed, 39 insertions, 2 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index fc6ca917cd..e936e59646 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -18,7 +18,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
18PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" 18PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
19 19
20FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" 20FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
21FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*" 21FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service"
22FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" 22FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
23FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" 23FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
24FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" 24FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
@@ -32,12 +32,16 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev"
32INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" 32INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
33INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." 33INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
34INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 34INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
35
36SYSTEMD_PACKAGES = "${PN}-syslog"
37SYSTEMD_SERVICE_${PN}-syslog = "${PN}-syslog.service"
38
35CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" 39CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
36CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" 40CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
37 41
38RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" 42RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
39 43
40inherit cml1 update-rc.d 44inherit cml1 systemd update-rc.d
41 45
42# internal helper 46# internal helper
43def busybox_cfg(feature, features, tokens, cnf, rem): 47def busybox_cfg(feature, features, tokens, cnf, rem):
@@ -213,6 +217,16 @@ do_install () {
213 fi 217 fi
214 fi 218 fi
215 install -m 0644 ${S}/busybox.links ${D}${sysconfdir} 219 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
220
221 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
222 install -d ${D}${systemd_unitdir}/system
223 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
224 > ${D}${systemd_unitdir}/system/busybox-syslog.service
225 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
226 > ${D}${systemd_unitdir}/system/busybox-klogd.service
227
228 ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
229 fi
216} 230}
217 231
218inherit update-alternatives 232inherit update-alternatives
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e4ea..a02cd38f37 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,6 +28,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
28 file://fix-for-spurious-testsuite-failure.patch \ 28 file://fix-for-spurious-testsuite-failure.patch \
29 file://busybox-1.20.2-kernel_ver.patch \ 29 file://busybox-1.20.2-kernel_ver.patch \
30 file://stat-usr-bin.patch \ 30 file://stat-usr-bin.patch \
31 file://busybox-syslog.service.in \
32 file://busybox-klogd.service.in \
31 file://testsuite-du-du-k-works-fix-false-positive.patch" 33 file://testsuite-du-du-k-works-fix-false-positive.patch"
32 34
33SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" 35SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
diff --git a/meta/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in
new file mode 100644
index 0000000000..d7c77558f3
--- /dev/null
+++ b/meta/recipes-core/busybox/files/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/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
new file mode 100644
index 0000000000..2e04321385
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -0,0 +1,13 @@
1[Unit]
2Description=System Logging Service
3Wants=busybox-klogd.service
4
5[Service]
6EnvironmentFile=-/etc/default/busybox-syslog
7ExecStart=@base_sbindir@/syslogd -n $OPTIONS
8Sockets=syslog.socket
9
10[Install]
11WantedBy=multi-user.target
12Also=busybox-klogd.service
13Alias=syslog.service