diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2011-12-01 20:08:27 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2011-12-01 20:08:27 +0000 |
| commit | 7089446455fd710bd934dfe100d4b23a16477c83 (patch) | |
| tree | fb76c1274a7c4a34833a435fa29bcfa1446d63cc /net/openvswitch/files/ovsdb-server.in | |
| parent | - Move to binary distribution to support building applications. (diff) | |
Open vSwitch is a production quality, multilayer virtual switch licensed
under the open source Apache 2.0 license. It is designed to enable massive
network automation through programmatic extension, while still supporting
standard management interfaces and protocols (e.g. NetFlow, sFlow, RSPAN,
ERSPAN, CLI, LACP, 802.1ag). In addition, it is designed to support
distribution across multiple physical servers similar to VMware's vNetwork
distributed vswitch or Cisco's Nexus 1000V.
WWW: http://openvswitch.org/
Note that there is ongoing work to update this to more current version.
Feature safe: yes
Diffstat (limited to 'net/openvswitch/files/ovsdb-server.in')
| -rw-r--r-- | net/openvswitch/files/ovsdb-server.in | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net/openvswitch/files/ovsdb-server.in b/net/openvswitch/files/ovsdb-server.in new file mode 100644 index 000000000000..2701f85dbc77 --- /dev/null +++ b/net/openvswitch/files/ovsdb-server.in @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ovsdb_server +# REQUIRE: LOGIN + +. /etc/rc.subr + +name="ovsdb_server" +rcvar=${name}_enable + +command="%%PREFIX%%/sbin/ovsdb-server" +pidfile="%%PREFIX%%/var/run/ovsdb-server.pid" +start_precmd="ovsdb_server_precmd" + +load_rc_config $name + +: ${ovsdb_server_enable="NO"} +: ${ovsdb_server_sock="%%PREFIX%%/var/run/openvswitch/db.sock"} +: ${ovsdb_server_database="%%PREFIX%%/etc/openvswitch/conf.db"} + +ovsdb_server_precmd() { + [ -e "`dirname $ovsdb_server_database`" ] || \ + mkdir -p "`dirname $ovsdb_server_database`" + [ -e "$ovsdb_server_database" ] || \ + %%PREFIX%%/bin/ovsdb-tool create "$ovsdb_server_database" \ + %%PREFIX%%/share/openvswitch/vswitch.ovsschema +} + +command_args="--detach --pidfile=$pidfile \ + --remote=punix:$ovsdb_server_sock \ + --remote=db:Open_vSwitch,managers \ + --private-key=db:SSL,private_key \ + --certificate=db:SSL,certificate \ + --bootstrap-ca-cert=db:SSL,ca_cert \ + $ovsdb_server_database" + +run_rc_command "$1" |
