Files
openlan/dist/script/ovsdb-server.sh
2023-04-04 17:10:10 +08:00

16 lines
450 B
Bash
Executable File

#!/bin/bash
set -ex
if [ ! -f "/etc/openvswitch/conf.db" ]; then
ovsdb-tool create /etc/openvswitch/conf.db
elif ovsdb-tool needs-conversion /etc/openvswitch/conf.db | grep -s -w yes; then
ovsdb-tool convert /etc/openvswitch/conf.db
fi
/usr/sbin/ovsdb-server /etc/openvswitch/conf.db \
-vconsole:info -vsyslog:off -vfile:off \
--remote=punix:/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--pidfile