X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenvswitch-controller.init;h=b073ddef07c8265ca0ff45864c98b86aac3374f9;hb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;hp=d489869edc6fd8cce5c3d3f93e31ddc9ce0f7c0b;hpb=366d78fd926e3d7f2b78ec8cf63dbab72fa9c8b7;p=sliver-openvswitch.git diff --git a/debian/openvswitch-controller.init b/debian/openvswitch-controller.init index d489869ed..b073ddef0 100755 --- a/debian/openvswitch-controller.init +++ b/debian/openvswitch-controller.init @@ -1,5 +1,6 @@ #!/bin/sh # +# Copyright (c) 2011 Nicira, Inc. # Copyright (c) 2007, 2009 Javier Fernandez-Sanguino # # This is free software; you may redistribute it and/or modify @@ -26,11 +27,13 @@ # 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*) @@ -175,10 +182,10 @@ force_stop() { if running ; then kill -15 $pid # Is it really dead? - sleep "$DIETIME"s + sleep "$DODTIME" if running ; then kill -9 $pid - sleep "$DIETIME"s + sleep "$DODTIME" if running ; then echo "Cannot kill $NAME (pid=$pid)!" exit 1 @@ -237,7 +244,7 @@ case "$1" in log_daemon_msg "Restarting $DESC" "$NAME" stop_server # Wait some sensible amount, some server need this - [ -n "$DIETIME" ] && sleep $DIETIME + [ -n "$DODTIME" ] && sleep $DODTIME start_server running log_end_msg $?