Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 1 | SUMMARY = "Init BMC Hostname" |
| 2 | DESCRIPTION = "Setup BMC Unique hostname" |
| 3 | PR = "r1" |
| 4 | LICENSE = "Apache-2.0" |
Brad Bishop | 1ebdb61 | 2019-09-13 12:18:25 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 6 | |
| 7 | inherit allarch systemd |
| 8 | |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 9 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils}" |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 10 | |
Adriana Kobylak | 8c6707f | 2021-08-06 17:35:36 +0000 | [diff] [blame] | 11 | SYSTEMD_SERVICE:${PN} = "first-boot-set-hostname.service" |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 12 | |
Adriana Kobylak | fc7299c | 2019-08-08 10:30:29 -0500 | [diff] [blame] | 13 | SRC_URI = "file://${BPN}.sh file://${BPN}.service" |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 14 | |
| 15 | S = "${WORKDIR}" |
| 16 | do_install() { |
Adriana Kobylak | fc7299c | 2019-08-08 10:30:29 -0500 | [diff] [blame] | 17 | sed "s/{MACHINE}/${MACHINE}/" -i ${BPN}.sh |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 18 | install -d ${D}${bindir} ${D}${systemd_system_unitdir} |
Adriana Kobylak | fc7299c | 2019-08-08 10:30:29 -0500 | [diff] [blame] | 19 | install ${BPN}.sh ${D}${bindir}/ |
| 20 | install -m 644 ${BPN}.service ${D}${systemd_system_unitdir}/ |
Alexander Filippov | 89bd384 | 2019-05-22 11:07:30 +0300 | [diff] [blame] | 21 | } |
| 22 | |