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.

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: Icba3381bfdc23673346d895b87b25afe3bfb8450
Signed-off-by: David Hendricks <>
Reviewed-by: Hung-Te Lin <>
Reviewed-by: Duncan Laurie <>
1 file changed