Merge branch 'mainstream'
[sliver-openvswitch.git] / debian / openvswitch-controller.init
index 4781f83..b073dde 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 #
+# Copyright (c) 2011 Nicira, Inc.
 # Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <jfs@debian.org>
 #
 # This is free software; you may redistribute it and/or modify
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: Open vSwitch controller
+# Description:       The Open vSwitch controller enables OpenFlow switches that connect to it
+#                    to act as MAC-learning Ethernet switches.
 ### END INIT INFO
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
-DAEMON=/usr/sbin/ovs-controller # Introduce the server's location here
+DAEMON=/usr/bin/ovs-controller # Introduce the server's location here
 NAME=ovs-controller         # Introduce the short server's name here
 DESC=ovs-controller         # Introduce a short description here
 LOGDIR=/var/log/openvswitch # Log directory to use
@@ -105,6 +108,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*)