# XenServer 5.5.0 needs ovs-brcompatd and /proc/net simulation.
: ${ENABLE_BRCOMPAT:=y}
: ${ENABLE_FAKE_PROC_NET:=y}
- : ${ENABLE_XENSERVERD:=y}
else
# Later versions don't need them.
: ${ENABLE_BRCOMPAT:=n}
: ${ENABLE_FAKE_PROC_NET:=n}
- : ${ENABLE_XENSERVERD:=n}
fi
: ${ENABLE_MONITOR:=y}
: ${FORCE_COREFILES:=y}
: ${BRCOMPATD_VALGRIND_LOG:=}
: ${BRCOMPATD_VALGRIND_OPT:=}
-# Config variables specific to ovs-xenserverd
-: ${XENSERVERD_PIDFILE:=/var/run/openvswitch/ovs-xenserverd.pid}
-: ${XENSERVERD_RUN_DIR:=/var/xen/openvswitch}
-: ${XENSERVERD_PRIORITY:=}
-: ${XENSERVERD_LOGFILE:=}
-: ${XENSERVERD_FILE_LOGLEVEL:=}
-: ${XENSERVERD_SYSLOG_LOGLEVEL:=}
-: ${XENSERVERD_MEMLEAK_LOGFILE:=}
-: ${XENSERVERD_STRACE_LOG:=}
-: ${XENSERVERD_STRACE_OPT:=}
-: ${XENSERVERD_VALGRIND_LOG:=}
-: ${XENSERVERD_VALGRIND_OPT:=}
-
# Full paths to executables & modules
ovsdb_server="/usr/sbin/ovsdb-server"
ovsdb_tool="/usr/bin/ovsdb-tool"
vswitchd="/usr/sbin/ovs-vswitchd"
brcompatd="/usr/sbin/ovs-brcompatd"
-xenserverd="/usr/sbin/ovs-xenserverd"
dpctl="/usr/bin/ovs-dpctl"
appctl="/usr/bin/ovs-appctl"
ofctl="/usr/bin/ovs-ofctl"
"$VSWITCHD_OVSDB_SERVER"
}
-function start_xenserverd {
- start_daemon XENSERVERD "$xenserverd"
-}
-
function stop_daemon {
local DAEMON=$1
local BINARY=$2
if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
start_brcompatd
fi
- if [ "${ENABLE_XENSERVERD}" = "y" ] ; then
- start_xenserverd
- fi
touch /var/lock/subsys/openvswitch
}
function stop {
- stop_daemon XENSERVERD "$xenserverd"
stop_daemon BRCOMPATD "$brcompatd"
stop_daemon VSWITCHD "$vswitchd"
stop_daemon OVSDB_SERVER "$ovsdb_server"
status -p "$OVSDB_SERVER_PIDFILE" ovsdb-server &&
status -p "$VSWITCHD_PIDFILE" ovs-vswitchd &&
(test "$ENABLE_BRCOMPAT" != "y" ||
- status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd) &&
- (test "$ENABLE_XENSERVERD" != "y" ||
- status -p "$XENSERVERD_PIDFILE" ovs-xenserverd)
+ status -p "$BRCOMPATD_PIDFILE" ovs-brcompatd)
;;
version)
/usr/sbin/ovsdb-server -V
/usr/sbin/ovs-vswitchd -V
/usr/sbin/ovs-brcompatd -V
- /usr/sbin/ovs-xenserverd -V
;;
help)
printf "openvswitch [start|stop|restart|unload|status|version]\n"
# and not required and not enabled by default for later versions.
# ENABLE_FAKE_PROC_NET=?
-# ENABLE_XENSERVERD: If 'y' then monitor system for changes in pool membership
-# This is required and enabled by default for XenServer 5.5.0,
-# and not required and not enabled by default for later versions.
-# ENABLE_XENSERVERD=?
-
# ENABLE_MONITOR: If 'y' then monitor daemon processes and restart them
# if they die due to an error signal.
# ENABLE_MONITOR=y
# This option's value is honored only when BRCOMPATD_VALGRIND_LOG is
# set to a nonempty string.
# BRCOMPATD_VALGRIND_OPT=""
-
-# XENSERVERD_PIDFILE: File in which to store the pid of the running
-# ovs-xenserved.
-# XENSERVERD_PIDFILE=/var/run/openvswitch/ovs-xenserverd.pid
-
-# XENSERVERD_RUN_DIR: Set the directory in which ovs-xenserverd should be
-# run. This mainly affects where core files will be placed.
-# XENSERVERD_RUN_DIR=/var/xen/openvswitch