mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
busybox: handle syslog related files properly
If CONFIG_SYSLOGD is not enabled, then the related service file should not be installed as it will always fail at system start-up. The error message is as following. [FAILED] Failed to start System Logging Service. The same logic applies to CONFIG_KLOGD. So we should first check the configuration before we install these service files. [YOCTO #5302] (From OE-Core rev: b44e291a87539fbb8e6da1a16c56f425a417e7bd) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -272,18 +272,21 @@ do_install () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||||
install -d ${D}${systemd_unitdir}/system
|
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
|
||||||
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
|
install -d ${D}${systemd_unitdir}/system
|
||||||
> ${D}${systemd_unitdir}/system/busybox-syslog.service
|
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
|
||||||
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
|
> ${D}${systemd_unitdir}/system/busybox-syslog.service
|
||||||
> ${D}${systemd_unitdir}/system/busybox-klogd.service
|
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
|
||||||
|
install -d ${D}${sysconfdir}/default
|
||||||
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
|
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
|
||||||
install -d ${D}${sysconfdir}/default
|
fi
|
||||||
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
|
ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
|
||||||
|
fi
|
||||||
|
if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
|
||||||
|
> ${D}${systemd_unitdir}/system/busybox-klogd.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the sysvinit specific configuration file for systemd systems to avoid confusion
|
# Remove the sysvinit specific configuration file for systemd systems to avoid confusion
|
||||||
|
|||||||
Reference in New Issue
Block a user