mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
** This is a clean patch against Master ** Version bump to 2.0.1 Init scripts improved to start ovsdb-server & ovs-vswitchd before networking comes up. ovs-dbserver is now a hard dependency for ovs-vswitchd to keep them in sync & prevent a hanging boot process. LXC Guests now autostart correctly on reboots. MACVLAN interfaces work out of the box with LXC. To use VETH interfaces with LXC do *NOT* set 'lxc.network.link' in /var/lib/lxc/guest/config - the VETH must be added manually with: ovs-vsctl --may-exist add-br $BRIDGE ovs-vsctl --may-exist add-port $BRIDGE $PORT I removed ovs-controller as it's not needed to run openvswitch & is no longer part of the current git. ovs-monitor will be removed from a default installation in the next release as it is poorly maintained & nobody really uses it. I've tested openvswitch 2.0.1 & have it bridging VETH across NAT & bridging MACVLAN interfaces internally without any problems. Bonding should also work.
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
#!/sbin/runscript
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovsdb-server-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $
|
|
|
|
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 ovsdb-server
|
|
after bootmisc hwdrivers modules
|
|
before net
|
|
use logger
|
|
}
|
|
|
|
# ovsdb-server is a hard dependency for ovs-vswitchd (to keep them in sync) - to stop the db only:
|
|
# /etc/init.d/ovsdb-server --nodeps stop |or| rc-service ovsdb-server -- --nodeps stop
|
|
|
|
start_pre() {
|
|
checkpath -d "/var/run/openvswitch" -m 0750
|
|
}
|