factory_install: sync after installation is completed

The default action after factory installation is reboot.
However, there might be some buffered data needs to be synced
into disk at that time, ex: part of release image.
It has been observed in factory that the 'reboot' might be
related to the issue 'Chrome OS is missing or damaged' after
factory wipe. Add a sync/sleep to write any data buffered in
memory out to disk before reboot.

BUG=None
TEST=setup mini-omaha server and install a factory bundle on DUT

Change-Id: Id536da303b50b909ec76a5d223c93b33c451c979
Reviewed-on: https://chromium-review.googlesource.com/256272
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
1 file changed