summaryrefslogtreecommitdiffstats
path: root/testing/openvswitch/openvswitch.post-install
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2014-03-12 17:36:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-03-12 19:04:10 +0000
commit041c19eeea7ac2bb445b2afbfd7fe76e8a724636 (patch)
tree2d33c257bda355667eb2a89694129e0fa64827c7 /testing/openvswitch/openvswitch.post-install
parent8a3de1b323c64b7a2a6fbd6c4e672701659a5805 (diff)
downloadaports-041c19eeea7ac2bb445b2afbfd7fe76e8a724636.tar.bz2
aports-041c19eeea7ac2bb445b2afbfd7fe76e8a724636.tar.xz
/testing/openvswitch - version bump to 2.01 + revised init scripts
** 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.
Diffstat (limited to 'testing/openvswitch/openvswitch.post-install')
-rw-r--r--testing/openvswitch/openvswitch.post-install26
1 files changed, 22 insertions, 4 deletions
diff --git a/testing/openvswitch/openvswitch.post-install b/testing/openvswitch/openvswitch.post-install
index 2c3ea6937..6dc42a2f0 100644
--- a/testing/openvswitch/openvswitch.post-install
+++ b/testing/openvswitch/openvswitch.post-install
@@ -1,11 +1,29 @@
#!/bin/sh
+NORMAL="\033[1;0m"
+STRONG="\033[1;1m"
+RED="\033[1;31m"
+GREEN="\033[1;32m"
+
+print_red() {
+ local prompt="${RED}${STRONG}$1 ${NORMAL}"
+ printf "${prompt} %s\n"
+}
+
+print_green() {
+ local prompt="${GREEN}${STRONG}$1 ${NORMAL}"
+ printf "${prompt} %s\n"
+}
+
db="/etc/openvswitch/conf.db"
if [ -e "$db" ]; then
- echo "Trying schema migration for $db..."
- ovsdb-tool convert "$db" "/usr/share/openvswitch/vswitch.ovsschema"
+ print_red "\nStopping OVS Database\n"; rc-service ovsdb-server stop
+ print_green "\nTrying schema migration for $db..."
+ ovsdb-tool convert "$db" "/usr/share/openvswitch/vswitch.ovsschema"
+ print_green "\nStarting OVS Database\n"; rc-service ovsdb-server start
else
- echo "Creating new Open vSwitch database $db..."
- ovsdb-tool create "$db" "/usr/share/openvswitch/vswitch.ovsschema"
+ print_green "\nCreating new Open vSwitch database $db...\n"
+ ovsdb-tool create "$db" "/usr/share/openvswitch/vswitch.ovsschema"
fi
+