mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
busybox: handle syslog
If CONFIG_KLOGD is not enabled, then the related service file should
not be installed, The error message is below:
Cannot add dependency job for unit busybox-klogd.service,
ignoring: Unit busybox-klogd.service failed to load:
No such file or directory.
So we should first check the configuration before we install these
service files.
(From OE-Core rev: c3cc402df996654bf6f838b1e79e16a8bdd6d4d7)
Signed-off-by: Yadi.hu <yadi.hu@windriver.com>
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -315,20 +315,24 @@ 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
|
||||||
|
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
|
||||||
|
|
||||||
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
|
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
|
||||||
install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
|
sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
|
||||||
> ${D}${systemd_unitdir}/system/busybox-syslog.service
|
> ${D}${systemd_unitdir}/system/busybox-syslog.service
|
||||||
|
if [ ! -e ${D}${systemd_unitdir}/system/busybox-klogd.service ] ; then
|
||||||
|
sed -i '/klog/d' ${D}${systemd_unitdir}/system/busybox-syslog.service
|
||||||
|
fi
|
||||||
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
|
if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
|
||||||
install -d ${D}${sysconfdir}/default
|
install -d ${D}${sysconfdir}/default
|
||||||
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
|
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
|
||||||
fi
|
fi
|
||||||
fi
|
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
|
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