Skip to content

Commit

Permalink
xenserver: Don't openvswitch-xapi-update in bridge mode.
Browse files Browse the repository at this point in the history
This commit causes the init scripts not to call the
openvswitch-cfg-update plugin when in bridge mode.
  • Loading branch information
ejj authored and blp committed Apr 29, 2011
1 parent 280c6e9 commit 0725fe8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions xenserver/etc_init.d_openvswitch-xapi-update
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ function start {
printf "openvswitch-xapi-update ERROR: XenSource inventory not present in /etc/xensource-inventory\n"
exit 1
fi

if test -e /etc/xensource/network.conf; then
NETWORK_MODE=$(cat /etc/xensource/network.conf)
fi

case ${NETWORK_MODE:=openvswitch} in
vswitch|openvswitch)
;;
bridge)
exit 0
;;
*)
echo "Open vSwitch disabled (/etc/xensource/network.conf is invalid)" >&2
exit 0
;;
esac

source /etc/xensource-inventory
action "Updating configuration" do_host_call
}
Expand Down

0 comments on commit 0725fe8

Please sign in to comment.