diff options
author | Milton D. Miller II <miltonm@us.ibm.com> | 2016-02-27 17:01:13 -0600 |
---|---|---|
committer | Milton D. Miller II <miltonm@us.ibm.com> | 2016-03-04 10:51:50 -0600 |
commit | 21786ff0b988fb46f2164b72d80c0de749d47c06 (patch) | |
tree | 4d173f1b717d8298529f75e6f45cc9f8db2b8da6 /meta-phosphor/common/recipes-phosphor | |
parent | ed3680d0281ba6e908be5508e50e5c32ce2df5b4 (diff) | |
download | talos-openbmc-21786ff0b988fb46f2164b72d80c0de749d47c06.tar.gz talos-openbmc-21786ff0b988fb46f2164b72d80c0de749d47c06.zip |
init: Always move images from root
If images are to be updated before init continue to move them
to /run/initramfs. However, if they are not to be flashed before
init instead move them to /run.
This will result in the image-rofs being loop mounted for this run,
and all images will be available at runtime for flash update at
runtime.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh index 89e4538ee..7953176d5 100644 --- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh +++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh @@ -115,13 +115,18 @@ then debug_takeover "Debug initial shell requested by command line." fi -# If there are images in root move them to run/initramfs/ now. +# If there are images in root move them to /run/initramfs/ or /run/ now. imagebasename=${image##*/} -if test -n "${imagebasename}" -a "x$flash_images_before_init" = xy && - ls /${imagebasename}* > /dev/null 2>&1 +if test -n "${imagebasename}" && ls /${imagebasename}* > /dev/null 2>&1 then - echo "Pending flash updates found." - mv /${imagebasename}* ${image%$imagebasename} + if test "x$flash_images_before_init" = xy + then + echo "Flash images found, will update before starting init." + mv /${imagebasename}* ${image%$imagebasename} + else + echo "Flash images found, will use but deferring flash update." + mv /${imagebasename}* /run/ + fi fi if grep -w clean-rwfs-filesystem $optfile |