diff options
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng/syslog-ng.inc')
-rw-r--r-- | meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc index cf6a3de499..09c2f51248 100644 --- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc +++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc @@ -16,7 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=24c0c5cb2c83d9f2ab725481e4df5240" DEPENDS = "libpcre flex glib-2.0 openssl util-linux" SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.tar.gz \ - file://syslog-ng.conf \ + file://syslog-ng.conf.systemd \ + file://syslog-ng.conf.sysvinit \ file://initscript \ file://volatiles.03_syslog-ng \ file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ @@ -71,7 +72,6 @@ do_configure_prepend() { 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 install -d ${D}/${sysconfdir}/default/volatiles/ @@ -82,17 +82,24 @@ do_install_append() { # support for systemd if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install ${WORKDIR}/syslog-ng.conf.systemd ${D}${sysconfdir}/${BPN}/${BPN}.conf + install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${S}/contrib/systemd/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@.service - install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${systemd_unitdir}/system/${BPN}@default + install -m 0644 ${S}/contrib/systemd/${BPN}@default ${D}${sysconfdir}/default/${BPN}@default + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default + sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${sysconfdir}/default/${BPN}@default - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default - sed -i -e 's,@BASEBINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/${BPN}@.service ${D}${systemd_unitdir}/system/${BPN}@default + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants + ln -sf ../${BPN}@.service ${D}${systemd_unitdir}/system/multi-user.target.wants/${BPN}@default.service + else + install ${WORKDIR}/syslog-ng.conf.sysvinit ${D}${sysconfdir}/${BPN}/${BPN}.conf fi } -FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools" +FILES_${PN} += "${datadir}/include/scl/ ${datadir}/xsd ${datadir}/tools ${systemd_unitdir}/system/multi-user.target.wants/*" RDEPENDS_${PN} += "gawk ${@bb.utils.contains('PACKAGECONFIG','json','${PN}-jconf','',d)}" FILES_${PN}-jconf += " \ @@ -124,7 +131,7 @@ RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}@default ${BPN}@.service" +SYSTEMD_SERVICE_${PN} = "${BPN}@.service" INITSCRIPT_NAME = "syslog" INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." |