blob: f3f7d34cfea26c3ff2679c8e3aeecf055f4d59d2 [file] [log] [blame]
Alexander Filippov89bd3842019-05-22 11:07:30 +03001SUMMARY = "Init BMC Hostname"
2DESCRIPTION = "Setup BMC Unique hostname"
3PR = "r1"
4LICENSE = "Apache-2.0"
Brad Bishop1ebdb612019-09-13 12:18:25 -04005LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Alexander Filippov89bd3842019-05-22 11:07:30 +03006
7inherit allarch systemd
8
9RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_base-utils}"
10
11SYSTEMD_SERVICE_${PN} = "first-boot-set-hostname.service"
12
Adriana Kobylakfc7299c2019-08-08 10:30:29 -050013SRC_URI = "file://${BPN}.sh file://${BPN}.service"
Alexander Filippov89bd3842019-05-22 11:07:30 +030014
15S = "${WORKDIR}"
16do_install() {
Adriana Kobylakfc7299c2019-08-08 10:30:29 -050017 sed "s/{MACHINE}/${MACHINE}/" -i ${BPN}.sh
Alexander Filippov89bd3842019-05-22 11:07:30 +030018 install -d ${D}${bindir} ${D}${systemd_system_unitdir}
Adriana Kobylakfc7299c2019-08-08 10:30:29 -050019 install ${BPN}.sh ${D}${bindir}/
20 install -m 644 ${BPN}.service ${D}${systemd_system_unitdir}/
Alexander Filippov89bd3842019-05-22 11:07:30 +030021}
22