ia64/xen-unstable

view tools/hotplug/Linux/xen-backend.agent @ 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
line source
1 #! /bin/bash
3 PATH=/etc/xen/scripts:$PATH
5 . /etc/xen/scripts/locking.sh
7 claim_lock xenbus_hotplug_global
9 case "$XENBUS_TYPE" in
10 tap)
11 /etc/xen/scripts/blktap "$ACTION"
12 ;;
13 vbd)
14 /etc/xen/scripts/block "$ACTION"
15 ;;
16 vtpm)
17 /etc/xen/scripts/vtpm "$ACTION"
18 ;;
19 vif)
20 [ -n "$script" ] && $script "$ACTION"
21 ;;
22 vscsi)
23 /etc/xen/scripts/vscsi "$ACTION"
24 ;;
25 esac
27 case "$ACTION" in
28 add)
29 ;;
30 remove)
31 /etc/xen/scripts/xen-hotplug-cleanup
32 ;;
33 online)
34 ;;
35 offline)
36 ;;
37 esac
39 release_lock xenbus_hotplug_global