On startup, create an empty config database if it doesn't already exist. This
is the behavior of the XenServer init scripts.
check_op "Setting core limit to $CORE_LIMIT" ulimit -c "$CORE_LIMIT"
fi
+ # Create an empty configuration database if it doesn't exist.
+ if test ! -e /etc/openvswitch-switch/conf; then
+ # Create configuration database.
+ ovsdb-tool -vANY:console:emer \
+ create /etc/openvswitch-switch/conf \
+ /usr/share/openvswitch/vswitch-idl.ovsschema
+ fi
+
# Start ovsdb-server.
set --
set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err
echo " ERROR."
fi
+ ovs-vsctl --no-wait init
+
# Start ovs-vswitchd.
set --
set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err
running=false
fi
- if test ! -e /etc/openvswitch-switch/conf; then
- # Create configuration database.
- ovsdb-tool -vANY:console:emer \
- create /etc/openvswitch-switch/conf \
- /usr/share/openvswitch/vswitch-idl.ovsschema
-
- # Initialize configuration database.
- ovsdb-tool -vANY:console:emer \
- transact /etc/openvswitch-switch/conf \
- '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \
- > /dev/null
- fi
-
if $running; then
/etc/init.d/openvswitch-switch start
fi