debian: Ensure that /var/run/openvswitch exists in controller init script.
[openvswitch] / debian / openvswitch-controller.init
index 4781f83f2148c747ed5c50f25931ec1165875100..1638f149527c6fea23f38f4e03c24729fd141dab 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*)