aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openvswitch/openvswitch.post-install
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openvswitch/openvswitch.post-install')
-rw-r--r--testing/openvswitch/openvswitch.post-install11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/openvswitch/openvswitch.post-install b/testing/openvswitch/openvswitch.post-install
new file mode 100644
index 00000000000..2c3ea69370c
--- /dev/null
+++ b/testing/openvswitch/openvswitch.post-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+db="/etc/openvswitch/conf.db"
+if [ -e "$db" ]; then
+ echo "Trying schema migration for $db..."
+ ovsdb-tool convert "$db" "/usr/share/openvswitch/vswitch.ovsschema"
+else
+ echo "Creating new Open vSwitch database $db..."
+ ovsdb-tool create "$db" "/usr/share/openvswitch/vswitch.ovsschema"
+fi
+