ia64/xen-unstable

changeset 8064:701ec436d5ad

Only write a success node when coming online, not going offline. Delete the
interface from the bridge when going offline -- the comment stating that
interfaces are auto-removed does not seem to be true, at least some of the
time. Log failure of brctl delif and ifconfig down only at debug level, as
this script may be called more than once, depending upon the hotplug
configuration.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Fri Nov 25 17:12:12 2005 +0000 (2005-11-25)
parents 801c6363501b
children 8c3ed250366c
files tools/examples/vif-bridge
line diff
     1.1 --- a/tools/examples/vif-bridge	Fri Nov 25 17:09:49 2005 +0000
     1.2 +++ b/tools/examples/vif-bridge	Fri Nov 25 17:12:12 2005 +0000
     1.3 @@ -61,12 +61,16 @@ case "$command" in
     1.4          ;;
     1.5  
     1.6      offline)
     1.7 -        # vifs are auto-removed from bridge.
     1.8 -        ifconfig "$vif" down || log err "ifconfig $vif down failed"
     1.9 +        brctl delif "$bridge" "$vif" ||
    1.10 +          log debug "brctl delif $bridge $vif failed"
    1.11 +        ifconfig "$vif" down || log debug "ifconfig $vif down failed"
    1.12          ;;
    1.13  esac
    1.14  
    1.15  handle_iptable
    1.16  
    1.17 -log debug "Successful vif-bridge operation for $vif, bridge $bridge."
    1.18 -success
    1.19 +log debug "Successful vif-bridge $command for $vif, bridge $bridge."
    1.20 +if [ "$command" == "online" ]
    1.21 +then
    1.22 +  success
    1.23 +fi