#! /bin/sh
-# Copyright (c) 2012 Nicira, Inc.
+# Copyright (c) 2012, 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.
exit 0
fi
+if /etc/init.d/openvswitch-switch status > /dev/null 2>&1; then :; else
+ /etc/init.d/openvswitch-switch start
+fi
+
if [ "${MODE}" = "start" ]; then
eval OVS_EXTRA=\"${IF_OVS_EXTRA}\"
ifconfig "${slave}" up
done
;;
+ OVSPatchPort)
+ ovs_vsctl -- --may-exist add-port "${IF_OVS_BRIDGE}"\
+ "${IFACE}" ${IF_OVS_OPTIONS} -- set Interface "${IFACE}" \
+ type=patch options:peer="${IF_OVS_PATCH_PEER}" \
+ ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSTunnel)
+ ovs_vsctl -- --may-exist add-port "${IF_OVS_BRIDGE}"\
+ "${IFACE}" ${IF_OVS_OPTIONS} -- set Interface "${IFACE}" \
+ type=${IF_OVS_TUNNEL_TYPE} ${IF_OVS_TUNNEL_OPTIONS} \
+ ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
*)
exit 0
;;
ovs_vsctl -- --if-exists del-br "${IFACE}"
;;
- OVSPort|OVSIntPort|OVSBond)
+ OVSPort|OVSIntPort|OVSBond|OVSPatchPort|OVSTunnel)
ovs_vsctl -- --if-exists del-port "${IF_OVS_BRIDGE}" "${IFACE}"
;;
*)