scripts: creates /var/run/cloud folder for creation of lock file (#4373)

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2020-10-14 15:45:22 +05:30 committed by GitHub
parent 94f9f89736
commit cdcc914995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,9 @@ fi
LOCKFILE=/var/run/cloud/vxlan.lock
# ensures that parent directories exists and prepares the lock file
mkdir -p "${LOCKFILE%/*}"
(
flock -x -w 10 200 || exit 1
if [[ "$OP" == "add" ]]; then