From 0817918dd6931a71fa89dafc84c43007d1fa18cd Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 20 Jul 2022 14:58:50 -0700 Subject: meta-google: inplace-gbmc-update: Move file for consistency This does not affect correctness but it matches the file priority of gbmc-upgrade. Change-Id: Ie19fc91c5292e1588fe7a46763172273f0724e23 Signed-off-by: William A. Kennington III --- .../recipes-phosphor/flash/inplace-gbmc-update.bb | 4 +- .../inplace-gbmc-update/40-inplace-gbmc-upgrade.sh | 44 ++++++++++++++++++++++ .../inplace-gbmc-update/75-inplace-gbmc-upgrade.sh | 44 ---------------------- 3 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 meta-google/recipes-phosphor/flash/inplace-gbmc-update/40-inplace-gbmc-upgrade.sh delete mode 100644 meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh (limited to 'meta-google') diff --git a/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb b/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb index 418ee3932e..9e2168f2c7 100644 --- a/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb +++ b/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb @@ -22,7 +22,7 @@ SRC_URI += " \ file://inplace-gbmc-verify.sh \ file://inplace-gbmc-version.service \ file://inplace-gbmc-version.sh \ - file://75-inplace-gbmc-upgrade.sh \ + file://40-inplace-gbmc-upgrade.sh \ " SYSTEMD_SERVICE:${PN} += "inplace-gbmc-verify.service" @@ -44,7 +44,7 @@ do_install() { install -m 0644 ${WORKDIR}/config-bmc.json ${D}${datadir}/phosphor-ipmi-flash install -d ${D}${datadir}/gbmc-br-dhcp - install -m 0644 ${WORKDIR}/75-inplace-gbmc-upgrade.sh ${D}${datadir}/gbmc-br-dhcp/ + install -m 0644 ${WORKDIR}/40-inplace-gbmc-upgrade.sh ${D}${datadir}/gbmc-br-dhcp/ } do_install:prepend:dev() { diff --git a/meta-google/recipes-phosphor/flash/inplace-gbmc-update/40-inplace-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/inplace-gbmc-update/40-inplace-gbmc-upgrade.sh new file mode 100644 index 0000000000..95c4ca5a65 --- /dev/null +++ b/meta-google/recipes-phosphor/flash/inplace-gbmc-update/40-inplace-gbmc-upgrade.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${inplace_gbmc_upgrade-}" ] || exit + +# SC doesn't know another file depends on this variable +# shellcheck disable=SC2034 +GBMC_UPGRADE_IMG=/run/initramfs/bmc-image + +gbmc_upgrade_internal() { + local version + version="$(gbmc_upgrade_fetch)" || return + + echo "IMG Version: $version" >&2 + local active_version + active_version="$(inplace-gbmc-version.sh)" || return + echo "Active Version: $active_version" >&2 + if [[ "$version" == "$active_version" ]]; then + echo 'Version already active' >&2 + return 0 + fi + + echo 'Verifying image' >&2 + systemctl start inplace-gbmc-verify || return + echo 'Rebooting to perform update' >&2 + reboot || return + # Ensure that we don't "complete" the netboot process until + # after the update completes + exit 0 +} + +inplace_gbmc_upgrade=1 diff --git a/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh deleted file mode 100644 index 95c4ca5a65..0000000000 --- a/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -[ -z "${inplace_gbmc_upgrade-}" ] || exit - -# SC doesn't know another file depends on this variable -# shellcheck disable=SC2034 -GBMC_UPGRADE_IMG=/run/initramfs/bmc-image - -gbmc_upgrade_internal() { - local version - version="$(gbmc_upgrade_fetch)" || return - - echo "IMG Version: $version" >&2 - local active_version - active_version="$(inplace-gbmc-version.sh)" || return - echo "Active Version: $active_version" >&2 - if [[ "$version" == "$active_version" ]]; then - echo 'Version already active' >&2 - return 0 - fi - - echo 'Verifying image' >&2 - systemctl start inplace-gbmc-verify || return - echo 'Rebooting to perform update' >&2 - reboot || return - # Ensure that we don't "complete" the netboot process until - # after the update completes - exit 0 -} - -inplace_gbmc_upgrade=1 -- cgit v1.2.3