#!/bin/sh
exec 2>&1
if [ ! -f /etc/openvswitch/conf.db ]; then
    install -d /etc/openvswitch
    ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema || exit 1
fi
install -d /run/openvswitch
exec ovsdb-server --remote=punix:/run/openvswitch/db.sock
