diff --git a/core/imageroot/usr/local/agent/bin/extract-image b/core/imageroot/usr/local/agent/bin/extract-image index 0e4ea364d..b382669ef 100755 --- a/core/imageroot/usr/local/agent/bin/extract-image +++ b/core/imageroot/usr/local/agent/bin/extract-image @@ -25,9 +25,9 @@ image=${1:?missing image URL argument} set -e # Prevent concurrent execution of this script with a lock file opened with -# an arbitrary high FD number, like 201. The lock is released when the -# script completes: -exec 201>"${AGENT_STATE_DIR:?}"/.extract-image.lock +# an arbitrary high FD number, like 201. The lock is created in the +# working directory, and is released when the script completes: +exec 201>.extract-image.lock flock --verbose -n 201 lst_file=".imageroot.lst"