file_lock: Add fallback directory

This adds a fallback directory in case SYSTEM_LOCKFILE_DIR is
unavailable. Since this is a band-aid meant to help older systems
auto-update, the fallback path is hardcoded to "/tmp" as to avoid
polluting the overall lockfile API.

BUG=chromium:616620
BRANCH=none
TEST=Tested on veyron_jaq by removing /run/lock and seeing
mosys, flashrom, and ectool run successfully with
firmware_utility_lock in /tmp.

Change-Id: I64710cf2f9e131f6ea82b0a7bf18ea090e2ebbda
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/348841
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
(cherry picked from commit 467b82583f0419ea1b49b9e7e739ad257b1d6528)
Reviewed-on: https://chromium-review.googlesource.com/350153
1 file changed