debian: Upgrade database before starting ovsdb-server.
authorBen Pfaff <blp@nicira.com>
Wed, 17 Mar 2010 18:02:41 +0000 (11:02 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 17 Mar 2010 18:02:41 +0000 (11:02 -0700)
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.

debian/openvswitch-switch.init

index 3a7f292..7ce9a64 100755 (executable)
@@ -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