direct-io.hg

changeset 7810:60bf9aa39043

Have the vif scripts expect the offline event, not the remove event. With
the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead. This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Tue Nov 15 15:56:47 2005 +0100 (2005-11-15)
parents bb270cb5d2e8
children bb0e5f7f94fd
files tools/examples/vif-bridge tools/examples/vif-common.sh tools/examples/vif-nat tools/examples/vif-route
line diff
     1.1 --- a/tools/examples/vif-bridge	Tue Nov 15 15:54:51 2005 +0100
     1.2 +++ b/tools/examples/vif-bridge	Tue Nov 15 15:56:47 2005 +0100
     1.3 @@ -60,7 +60,7 @@ case "$command" in
     1.4          ifconfig "$vif" up || fatal "ifconfig $vif up failed"
     1.5          ;;
     1.6  
     1.7 -    remove)
     1.8 +    offline)
     1.9          # vifs are auto-removed from bridge.
    1.10          ifconfig "$vif" down || fatal "ifconfig $vif down failed"
    1.11          ;;
     2.1 --- a/tools/examples/vif-common.sh	Tue Nov 15 15:54:51 2005 +0100
     2.2 +++ b/tools/examples/vif-common.sh	Tue Nov 15 15:56:47 2005 +0100
     2.3 @@ -32,7 +32,7 @@ then
     2.4  fi
     2.5  
     2.6  case "$command" in
     2.7 -    add | offline)
     2.8 +    add | remove)
     2.9          exit 0
    2.10          ;;
    2.11  esac
     3.1 --- a/tools/examples/vif-nat	Tue Nov 15 15:54:51 2005 +0100
     3.2 +++ b/tools/examples/vif-nat	Tue Nov 15 15:56:47 2005 +0100
     3.3 @@ -45,7 +45,7 @@ case "$command" in
     3.4          echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
     3.5          ipcmd='a'
     3.6          ;;
     3.7 -    remove)
     3.8 +    offline)
     3.9          ifconfig ${vif} down
    3.10          ipcmd='d'
    3.11          ;;
     4.1 --- a/tools/examples/vif-route	Tue Nov 15 15:54:51 2005 +0100
     4.2 +++ b/tools/examples/vif-route	Tue Nov 15 15:56:47 2005 +0100
     4.3 @@ -31,7 +31,7 @@ case "$command" in
     4.4          echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
     4.5          ipcmd='a'
     4.6          ;;
     4.7 -    remove)
     4.8 +    offline)
     4.9          ifdown ${vif}
    4.10          ipcmd='d'
    4.11          ;;