diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-06-27 22:17:14 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-07-12 02:29:15 +0300 |
commit | 89404394741e92e34bd3f850dd48563ae0a1b9c5 (patch) | |
tree | 16d888a84803faf40c6c7f9d1c24b0a3d54fd6ff /meta-phosphor/common/recipes-phosphor/flash | |
parent | edd448c3d339bc1427f8864ea8c06d73b4e88ddd (diff) | |
download | openbmc-89404394741e92e34bd3f850dd48563ae0a1b9c5.tar.xz |
obmc-flash-bmc: Check alt rwfs volume exists
Check that the alt rwfs ubi volume exists before attempting
to mount it to avoid journal error messages.
Resolves openbmc/openbmc#3245
Tested: Mount is not attempted if alt rwfs doesn't exist, and
no error msgs are created.
Change-Id: Id48a06ca32d799686859e2ff14399d39cc8076bd
Signed-off-by: Adriana Kobylak <anoo@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 | 11 |
1 files changed, 7 insertions, 4 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 d14bcef7d..0b1b16ed3 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 @@ -234,10 +234,13 @@ ubi_cleanup() { mount_alt_rwfs() { altNum="$(findmtdnum "alt-bmc")" if [ ! -z "${altNum}" ]; then - altVarMount="/media/alt/var" - mkdir -p "${altVarMount}" - if mount ubi"${altNum}":rwfs "${altVarMount}" -t ubifs -o defaults; then - mkdir -p "${altVarMount}"/persist/etc + altRwfs=$(ubinfo -a -d ${altNum} | grep -w "rwfs") || true + if [ ! -z "${altRwfs}" ]; then + altVarMount="/media/alt/var" + mkdir -p "${altVarMount}" + if mount ubi"${altNum}":rwfs "${altVarMount}" -t ubifs -o defaults; then + mkdir -p "${altVarMount}"/persist/etc + fi fi fi } |