mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
busybox: fix syslog related meta data
Set RCONFLICTS to disallow multiple syslog daemon providers to be installed on the target at the same time, and remove codes which dealt with such situation. Supporting multiple syslog daemons on the same image doesn't have much sense. rsyslog and syslog-ng in meta-oe have set RCONFLICTS to disallow this. And we do the same for busybox. Also, remove the line of creating a meaningless symlink of /lib/systemd/syslog.service to /dev/null. (From OE-Core rev: 597bbf99ee8e88294f2ed96c84a51f9ed83e8933) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ae32558a19
commit
cb92d86b4d
|
|
@ -41,7 +41,9 @@ INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
|
|||
SYSTEMD_PACKAGES = "${PN}-syslog"
|
||||
SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}"
|
||||
|
||||
CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
|
||||
CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
|
||||
RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng"
|
||||
|
||||
CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
|
||||
|
||||
RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
|
||||
|
|
@ -248,9 +250,9 @@ do_install () {
|
|||
fi
|
||||
|
||||
if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
|
||||
install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
|
||||
install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
|
||||
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
|
||||
install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog
|
||||
install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf
|
||||
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
|
||||
fi
|
||||
if grep "CONFIG_CROND=y" ${B}/.config; then
|
||||
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
|
||||
|
|
@ -311,7 +313,6 @@ do_install () {
|
|||
install -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
|
||||
fi
|
||||
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
|
||||
|
|
@ -322,7 +323,7 @@ do_install () {
|
|||
|
||||
# Remove the sysvinit specific configuration file for systemd systems to avoid confusion
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
|
||||
rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN}
|
||||
rm -f ${D}${sysconfdir}/syslog-startup.conf
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -336,20 +337,6 @@ inherit update-alternatives
|
|||
|
||||
ALTERNATIVE_PRIORITY = "50"
|
||||
|
||||
ALTERNATIVE_${PN}-syslog += "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'syslog-conf', '', d)}"
|
||||
ALTERNATIVE_LINK_NAME[syslog-conf] = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', "${sysconfdir}/syslog.conf", '', d)}"
|
||||
|
||||
python () {
|
||||
if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
|
||||
pn = d.getVar('PN')
|
||||
d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
|
||||
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir')))
|
||||
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
|
||||
d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
|
||||
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir')))
|
||||
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
|
||||
}
|
||||
|
||||
python do_package_prepend () {
|
||||
# We need to load the full set of busybox provides from the /etc/busybox.links
|
||||
# Use this to see the update-alternatives with the right information
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user