diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/openvswitch/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/openvswitch/files')
-rw-r--r-- | net-misc/openvswitch/files/openvswitch.tmpfiles | 1 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovs-vswitchd-r1 | 21 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovs-vswitchd.service | 15 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovs-vswitchd_conf | 6 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server-r1 | 34 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server.service | 14 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server_conf | 16 | ||||
-rw-r--r-- | net-misc/openvswitch/files/ovsdb-server_conf2 | 16 | ||||
-rw-r--r-- | net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch | 20 |
9 files changed, 143 insertions, 0 deletions
diff --git a/net-misc/openvswitch/files/openvswitch.tmpfiles b/net-misc/openvswitch/files/openvswitch.tmpfiles new file mode 100644 index 000000000000..58c583ee4747 --- /dev/null +++ b/net-misc/openvswitch/files/openvswitch.tmpfiles @@ -0,0 +1 @@ +d /var/run/openvswitch 0770 root root - diff --git a/net-misc/openvswitch/files/ovs-vswitchd-r1 b/net-misc/openvswitch/files/ovs-vswitchd-r1 new file mode 100644 index 000000000000..bc5602a60030 --- /dev/null +++ b/net-misc/openvswitch/files/ovs-vswitchd-r1 @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Open vSwitch virtual switch" + +command="/usr/sbin/ovs-vswitchd" +command_args=" + --pidfile + --detach + --monitor + ${OPTIONS} ${DATABASE}" +pidfile="/var/run/openvswitch/ovs-vswitchd.pid" + +depend() { + use ovsdb-server logger +} + +start_pre() { + checkpath -d "/var/run/openvswitch" -m 0750 +} diff --git a/net-misc/openvswitch/files/ovs-vswitchd.service b/net-misc/openvswitch/files/ovs-vswitchd.service new file mode 100644 index 000000000000..a573a503e14c --- /dev/null +++ b/net-misc/openvswitch/files/ovs-vswitchd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Open vSwitch Daemon +Documentation=man:ovs-vswitchd +Wants=network.target +Before=network.target +Requires=ovsdb-server.service +After=ovsdb-server.service + +[Service] +# --pidfile options is needed for create file used +# by ovs-appctl command. +ExecStart=/usr/sbin/ovs-vswitchd --mlockall --monitor unix:/var/run/openvswitch/db.sock --pidfile + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/openvswitch/files/ovs-vswitchd_conf b/net-misc/openvswitch/files/ovs-vswitchd_conf new file mode 100644 index 000000000000..c9eadb41862b --- /dev/null +++ b/net-misc/openvswitch/files/ovs-vswitchd_conf @@ -0,0 +1,6 @@ + +# Connection string for the configuration database (usually a unix socket) +DATABASE="unix:/var/run/openvswitch/db.sock" + +# Additional options +OPTIONS="--mlockall" diff --git a/net-misc/openvswitch/files/ovsdb-server-r1 b/net-misc/openvswitch/files/ovsdb-server-r1 new file mode 100644 index 000000000000..f7360adbb4c8 --- /dev/null +++ b/net-misc/openvswitch/files/ovsdb-server-r1 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Open vSwitch database server" + +remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"} +remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"} +private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"} +certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"} +bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"} + +command="/usr/sbin/ovsdb-server" +command_args=" + --pidfile + --detach + --monitor + ${remote_punix} + ${remote_db} + ${private_key} + ${certificate} + ${bootstrap_ca_cert} + ${DATABASE} + ${OPTIONS}" +pidfile="/var/run/openvswitch/ovsdb-server.pid" + +depend() { + need localmount + use logger +} + +start_pre() { + checkpath -d "/var/run/openvswitch" -m 0750 +} diff --git a/net-misc/openvswitch/files/ovsdb-server.service b/net-misc/openvswitch/files/ovsdb-server.service new file mode 100644 index 000000000000..9493c40755d8 --- /dev/null +++ b/net-misc/openvswitch/files/ovsdb-server.service @@ -0,0 +1,14 @@ +[Unit] +Description=Open vSwitch Database Server +Documentation=man:ovsdb-server + +[Service] +# The file can be shared for this as this values are prone to change +# and that way we don't need to update them in two different places +EnvironmentFile=/etc/conf.d/ovsdb-server +ExecStart=/usr/sbin/ovsdb-server --monitor \ + --remote=punix:${DB_SOCKET} \ + --remote=${REMOTE_DB} \ + --private-key=${PRIVATE_KEY} \ + --certificate=${CERTIFICATE} \ + --bootstrap-ca-cert=${BOOTSTRAP_CA_CERT} diff --git a/net-misc/openvswitch/files/ovsdb-server_conf b/net-misc/openvswitch/files/ovsdb-server_conf new file mode 100644 index 000000000000..1299b820640c --- /dev/null +++ b/net-misc/openvswitch/files/ovsdb-server_conf @@ -0,0 +1,16 @@ +# Socket for bringing the server up +DB_SOCKET="/var/run/openvswitch/db.sock" + +# Remote sockets are defined in the database by default +REMOTE_DB="db:Open_vSwitch,manager_options" + +# All certificates and keys are stored in the database (if any) +PRIVATE_KEY="db:SSL,private_key" +CERTIFICATE="db:SSL,certificate" +BOOTSTRAP_CA_CERT="db:SSL,ca_cert" + +# Alternative path for the database (default is /etc/openvswitch/conf.db) +# DATABASE="/etc/openvswitch/conf.db" + +# Additional options +# OPTIONS="" diff --git a/net-misc/openvswitch/files/ovsdb-server_conf2 b/net-misc/openvswitch/files/ovsdb-server_conf2 new file mode 100644 index 000000000000..97367b9717e7 --- /dev/null +++ b/net-misc/openvswitch/files/ovsdb-server_conf2 @@ -0,0 +1,16 @@ +# Socket for bringing the server up +DB_SOCKET="/var/run/openvswitch/db.sock" + +# Remote sockets are defined in the database by default +REMOTE_DB="db:Open_vSwitch,Open_vSwitch,manager_options" + +# All certificates and keys are stored in the database (if any) +PRIVATE_KEY="db:Open_vSwitch,SSL,private_key" +CERTIFICATE="db:Open_vSwitch,SSL,certificate" +BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert" + +# Alternative path for the database (default is /etc/openvswitch/conf.db) +# DATABASE="/etc/openvswitch/conf.db" + +# Additional options +# OPTIONS="" diff --git a/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch new file mode 100644 index 000000000000..e5f813b6755a --- /dev/null +++ b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch @@ -0,0 +1,20 @@ +Description: Use xcp-xapi interface-reconfigure if found + Ubuntu/Debian provide the XCP interface-reconfigure hook in + a FHS compliant location; use this if found. +Author: James Page <james.page@ubuntu.com> +Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053 +Forwarded: no + +--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update ++++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update +@@ -43,6 +43,10 @@ def delete_cacert(): + def update(session, args): + # Refresh bridge network UUIDs in case this host joined or left a pool. + script = '/opt/xensource/libexec/interface-reconfigure' ++ # NOTE(jamespage): Override with distro xcp xapi locations ++ # if present ++ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'): ++ script = '/usr/lib/xcp/lib/interface-reconfigure' + try: + retval = subprocess.call([script, 'rewrite']) + if retval != 0: |