summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2018-06-27 14:17:14 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-07-11 23:29:15 +0000
commit89404394741e92e34bd3f850dd48563ae0a1b9c5 (patch)
tree16d888a84803faf40c6c7f9d1c24b0a3d54fd6ff
parentedd448c3d339bc1427f8864ea8c06d73b4e88ddd (diff)
downloadtalos-openbmc-89404394741e92e34bd3f850dd48563ae0a1b9c5.tar.gz
talos-openbmc-89404394741e92e34bd3f850dd48563ae0a1b9c5.zip
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>
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc11
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
}
OpenPOWER on IntegriCloud