preinit-mounts: init: Enhance handling of overlay errors

There has been a couple instances of overlay errors: duplicated
overlay mounts, and corrupted files that live in a subdirectory.

Add the following enhancements for when an overlay error is detected:
- If the etc umount fails, do not attempt to re-mount the overlay.
  This prevents duplicate mounts.
- Check each file after re-creating the overlay, and if it still has
  errors, delete it from the overlay. This would help also in cases
  like the point above where the umount fails and the overlay was not
  recreated.
- Check all overlay files recursively instead of just the ones in the
  top directory. One instance of this corruption was seen on a file
  in a subdirectory.

Tested: Verified the script would check all files in the overlay.

Change-Id: Ifbf5f283c6b19a3d90eead2c9c9f3cb0f6350a4b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed
tree: ee28bb030a58888f896a056d59b25eb523921001
  1. aspeed-layer/
  2. classes/
  3. conf/
  4. nuvoton-layer/
  5. raspberrypi/
  6. recipes-connectivity/
  7. recipes-core/
  8. recipes-devtools/
  9. recipes-extended/
  10. recipes-graphics/
  11. recipes-phosphor/
  12. recipes-protocols/
  13. recipes-support/
  14. recipes-textproc/
  15. recipes-x86/
  16. COPYING.apache-2.0
  17. COPYING.MIT
  18. LICENSE
  19. MAINTAINERS
  20. README.md
  21. recipes.txt
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.