# chkconfig: 2345 09 91
# description: Manage Open vSwitch kernel modules and user-space daemons
-# Copyright (C) 2009, 2010, 2011 Nicira, Inc.
+# Copyright (C) 2009, 2010, 2011, 2013 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# See the License for the specific language governing permissions and
# limitations under the License.
### BEGIN INIT INFO
-# Provides: openvswitch-switch
+# Provides: openvswitch
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Short-Description: Open vSwitch switch
### END INIT INFO
+SYSTEMCTL_SKIP_REDIRECT=yes
+
. /usr/share/openvswitch/scripts/ovs-lib || exit 1
test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch
set ovs_ctl ${1-start}
set "$@" --system-id=random
if test X"$FORCE_COREFILES" != X; then
- set "$@" --force-corefiles="$FORCE_COREFILES"
+ set "$@" --force-corefiles="$FORCE_COREFILES"
fi
if test X"$OVSDB_SERVER_PRIORITY" != X; then
- set "$@" --ovsdb-server-priority="$OVSDB_SERVER_PRIORITY"
+ set "$@" --ovsdb-server-priority="$OVSDB_SERVER_PRIORITY"
fi
if test X"$VSWITCHD_PRIORITY" != X; then
- set "$@" --ovs-vswitchd-priority="$VSWITCHD_PRIORITY"
+ set "$@" --ovs-vswitchd-priority="$VSWITCHD_PRIORITY"
fi
if test X"$VSWITCHD_MLOCKALL" != X; then
- set "$@" --mlockall="$VSWITCHD_MLOCKALL"
+ set "$@" --mlockall="$VSWITCHD_MLOCKALL"
fi
set "$@" $OVS_CTL_OPTS
"$@"
;;
status)
ovs_ctl status
+ exit $?
;;
version)
ovs_ctl version