[PATCH openbmc 12/32] update: Restore files via an alternate mount directory
OpenBMC Patches
openbmc-patches at stwcx.xyz
Sat Mar 5 23:30:03 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
This will allow us to restore or check-point the whitelisted files
to the read-write filesystem device without causing confusion by
mounting over the upperdir location while at runtime.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index b066471..cab33e9 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -132,9 +132,15 @@ done
if test -d $save -a "x$dorestore" = xy
then
+ odir=$rwdir
+ rwdir=/run/rw
+ upper=$rwdir${upper#$odir}
+
+ mkdir -p $rwdir
mount $rwdev $rwdir -t $(probe_fs_type $rwdev) -o $rwopts
cp -rp $save/. $upper/
umount $rwdir
+ rmdir $rwdir
fi
if test "x$doclean" = xy
--
2.7.1
More information about the openbmc
mailing list