diff options
author | Radu Moisan <radu.moisan@intel.com> | 2013-01-17 15:09:58 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-26 22:43:01 +0000 |
commit | 58a6a7c056ff86d69b25528f8235b3bbc8cd8c12 (patch) | |
tree | 4c1b7f320809c96f9455e6873426fd67686adfd0 /meta | |
parent | bdca49274173153b1b0a72887de6321b4756b684 (diff) | |
download | poky-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.inc | 18 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.20.2.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/busybox/files/busybox-klogd.service.in | 8 | ||||
-rw-r--r-- | meta/recipes-core/busybox/files/busybox-syslog.service.in | 13 |
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}" | |||
18 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" | 18 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" |
19 | 19 | ||
20 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" | 20 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" |
21 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*" | 21 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service" |
22 | FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" | 22 | FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" |
23 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" | 23 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" |
24 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" | 24 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" |
@@ -32,12 +32,16 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev" | |||
32 | INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" | 32 | INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" |
33 | INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." | 33 | INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." |
34 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" | 34 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" |
35 | |||
36 | SYSTEMD_PACKAGES = "${PN}-syslog" | ||
37 | SYSTEMD_SERVICE_${PN}-syslog = "${PN}-syslog.service" | ||
38 | |||
35 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" | 39 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" |
36 | CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" | 40 | CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" |
37 | 41 | ||
38 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" | 42 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" |
39 | 43 | ||
40 | inherit cml1 update-rc.d | 44 | inherit cml1 systemd update-rc.d |
41 | 45 | ||
42 | # internal helper | 46 | # internal helper |
43 | def busybox_cfg(feature, features, tokens, cnf, rem): | 47 | def 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 | ||
218 | inherit update-alternatives | 232 | inherit 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 | ||
33 | SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" | 35 | SRC_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] | ||
2 | Description=Kernel Logging Service | ||
3 | |||
4 | [Service] | ||
5 | ExecStart=@base_sbindir@/klogd -n | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=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] | ||
2 | Description=System Logging Service | ||
3 | Wants=busybox-klogd.service | ||
4 | |||
5 | [Service] | ||
6 | EnvironmentFile=-/etc/default/busybox-syslog | ||
7 | ExecStart=@base_sbindir@/syslogd -n $OPTIONS | ||
8 | Sockets=syslog.socket | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
12 | Also=busybox-klogd.service | ||
13 | Alias=syslog.service | ||