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