mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 11:38:34 +00:00
syslog-ng: don't use update-alternatives to manage init script
Also, explicitly conflict with other syslog providers. [YOCTO #10433] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
93f7a39fa4
commit
7ee1001491
@@ -22,7 +22,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source
|
||||
file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
|
||||
"
|
||||
|
||||
inherit autotools systemd pkgconfig update-alternatives update-rc.d
|
||||
inherit autotools systemd pkgconfig update-rc.d
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--enable-dynamic-linking \
|
||||
@@ -70,7 +70,7 @@ do_install_append() {
|
||||
install -d ${D}/${sysconfdir}/${BPN}
|
||||
install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
|
||||
install -d ${D}/${sysconfdir}/init.d
|
||||
install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${BPN}
|
||||
install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog
|
||||
install -d ${D}/${sysconfdir}/default/volatiles/
|
||||
install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng
|
||||
install -d ${D}/${localstatedir}/lib/${BPN}
|
||||
@@ -96,26 +96,12 @@ CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
|
||||
# update-rc.d and update-alternatives is important
|
||||
RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
|
||||
|
||||
RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"
|
||||
|
||||
RPROVIDES_${PN} += "${PN}-systemd"
|
||||
RREPLACES_${PN} += "${PN}-systemd"
|
||||
RCONFLICTS_${PN} += "${PN}-systemd"
|
||||
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
|
||||
|
||||
# no syslog-init for systemd
|
||||
python () {
|
||||
if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
|
||||
pn = d.getVar('PN')
|
||||
sysconfdir = d.getVar('sysconfdir')
|
||||
d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
|
||||
d.setVarFlag('ALTERNATIVE_PRIORITY', 'syslog-init', '200')
|
||||
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
|
||||
|
||||
if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
|
||||
pn = d.getVar('PN')
|
||||
d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
|
||||
d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir')))
|
||||
d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/${BPN}.service' % (d.getVar('systemd_unitdir')))
|
||||
}
|
||||
|
||||
INITSCRIPT_NAME = "syslog"
|
||||
INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."
|
||||
|
||||
Reference in New Issue
Block a user