-: ${ENABLE_MONITOR:=y}
-: ${FORCE_COREFILES:=y}
-
-# Config variables specific to ovsdb-server
-: ${OVSDB_SERVER_REMOTES:=punix:/var/run/openvswitch/db.sock db:Open_vSwitch,manager_options}
-: ${OVSDB_SERVER_DB:=/etc/openvswitch/conf.db}
-: ${OVSDB_SERVER_PIDFILE:=/var/run/openvswitch/ovsdb-server.pid}
-: ${OVSDB_SERVER_RUN_DIR:=/var/xen/openvswitch}
-: ${OVSDB_SERVER_PRIORITY:=-10}
-: ${OVSDB_SERVER_LOGFILE:=/var/log/openvswitch/ovsdb-server.log}
-: ${OVSDB_SERVER_FILE_LOGLEVEL:=INFO}
-: ${OVSDB_SERVER_SYSLOG_LOGLEVEL:=ERR}
-: ${OVSDB_SERVER_MEMLEAK_LOGFILE:=}
-: ${OVSDB_SERVER_STRACE_LOG:=}
-: ${OVSDB_SERVER_STRACE_OPT:=}
-: ${OVSDB_SERVER_VALGRIND_LOG:=}
-: ${OVSDB_SERVER_VALGRIND_OPT:=}
-
-# Config variables specific to ovs-vswitchd
-: ${VSWITCHD_OVSDB_SERVER:=unix:/var/run/openvswitch/db.sock}
-: ${VSWITCHD_OVSDB_SCHEMA:=/usr/share/openvswitch/vswitch.ovsschema}
-: ${VSWITCHD_PIDFILE:=/var/run/openvswitch/ovs-vswitchd.pid}
-: ${VSWITCHD_RUN_DIR:=/var/xen/openvswitch}
-: ${VSWITCHD_PRIORITY:=-10}
-: ${VSWITCHD_MLOCKALL:=yes}
-: ${VSWITCHD_LOGFILE:=/var/log/openvswitch/ovs-vswitchd.log}
-: ${VSWITCHD_FILE_LOGLEVEL:=INFO}
-: ${VSWITCHD_SYSLOG_LOGLEVEL:=ERR}
-: ${VSWITCHD_MEMLEAK_LOGFILE:=}
-: ${VSWITCHD_STRACE_LOG:=}
-: ${VSWITCHD_STRACE_OPT:=}
-: ${VSWITCHD_VALGRIND_LOG:=}
-: ${VSWITCHD_VALGRIND_OPT:=}
-
-: ${OVS_XAPI_SYNC_PIDFILE:=/var/run/openvswitch/ovs-xapi-sync.pid}
-
-# Full paths to executables & modules
-ovsdb_server="/usr/sbin/ovsdb-server"
-ovsdb_tool="/usr/bin/ovsdb-tool"
-vswitchd="/usr/sbin/ovs-vswitchd"
-dpctl="/usr/bin/ovs-dpctl"
-appctl="/usr/bin/ovs-appctl"
-ofctl="/usr/bin/ovs-ofctl"
-vsctl="/usr/bin/ovs-vsctl"
-
-if test "$ENABLE_MONITOR" = "y"; then
- monitor_opt="--monitor"
-else
- monitor_opt=
-fi
-
-function hup_monitor_external_ids {
- if [ -e "$OVS_XAPI_SYNC_PIDFILE" ]; then
- action "Configuring Open vSwitch external IDs" kill -HUP `cat "$OVS_XAPI_SYNC_PIDFILE"`
- fi
-}
-
-function turn_on_corefiles {
- ulimit -Sc 67108864
-}
-
-function remove_all_dp {
- for dp in $($dpctl dump-dps); do
- action "Removing datapath: $dp" "$dpctl" del-dp "$dp"
- done
-}
-
-function insert_modules_if_required {
- if test -e /sys/module/bridge; then
- bridges=`echo /sys/class/net/*/bridge | sed 's,/sys/class/net/,,g;s,/bridge,,g'`
- if test "$bridges" != "*"; then
- log_warning_msg "not removing bridge module because bridges exist ($bridges)"
- else
- action "removing bridge module" rmmod bridge
- fi
- fi
- if ! lsmod | grep -q "openvswitch_mod"; then
- action "Inserting llc module" modprobe llc
- action "Inserting openvswitch module" modprobe openvswitch_mod
- fi
-}
-
-function remove_modules {
- if lsmod | grep -q "openvswitch_mod"; then
- action "Removing openvswitch module" rmmod openvswitch_mod.ko