diff options
author | Michael Tritz <mtritz@us.ibm.com> | 2017-09-07 15:13:04 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-09-11 16:07:43 +0000 |
commit | f16776995251f37c4a912c8c2c10d98c83cf3573 (patch) | |
tree | 3a50e40c102efc603015bde3cab32ba580a3c571 /meta-phosphor/common/recipes-phosphor/flash | |
parent | 2a2cea336ef006e397c9e1c971a3572fd88320f1 (diff) | |
download | talos-openbmc-f16776995251f37c4a912c8c2c10d98c83cf3573.tar.gz talos-openbmc-f16776995251f37c4a912c8c2c10d98c83cf3573.zip |
Suppress undefined rwreset error in obmc-flash-bmc
This commit tweaks obmc-flash-bmc to suppress the error message
produced when the environment variable rwreset is undefined. In
context, this variable is checked to verify if a factory reset
should be performed. If the variable is not set, or if it's set
to anything other than true, we don't perform the reset - this is
not an error, so no need to log one to the journal.
Resolves openbmc/openbmc#2249
Change-Id: Ibe595f3ca879afc141bed2b7b186233ea2db9d14
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/flash')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc index 60e976be3..57b557fd7 100644 --- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc +++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc @@ -82,7 +82,7 @@ ubi_rw() { rw="${rwmtd#mtd}" ubidev="/dev/ubi${rw}" - if [ "$(fw_printenv rwreset)" == "rwreset=true" ]; then + if [ "$(fw_printenv rwreset 2>/dev/null)" == "rwreset=true" ]; then ubi_remove "${name}" fw_setenv rwreset fi |