summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/flash
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-09-13 14:05:31 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-09-15 21:09:14 +0000
commitf144938c0b0a4d2219758ba829a769359b02349e (patch)
tree70a3ccb5c167aae10cc8008c57073ff715a758b3 /meta-phosphor/common/recipes-phosphor/flash
parent2a284a012d902bfa399bc14309337c3c1fe1a8ff (diff)
downloadtalos-openbmc-f144938c0b0a4d2219758ba829a769359b02349e.tar.gz
talos-openbmc-f144938c0b0a4d2219758ba829a769359b02349e.zip
Check if the BMC version already exists in /media before mounting.
- When a system is first flashed, it has 2 rofs-0 mounts, since both chips have the same version. - This change would help prevent the 2nd mount since the BMC version is already mounted. Resolves openbmc/openbmc#2307 Change-Id: I50c7df3deb953b411aa6ff9929907f3879c6e130 Signed-off-by: Saqib Khan <khansa@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-bmc9
1 files changed, 6 insertions, 3 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 116b486de..d0dca1c40 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
@@ -196,9 +196,12 @@ remount_ubi() {
if [[ ${name} == rofs-* ]]; then
mountdir="/media/${name}"
- mkdir -p "${mountdir}"
- ubiblock --create /dev/ubi${mtd}_${element} &> /dev/null
- mount -t squashfs -o ro "/dev/ubiblock${mtd}_${element}" "${mountdir}"
+
+ if [ ! -d ${mountdir} ]; then
+ mkdir -p "${mountdir}"
+ ubiblock --create /dev/ubi${mtd}_${element} &> /dev/null
+ mount -t squashfs -o ro "/dev/ubiblock${mtd}_${element}" "${mountdir}"
+ fi
fi
done
done
OpenPOWER on IntegriCloud