~ubuntu-branches/ubuntu/lucid/qemu-kvm/lucid-updates

1
2
3
4
5
6
7
8
9
#!/bin/sh

# NOTE: This script is intended to run in conjunction with qemu-ifup
#       which uses the same logic to find your bridge/switch

switch=$(/sbin/ip route list | awk '/^default / { print $5 }')

/usr/sbin/brctl delif $switch $1
/sbin/ifconfig $1 0.0.0.0 down