1SUMMARY = "Init BMC Hostname"
2DESCRIPTION = "Setup BMC Unique hostname"
3PR = "r1"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6
7inherit allarch systemd
8
9RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils}"
10
11SYSTEMD_SERVICE:${PN} = "first-boot-set-hostname.service"
12
13SRC_URI = "file://${BPN}.sh file://${BPN}.service"
14
15S = "${WORKDIR}"
16do_install() {
17    sed "s/{MACHINE}/${MACHINE}/" -i ${BPN}.sh
18    install -d ${D}${bindir} ${D}${systemd_system_unitdir}
19    install ${BPN}.sh ${D}${bindir}/
20    install -m 644 ${BPN}.service ${D}${systemd_system_unitdir}/
21}
22
23