ia64/xen-unstable

view tools/hotplug/Linux/network-route @ 19497:2f6ed9318c03

network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}

On RHEL5.2, ifup ${bridge} fails if ${bridge} != ${netdev},
because RHEL5.2's ifup ${bridge} runs the following sequence:

1. Search CONFIG that has the same mac address of ${bridge}.=20
ifcfg-${netdev} is found.
2. Run "ip link set dev ${netdev} up".
# ${bridge} is expected.
3. Output "Failed to bring up ${netdev}."
Because ${netdev} does not exist.

Thus, do_ifup() should not use ifup if ${bridge} != ${netdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 02 11:48:10 2009 +0100 (2009-04-02)
parents 4bfc67b09e9c
children 415505139333
line source
1 #!/bin/bash
2 #============================================================================
3 # Default Xen network start/stop script.
4 # Xend calls a network script when it starts.
5 # The script name to use is defined in /etc/xen/xend-config.sxp
6 # in the network-script field.
7 #
8 # Usage:
9 #
10 # network-route (start|stop|status) {VAR=VAL}*
11 #
12 # Vars:
13 #
14 # netdev The gateway interface (default eth0).
15 # antispoof Whether to use iptables to prevent spoofing (default yes).
16 #
17 #============================================================================
19 dir=$(dirname "$0")
20 . "$dir/xen-script-common.sh"
22 evalVariables "$@"
24 netdev=${netdev:-eth${vifnum}}
26 echo 1 >/proc/sys/net/ipv4/ip_forward
27 echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp