- # Create initial database or upgrade database schema.
- upgrade_db || return 1
-
- # Start ovsdb-server.
- set ovsdb-server "$DB_FILE"
- set "$@" -vANY:CONSOLE:EMER -vANY:SYSLOG:ERR -vANY:FILE:INFO
- set "$@" --remote=punix:"$DB_SOCK"
- set "$@" --remote=db:Open_vSwitch,manager_options
- set "$@" --private-key=db:SSL,private_key
- set "$@" --certificate=db:SSL,certificate
- set "$@" --bootstrap-ca-cert=db:SSL,ca_cert
- start_daemon "$OVSDB_SERVER_PRIORITY" "$@" || return 1
-
- # Initialize database settings.
- ovs_vsctl -- init -- set Open_vSwitch . db-version="$schemaver" \
- || return 1
- set_system_ids || return 1
- if test X"$DELETE_BRIDGES" = Xyes; then
+ # Create initial database or upgrade database schema.
+ upgrade_db || return 1
+
+ # Start ovsdb-server.
+ set ovsdb-server "$DB_FILE"
+ for db in $EXTRA_DBS; do
+ case $db in
+ /*) ;;
+ *) db=$dbdir/$db ;;
+ esac
+
+ if test ! -f "$db"; then
+ log_warning_msg "$db (from \$EXTRA_DBS) does not exist."
+ elif ovsdb-tool db-version "$db" >/dev/null; then
+ set "$@" "$db"
+ else
+ log_warning_msg "$db (from \$EXTRA_DBS) cannot be read as a database (see error message above)"
+ fi
+ done
+ set "$@" -vconsole:emer -vsyslog:err -vfile:info
+ set "$@" --remote=punix:"$DB_SOCK"
+ set "$@" --private-key=db:Open_vSwitch,SSL,private_key
+ set "$@" --certificate=db:Open_vSwitch,SSL,certificate
+ set "$@" --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
+ start_daemon "$OVSDB_SERVER_PRIORITY" "$OVSDB_SERVER_WRAPPER" "$@" \
+ || return 1
+
+ # Initialize database settings.
+ ovs_vsctl -- init -- set Open_vSwitch . db-version="$schemaver" \
+ || return 1
+ set_system_ids || return 1
+ if test X"$DELETE_BRIDGES" = Xyes; then