- ovsdb-tool -vANY:console:emer \
- create /etc/openvswitch-switch/conf \
- /usr/share/openvswitch/vswitch-idl.ovsschema
+ ovsdb-tool -vANY:console:emer create $conf_file $schema_file
+ else
+ # If schema version changed, then back up the old version.
+ old_ver=`ovsdb-tool db-version "$conf_file"`
+ if test "X$old_ver" != "X$schema_ver"; then
+ cp "$conf_file" "$conf_file.backup$old_ver"
+ fi
+
+ # Upgrade or downgrade schema and compact database.
+ ovsdb-tool -vANY:console:emer convert $conf_file $schema_file
+ fi
+
+ if test "$ENABLE_MONITOR" = y; then
+ monitor_opt=--monitor
+ else
+ monitor_opt=
+ fi
+
+ if [ ! -d /var/run/openvswitch ]; then
+ install -d -m 755 -o root -g root /var/run/openvswitch
+ fi
+
+ if [ ! -d /var/log/openvswitch ]; then
+ install -d -m 755 -o root -g root /var/log/openvswitch
+ fi
+
+ if [ ! -d /var/log/openvswitch/cores ]; then
+ install -d -m 755 -o root -g root /var/log/openvswitch/cores