diff options
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 @@ +[Unit] +Description=Kernel Logging Service + +[Service] +ExecStart=@base_sbindir@/klogd -n + +[Install] +WantedBy=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 @@ +[Unit] +Description=System Logging Service + +[Service] +ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service +EnvironmentFile=-/etc/default/busybox-syslog +ExecStart=@base_sbindir@/syslogd -n $OPTIONS +Sockets=syslog.socket +Wants=busybox-klogd.service + +[Install] +WantedBy=multi-user.target +Also=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 @@ +inherit systemd + +PRINC := "${@int(PRINC) + 1}" + +# look for files in the layer first +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://busybox-syslog.service.in \ + file://busybox-klogd.service.in \ + file://busybox-syslog.default" + +SYSTEMD_PACKAGES = "${PN}-syslog-systemd" +SYSTEMD_SERVICE_${PN}-syslog-systemd = "busybox-syslog.service" + +do_install_append() { + install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog + + install -d ${D}${base_libdir}/systemd/system + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ + > ${D}${base_libdir}/systemd/system/busybox-syslog.service + sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ + > ${D}${base_libdir}/systemd/system/busybox-klogd.service + + ln -sf /dev/null ${D}${base_libdir}/systemd/system/syslog.service +} + +PACKAGES += "${PN}-syslog-systemd" + +RDEPENDS_${PN}-syslog-systemd += "${PN}-syslog" +FILES_${PN}-syslog-systemd = "${base_libdir}/systemd" |