obmc-phosphor-initfs: persist rwfs-purged on init
In obmc-init.sh, when /var/google/do-rwfs-purge triggers an RWFS wipe
(rm -rf $upper), also persist rwfs-purged directly into
$upper/var/google/rwfs-purged immediately (with sync) in addition to
/run/initramfs/rwfs-purged.
Previously, rwfs-purged was only copied into /var/google by
49-purge-rwfs.sh during the subsequent netboot. If that subsequent boot
does not run 49-purge-rwfs.sh or reboots before reaching it, the trip_id
in /run/initramfs/rwfs-purged (tmpfs) is lost and the next netboot
triggers a redundant second RWFS purge and hard reset cycle.
Tested:
- Verified obmc-init.sh persists $upper/var/google/rwfs-purged across
reboots immediately after wiping $upper.
Google-Bug-Id: 502759705
Google-Bug-Id: 549688820
Change-Id: I0f5102f4aee31383434e06a9b00c9c74f72a90e4
Signed-off-by: Mohamed Elbadry <elbadrym@google.com>
1 file changed