quick-provision: Ensure no concurrent quick provisioning.

Ensure that there is no concurrent quick provisioning through the use
of a lock file.  Similarly, if a quick provision has successfully
completed on the device, do not make a second attempt and instead wait
for it to reboot.

This logic will need to be revisited if quick provisioning becomes the
only form of provisioning without fallback to the legacy path.

BUG=chromium:785065
TEST=loadtest.py -t 1 -s 0; ssh dut /tmp/quick-provision

Change-Id: I79e5e6aeb26e4835165fcd510b769efbe7b2a841
Reviewed-on: https://chromium-review.googlesource.com/857592
Commit-Ready: David Riley <davidriley@chromium.org>
Tested-by: David Riley <davidriley@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed