From 7c741420765a9615bf2e535458f040ada4bde203 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 5 Oct 2020 19:17:26 +0530 Subject: [PATCH] creates /var/run/cloud folder for creation of lock file --- scripts/vm/network/vnet/modifyvxlan.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/vm/network/vnet/modifyvxlan.sh b/scripts/vm/network/vnet/modifyvxlan.sh index 3aa19ad424d6..6af2f09613c2 100755 --- a/scripts/vm/network/vnet/modifyvxlan.sh +++ b/scripts/vm/network/vnet/modifyvxlan.sh @@ -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