diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue/blankLogo.svg b/meta-ibm/recipes-phosphor/webui/webui-vue/blankLogo.svg new file mode 100644 index 000000000000..747fabda674c --- /dev/null +++ b/meta-ibm/recipes-phosphor/webui/webui-vue/blankLogo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue/change-logo.service b/meta-ibm/recipes-phosphor/webui/webui-vue/change-logo.service new file mode 100644 index 000000000000..f272627c0d51 --- /dev/null +++ b/meta-ibm/recipes-phosphor/webui/webui-vue/change-logo.service @@ -0,0 +1,13 @@ +[Unit] +Description=Start the change logo script +After=system-vpd.service +Before=bmcweb.service + +[Service] +Restart=no +ExecStart=/usr/share/www/changeLogo.sh +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue/changeLogo.sh b/meta-ibm/recipes-phosphor/webui/webui-vue/changeLogo.sh new file mode 100644 index 000000000000..13504a2320d4 --- /dev/null +++ b/meta-ibm/recipes-phosphor/webui/webui-vue/changeLogo.sh @@ -0,0 +1,17 @@ +#!/bin/sh -e + +model=($(busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system xyz.openbmc_project.Inventory.Decorator.Asset SubModel)) +DIR=/usr/share/www/img +if [ "${model[1]}" = '"S0"' ] || [ "${model[1]}" = '"D0"' ]; then + echo "Using IBM logo" +elif [ "${model[1]}" = '"J0"' ]; then + echo "loading IPS logo" + mount --bind ${DIR}/inspur-login-logo.svg.gz ${DIR}/login-company-logo.svg.gz + mount --bind ${DIR}/inspur-logo-header.svg.gz ${DIR}/logo-header.svg.gz + mount --bind ${DIR}/blankLogo.svg.gz /usr/share/www/bee-2-light.svg.gz +else + echo "loading OEM logo" + mount --bind ${DIR}/blankLogo.svg.gz ${DIR}/login-company-logo.svg.gz + mount --bind ${DIR}/blankLogo.svg.gz ${DIR}/logo-header.svg.gz + mount --bind ${DIR}/blankLogo.svg.gz /usr/share/www/bee-2-light.svg.gz +fi diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-login-logo.svg b/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-login-logo.svg new file mode 100644 index 000000000000..61d87b33d8ec --- /dev/null +++ b/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-login-logo.svg @@ -0,0 +1 @@ +LOGO - 副本 \ No newline at end of file diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-logo-header.svg b/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-logo-header.svg new file mode 100644 index 000000000000..88d60ddf4b56 --- /dev/null +++ b/meta-ibm/recipes-phosphor/webui/webui-vue/inspur-logo-header.svg @@ -0,0 +1 @@ +Inspur_logo \ No newline at end of file diff --git a/meta-ibm/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-ibm/recipes-phosphor/webui/webui-vue_%.bbappend index fe11d70df96a..9864b033bc5a 100644 --- a/meta-ibm/recipes-phosphor/webui/webui-vue_%.bbappend +++ b/meta-ibm/recipes-phosphor/webui/webui-vue_%.bbappend @@ -2,3 +2,26 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" EXTRA_OENPM:witherspoon-tacoma = "-- --mode ibm" EXTRA_OENPM:p10bmc = "-- --mode ibm" + +inherit obmc-phosphor-systemd + +SRC_URI:append:p10bmc = " \ + file://changeLogo.sh \ + file://change-logo.service \ + file://inspur-login-logo.svg \ + file://inspur-logo-header.svg \ + file://blankLogo.svg \ + " + +SYSTEMD_SERVICE:${PN}:append:p10bmc = " change-logo.service" + +do_install:append:p10bmc() { + gzip -f -k ${WORKDIR}/inspur-login-logo.svg + gzip -f -k ${WORKDIR}/inspur-logo-header.svg + gzip -f -k ${WORKDIR}/blankLogo.svg + + install -m 0755 ${WORKDIR}/inspur-login-logo.svg.gz ${D}${datadir}/www/img + install -m 0755 ${WORKDIR}/inspur-logo-header.svg.gz ${D}${datadir}/www/img + install -m 0755 ${WORKDIR}/blankLogo.svg.gz ${D}${datadir}/www/img + install -m 0755 ${WORKDIR}/changeLogo.sh ${D}${datadir}/www +}