[PATCH openbmc v2 16/34] update: Add option to copy files to runtime cow directory
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:05 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
Add an option to copy files to the runtime copy-on-write upper
directory from the saved directory to allow init to request the
files for use without knowing the saved files directory.
This will be used to initialize the cow directory from the
persistent rwfs file system when choosing to run in RAM.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh | 10 ++++++++++
1 file changed, 10 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 6f26550..6b0d7a0 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
@@ -63,6 +63,7 @@ mounted=
doclean=
dosave=y
dorestore=y
+toram=
whitelist=/run/initramfs/whitelist
image=/run/initramfs/image-
@@ -88,6 +89,9 @@ do
--restore-files)
dorestore=y
shift ;;
+ --copy-files)
+ toram=y
+ shift ;;
*)
echo 2>&1 "Unknown option $1"
exit 1 ;;
@@ -138,6 +142,12 @@ do
flashcp -v $f /dev/$m
done
+if test "x$toram" = xy
+then
+ mkdir -p $upper
+ cp -rp $save/. $upper/
+fi
+
if test -d $save -a "x$dorestore" = xy
then
odir=$rwdir
--
2.7.1
More information about the openbmc
mailing list