diff options
author | Michael Tritz <mtritz@us.ibm.com> | 2017-11-13 11:05:03 -0600 |
---|---|---|
committer | Michael Tritz <mtritz@us.ibm.com> | 2017-11-13 11:05:14 -0600 |
commit | fb1950f0c3c27daac646d276ed24bcc4d5743c52 (patch) | |
tree | b97caed23260fd8679074f607f6b0da3bb9d713a /meta-openbmc-machines | |
parent | b5da198802d1155b26a7366d0141b12cd5af5a37 (diff) | |
download | talos-openbmc-fb1950f0c3c27daac646d276ed24bcc4d5743c52.tar.gz talos-openbmc-fb1950f0c3c27daac646d276ed24bcc4d5743c52.zip |
Block attempts to create a pnor-patch volume in field mode
This patch improves the obmc-flash-bios script by blocking attempts to
create and mount a pnor-patch volume when the system is in field mode.
When this scenario is reached, the current behavior is to error out
because the script tries to mount pnor-patch to /usr/local/share/pnor,
which is inaccessible in field mode. This fix simply blocks these
attempts to suppress the error message.
Change-Id: I78b5171e66f194d7b8d2b1baa639ee29a1b11794
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
Diffstat (limited to 'meta-openbmc-machines')
-rw-r--r-- | meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios index d92fad5d9..1c90e8b2f 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios @@ -112,6 +112,9 @@ mount_ubi() { pnordev="/dev/mtd${pnor}" if [[ "${name}" == "pnor-patch" ]]; then + if [[ "$(fw_printenv fieldmode 2>/dev/null)" == "fieldmode=true" ]]; then + return 0 + fi if [[ ! "$(hexdump -C -n 3 ${pnordev})" =~ "UBI" ]]; then return 0 fi |