diff options
author | Justin Pettit <jpettit@nicira.com> | 2010-01-11 15:20:44 -0800 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2010-01-11 16:11:08 -0800 |
commit | 6b739e5403d718f0798886ab8f86ae5c4118fc05 (patch) | |
tree | 85059cbfe640bb3b52d25fae86578e6af3fe7bcd /debian/openvswitch-switch.init | |
parent | 2c30e5d117bd45afaf0a107509b2c92b9a797380 (diff) |
debian: Create the config database if it doesn't exist on startup
On startup, create an empty config database if it doesn't already exist. This
is the behavior of the XenServer init scripts.
Diffstat (limited to 'debian/openvswitch-switch.init')
-rwxr-xr-x | debian/openvswitch-switch.init | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index de8f295d..bb2cb1bf 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -201,6 +201,14 @@ case "$1" in 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 @@ -218,6 +226,8 @@ case "$1" in echo " ERROR." fi + ovs-vsctl --no-wait init + # Start ovs-vswitchd. set -- set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err |