preinit-mounts: Add check for overlay file errors
In some instances when the built image has files in /etc/ that were moved
or renamed from previous builds, a code update to this new image causes
the overlay to appear corrupted. This has also been seen when downgrading
to a level with older kernel and systemd versions, although the root
cause remain unknown.
This change 'fixes' the symptom, by re-creating the overlay if it detects
an error accessing a file.
Tested: Verified the system mounts the overlay successful on a code update
path known to fail.
Change-Id: Ib26ac91fef76f5e0123820b2e30905fd36e9b7ee
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed