summaryrefslogtreecommitdiff
path: root/contrib/qemu/qemu-ifdown
blob: 204f29864c4690c96bcf305854d09c344ce86a75 (plain)
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 }')

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