Leo Tu | 9104c30 | 2022-08-18 05:17:39 +0000 | [diff] [blame] | 1 | SUMMARY = "Glome Login Scripts" |
| 2 | DESCRIPTION = "Glome Login Scripts" |
| 3 | PR = "r1" |
| 4 | |
| 5 | LICENSE = "Apache-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
| 7 | |
| 8 | GLOME_FALLBACK_SERV ?= "" |
| 9 | GLOME_FALLBACK_OBJ ?= "" |
| 10 | GLOME_HOSTNAME_SUFFIX ?= "" |
| 11 | GLOME_BOARDSN_KEY ?= "bmc-boardsn" |
| 12 | |
| 13 | RDEPENDS:${PN} += "bash" |
| 14 | RDEPENDS:${PN} += "glome" |
| 15 | RDEPENDS:${PN} += "jq" |
| 16 | RDEPENDS:${PN} += "obmc-console" |
| 17 | |
| 18 | SRC_URI += "file://glome-login.sh.in" |
| 19 | |
| 20 | do_install:append() { |
| 21 | if [ -z '${GLOME_FALLBACK_SERV}' ]; then |
| 22 | echo 'Missing GLOME_FALLBACK_SERV' >&2 |
| 23 | exit 1 |
| 24 | fi |
| 25 | |
| 26 | if [ -z '${GLOME_FALLBACK_OBJ}' ]; then |
| 27 | echo 'Missing GLOME_FALLBACK_OBJ' >&2 |
| 28 | exit 1 |
| 29 | fi |
| 30 | |
| 31 | if [ -z '${GLOME_HOSTNAME_SUFFIX}' ]; then |
| 32 | echo 'Missing GLOME_HOSTNAME_SUFFIX' >&2 |
| 33 | exit 1 |
| 34 | fi |
| 35 | |
| 36 | sed ${WORKDIR}/glome-login.sh.in \ |
| 37 | -e 's#@INV_SERV@#${GLOME_FALLBACK_SERV}#' \ |
| 38 | -e 's#@INV_OBJ@#${GLOME_FALLBACK_OBJ}#' \ |
| 39 | -e 's#@HOSTNAME_SUFFIX@#${GLOME_HOSTNAME_SUFFIX}#' \ |
| 40 | -e 's#@BOARDSN_KEY@#${GLOME_BOARDSN_KEY}#' \ |
| 41 | > ${WORKDIR}/glome-login.sh |
| 42 | |
| 43 | install -d ${D}${bindir} |
| 44 | install -m 0755 ${WORKDIR}/glome-login.sh ${D}${bindir} |
| 45 | } |
| 46 | |
| 47 | # This is an example to override the glome login service in the bbappend for 'prod' |
| 48 | # |
| 49 | #FILES:${PN}:append:prod = " \ |
| 50 | # ${systemd_system_unitdir}/serial-to-bmc@.service.d/bmc-login-glome-override.conf \ |
| 51 | # ${systemd_system_unitdir}/serial-getty@.service.d/bmc-login-glome-override.conf \ |
| 52 | # " |
| 53 | # |
| 54 | #do_install:append:prod() { |
| 55 | # install -D -m 0644 ${WORKDIR}/bmc-login-glome-override.conf \ |
| 56 | # ${D}${systemd_system_unitdir}/serial-to-bmc@.service.d/bmc-login-glome-override.conf |
| 57 | # install -D -m 0644 ${WORKDIR}/bmc-login-glome-override.conf \ |
| 58 | # ${D}${systemd_system_unitdir}/serial-getty@.service.d/bmc-login-glome-override.conf |
| 59 | #} |