X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=rhel%2Fetc_init.d_openvswitch;h=af332c0b577967893600d9d6b202c02d145195e0;hb=dee54b830c3d43facf96c129b04265f31f503200;hp=5501d188156b2f61ce5559f99581567758438480;hpb=438540b315fd4399316fa6e8448898a8ed9ecefb;p=openvswitch diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch index 5501d188..af332c0b 100755 --- a/rhel/etc_init.d_openvswitch +++ b/rhel/etc_init.d_openvswitch @@ -5,7 +5,7 @@ # chkconfig: 2345 09 91 # description: Manage Open vSwitch kernel modules and user-space daemons -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ # Short-Description: Open vSwitch switch ### END INIT INFO -. /usr/share/openvswitch/scripts/ovs-lib.sh || exit 1 +. /usr/share/openvswitch/scripts/ovs-lib || exit 1 test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch start () { @@ -45,6 +45,10 @@ start () { if test X"$VSWITCHD_MLOCKALL" != X; then set "$@" --mlockall="$VSWITCHD_MLOCKALL" fi + if test X"$BRCOMPAT" = Xyes; then + set "$@" --brcompat + fi + set "$@" $OVS_CTL_OPTS "$@" $ovs_ctl --protocol=gre enable-protocol @@ -57,6 +61,15 @@ stop () { rm -f /var/lock/subsys/openvswitch } +restart () { + if [ "$1" = "--save-flows=yes" ]; then + start restart + else + stop + start + fi +} + ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl case $1 in start) @@ -66,8 +79,8 @@ case $1 in stop ;; restart) - stop - start + shift + restart "$@" ;; reload|force-reload) # Nothing to do.