Open vSwitch bridges and ports can be configured through the /etc/network/interfaces script. During system startup, Open vSwitch startup script reads the interfaces file and creates the bridges and ports. During system shutdown, the bridges and ports are removed.
The same behavior also can occur with a manual 'restart' of Open vswitch (ex: service openvswitch-switch restart). This behavior has come across as undesirable in some cases. ex: When some one manually creates interfaces through ovs-vsctl and then restarts Open vSwitch, that interface is lost. This commit changes the startup script such that, interfaces are created and deleted through the startup script only when RUNLEVEL environment variable is set. This behavior will be consistent with the OVS RHEL ifcfg-* scripts too. Signed-off-by: Gurucharan Shetty <gshe...@nicira.com> --- debian/openvswitch-switch.init | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 84aa450..481b29c 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -31,6 +31,7 @@ test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch network_interfaces () { + [ -z "${RUNLEVEL}" ] && return INTERFACES="/etc/network/interfaces" [ -e "${INTERFACES}" ] || return bridges=`awk '{ if ($1 == "allow-ovs") { print $2; } }' "${INTERFACES}"` -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev