utilites: rename ovs-lib.sh to ovs-lib
[sliver-openvswitch.git] / rhel / etc_init.d_openvswitch
index c7543cc..9f1506c 100755 (executable)
 # 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 () {
-    # Allow GRE traffic.
-    /sbin/iptables -I INPUT -p gre -j ACCEPT
-
     set $ovs_ctl ${1-start}
     set "$@" --system-id=random
     if test X"$FORCE_COREFILES" != X; then
@@ -48,12 +45,13 @@ start () {
     if test X"$VSWITCHD_MLOCKALL" != X; then
        set "$@" --mlockall="$VSWITCHD_MLOCKALL"
     fi
-    if test ! -e /var/run/openvswitch.booted; then
-        touch /var/run/openvswitch.booted
-        set "$@" --delete-bridges
+    if test X"$BRCOMPAT" = Xyes; then
+       set "$@" --brcompat
     fi
     "$@"
 
+    $ovs_ctl --protocol=gre enable-protocol
+
     touch /var/lock/subsys/openvswitch
 }