From: Sajjad Lateef Date: Fri, 15 Oct 2010 20:41:46 +0000 (-0700) Subject: Create /etc/openvswitch dir when package is installed. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f906046c22bd9a55bd1185b2c03d27894b7a425;p=openvswitch 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. --- diff --git a/debian/openvswitch-switch.dirs b/debian/openvswitch-switch.dirs index b4a52873..efa38e14 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 871ac2d4..935ea48e 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 \