From 5f906046c22bd9a55bd1185b2c03d27894b7a425 Mon Sep 17 00:00:00 2001 From: Sajjad Lateef Date: Fri, 15 Oct 2010 13:41:46 -0700 Subject: [PATCH] Create /etc/openvswitch dir when package is installed. Earlier, the /etc/openvswitch directory would get installed as part of the init script's start sequence. However, as newer packages are added, including some that create files in this directory during their init script sequences, a race condition may occur. This change ensures that the directory /etc/openvswitch is created even before the init scripts execute. Thus, the race condition is avoided. --- debian/openvswitch-switch.dirs | 1 + debian/openvswitch-switch.init | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/openvswitch-switch.dirs b/debian/openvswitch-switch.dirs index b4a528732..efa38e141 100644 --- a/debian/openvswitch-switch.dirs +++ b/debian/openvswitch-switch.dirs @@ -1,2 +1,3 @@ +/etc/openvswitch /etc/openvswitch-switch /usr/share/openvswitch/switch diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 871ac2d4f..935ea48e7 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -203,8 +203,6 @@ case "$1" in # Create an empty configuration database if it doesn't exist. if test ! -e /etc/openvswitch/conf.db; then - install -d -m 755 -o root -g root /etc/openvswitch - # Create configuration database. ovsdb-tool -vANY:console:emer \ create /etc/openvswitch/conf.db \ -- 2.43.0