[ovs-dev] [suse 5/7] xenserver: Don't require /etc/xensource/network.conf if not on XenServer.
Justin Pettit
jpettit at nicira.com
Tue Dec 28 19:09:40 UTC 2010
Looks good.
--Justin
On Dec 15, 2010, at 11:19 AM, Ben Pfaff wrote:
> From: Patrick Mullaney <pm.mullaney at gmail.com>
>
> On XenServer systems, the "network mode" (that is, whether the network
> uses OpenvSwitch or the Linux bridge) is stored in
> /etc/xensource/network.conf. On other systems, we can't expect it to be
> there. This changes the init script to tolerate its absence, treating that
> as meaning that Open vSwitch should be used (otherwise, why did the admin
> install it?).
>
> NETWORK_MODE can always be overridden in /etc/sysconfig/openvswitch anyway.
>
> Signed-off-by: Patrick Mullaney <pm.mullaney at gmail.com>
> [changed back to read /etc/xensource/network.conf if present]
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> xenserver/etc_init.d_openvswitch | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
> index e4f9964..72d7d57 100755
> --- a/xenserver/etc_init.d_openvswitch
> +++ b/xenserver/etc_init.d_openvswitch
> @@ -57,11 +57,13 @@ else
> }
> fi
>
> -. /etc/xensource-inventory
> +test -e /etc/xensource-inventory && . /etc/xensource-inventory
> test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch
> +if test -e /etc/xensource/network.conf; then
> + NETWORK_MODE=$(cat /etc/xensource/network.conf)
> +fi
>
> -NETWORK_MODE=$(cat /etc/xensource/network.conf)
> -case $NETWORK_MODE in
> +case ${NETWORK_MODE:=openvswitch} in
> vswitch|openvswitch)
> ;;
> bridge)
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list