| SUMMARY = "Configure hosts file for gBMC" |
| LICENSE = "Apache-2.0" |
| LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| |
| FILESEXTRAPATHS:prepend := "${THISDIR}/gbmc-hosts-gen:" |
| |
| inherit systemd |
| |
| SRC_URI:append = " \ |
| file://gbmc-hosts-gen.service \ |
| file://gbmc-hosts-gen.sh \ |
| file://99-localhost \ |
| " |
| S = "${WORKDIR}" |
| |
| RDEPENDS:${PN} += "bash" |
| |
| SYSTEMD_SERVICE:${PN}:append = " gbmc-hosts-gen.service" |
| FILES:${PN}:append = " ${datadir}/hosts.d" |
| |
| do_install:append() { |
| install -d -m0755 ${D}${bindir} |
| install -m0755 gbmc-hosts-gen.sh ${D}${bindir}/ |
| |
| install -d -m0755 ${D}${systemd_system_unitdir}/ |
| install -m0644 gbmc-hosts-gen.service ${D}${systemd_system_unitdir}/ |
| |
| install -d -m0755 ${D}${sysconfdir}/ |
| ln -sv ../run/hosts ${D}${sysconfdir}/hosts |
| |
| install -d -m0755 ${D}${datadir}/hosts.d |
| install -m0644 99-localhost ${D}${datadir}/hosts.d/ |
| } |