debian: Ensure that /var/run/openvswitch exists in controller init script.
authorBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 17:58:38 +0000 (10:58 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 17:59:07 +0000 (10:59 -0700)
It would be better to use ovs-ctl from this script, but until now this is
an adequate solution.

Reported-by: Jibesh Patra
Bug-report: https://bugs.launchpad.net/bugs/822142

debian/openvswitch-controller.init

index 4781f83..1638f14 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 #
+# Copyright (c) 2011 Nicira Networks Inc.
 # Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <jfs@debian.org>
 #
 # This is free software; you may redistribute it and/or modify
@@ -105,6 +106,10 @@ start_server() {
         exit 0
     fi
 
+    if [ ! -d /var/run/openvswitch ]; then
+        install -d -m 755 -o root -g root /var/run/openvswitch
+    fi
+
     SSL_OPTS=
     case $LISTEN in
         *ssl*)