diff options
author | Erich Eckner <git@eckner.net> | 2018-01-22 10:59:24 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-22 10:59:24 +0100 |
commit | fdb0d1b3ee103ab87fbe15c492402fb4f23846ce (patch) | |
tree | ab6be759cbb1970fa57b861eba3c94e7f92d9bdc /bin/bootstrap-mysql | |
parent | 6c6809e9503d7791e22f295351098fd709410921 (diff) | |
download | builder-fdb0d1b3ee103ab87fbe15c492402fb4f23846ce.tar.xz |
bin/bootstrap-mysql: lock everything
Diffstat (limited to 'bin/bootstrap-mysql')
-rwxr-xr-x | bin/bootstrap-mysql | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index fcb2f7e..b67be6f 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -6,6 +6,22 @@ tmp_dir=$(mktemp -d 'tmp.bootstrap-mysql.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT +exec 9> "${build_list_lock_file}" +if ! flock -n 9; then + >&2 echo 'Cannot get build-list lock.' + exit 1 +fi +exec 8> "${sanity_check_lock_file}" +if ! flock -s -n 9; then + >&2 echo 'Cannot get sanity-check lock.' + exit 1 +fi +exec 7> "${package_database_lock_file}" +if ! flock -s -n 7; then + >&2 echo 'Cannot get package-database lock.' + exit 1 +fi + for dir in $(ls_master_mirror 'i686'); do ls_master_mirror "i686/${dir}" | \ sed ' |