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:42:36 +0000 |
commit | cf3618f9a57e46fb78d5be35d473e2dd5290e961 (patch) | |
tree | 169085a89270f9c5c7825769702873b3db588802 /meta | |
parent | 4d56de8018d550b3d181d451900cbfb698d64141 (diff) | |
download | openembedded-core-cf3618f9a57e46fb78d5be35d473e2dd5290e961.tar.gz openembedded-core-cf3618f9a57e46fb78d5be35d473e2dd5290e961.tar.bz2 openembedded-core-cf3618f9a57e46fb78d5be35d473e2dd5290e961.zip |
busybox: enable systemd integration for syslogd
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>
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}" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" -FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*" +FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service" FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" @@ -32,12 +32,16 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev" INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" + +SYSTEMD_PACKAGES = "${PN}-syslog" +SYSTEMD_SERVICE_${PN}-syslog = "${PN}-syslog.service" + CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" -inherit cml1 update-rc.d +inherit cml1 systemd update-rc.d # internal helper def busybox_cfg(feature, features, tokens, cnf, rem): @@ -213,6 +217,16 @@ do_install () { fi fi install -m 0644 ${S}/busybox.links ${D}${sysconfdir} + + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ + > ${D}${systemd_unitdir}/system/busybox-syslog.service + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ + > ${D}${systemd_unitdir}/system/busybox-klogd.service + + ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service + fi } 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 \ file://fix-for-spurious-testsuite-failure.patch \ file://busybox-1.20.2-kernel_ver.patch \ file://stat-usr-bin.patch \ + file://busybox-syslog.service.in \ + file://busybox-klogd.service.in \ file://testsuite-du-du-k-works-fix-false-positive.patch" 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 @@ +[Unit] +Description=Kernel Logging Service + +[Service] +ExecStart=@base_sbindir@/klogd -n + +[Install] +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 @@ +[Unit] +Description=System Logging Service +Wants=busybox-klogd.service + +[Service] +EnvironmentFile=-/etc/default/busybox-syslog +ExecStart=@base_sbindir@/syslogd -n $OPTIONS +Sockets=syslog.socket + +[Install] +WantedBy=multi-user.target +Also=busybox-klogd.service +Alias=syslog.service |