summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-02-28 16:20:19 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-04 10:51:03 -0600
commitfacb7186ccefe51ab66984858c6aad8b4d804af1 (patch)
tree6e0db7155e326577be8545d35c644bd2177dbe13 /meta-phosphor/common
parentfa8316d94339295ca1ee15349816eb5ae6a04567 (diff)
downloadtalos-openbmc-facb7186ccefe51ab66984858c6aad8b4d804af1.tar.gz
talos-openbmc-facb7186ccefe51ab66984858c6aad8b4d804af1.zip
update: Restore files via an alternate mount directory
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@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common')
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh6
1 files changed, 6 insertions, 0 deletions
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 b06647154..cab33e9a5 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
OpenPOWER on IntegriCloud