diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-29 21:44:22 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-04 10:51:43 -0600 |
commit | 7141eb032aa613182bcc35f8ad2a53ebaeb70d8f (patch) | |
tree | 0f0a079bae771eb09a4cf16c867592d1fc818b12 | |
parent | a987d621d8ddc54cdf32c5f69c8e9873f0c3a199 (diff) | |
download | talos-openbmc-7141eb032aa613182bcc35f8ad2a53ebaeb70d8f.tar.gz talos-openbmc-7141eb032aa613182bcc35f8ad2a53ebaeb70d8f.zip |
update: Add option to copy files to runtime cow directory
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@us.ibm.com>
-rwxr-xr-x | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh | 10 |
1 files changed, 10 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 6f265502a..6b0d7a025 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 |