summaryrefslogtreecommitdiff
path: root/debian/openvswitch-switch.init
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-03-17 11:02:41 -0700
committerBen Pfaff <blp@nicira.com>2010-03-17 11:02:41 -0700
commitf479c2f42b01cbb6fb0a60448f314021b1c3c9df (patch)
treef011eb5132d018327864e3acbf6306e2e0601a7c /debian/openvswitch-switch.init
parentd3f82921586b4018b45fdd1cbfa5c94fc37d362c (diff)
downloadopenvswitch-f479c2f42b01cbb6fb0a60448f314021b1c3c9df.tar.gz
debian: Upgrade database before starting ovsdb-server.
The XenServer init script has been upgrading the database before starting ovsdb-server for some time now, but the corresponding change was never made to the Debian init script. This commit fixes that.
Diffstat (limited to 'debian/openvswitch-switch.init')
-rwxr-xr-xdebian/openvswitch-switch.init5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index 3a7f29244..7ce9a6450 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -210,6 +210,11 @@ case "$1" in
ovsdb-tool -vANY:console:emer \
create /etc/openvswitch-switch/conf \
/usr/share/openvswitch/vswitch.ovsschema
+ else
+ # Upgrade or downgrade schema and compact database.
+ ovsdb-tool -vANY:console:emer \
+ convert /etc/openvswitch-switch/conf \
+ /usr/share/openvswitch/vswitch.ovsschema
fi
if test "$ENABLE_MONITOR" = y; then