summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-07 21:06:52 +0100
committerErich Eckner <git@eckner.net>2018-02-07 21:06:52 +0100
commit62526023ab4bb6dda4e8189ca74969497bb3ef09 (patch)
tree1b05c3a7bd8dff7268cc1df96ae670f18643dbc0
parentd7e35686716933cbfaac6b900d7d2568063b7e9f (diff)
downloadbuilder-62526023ab4bb6dda4e8189ca74969497bb3ef09.tar.xz
bin/build-master-status-from-mysql: do not block on lock failure
-rwxr-xr-xbin/build-master-status-from-mysql5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/build-master-status-from-mysql b/bin/build-master-status-from-mysql
index 3cacfa1..6ed2e84 100755
--- a/bin/build-master-status-from-mysql
+++ b/bin/build-master-status-from-mysql
@@ -12,7 +12,10 @@ trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
# always block if locked
exec 9> "${build_list_lock_file}"
-flock -s 9
+if ! flock -n -s 9; then
+ >&2 echo 'Mysql-Sanity check skipped, cannot acquire lock.'
+ exit
+fi
# shellcheck disable=SC2016
{