summaryrefslogtreecommitdiff
path: root/client/tests/kvm/scripts/qemu-ifup
blob: c4debf582f3e8c2ab0dd40825930b02ebb6abf39 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

# The following expression selects the first bridge listed by 'brctl show'.
# Modify it to suit your needs.
switch=$(/usr/sbin/brctl show | awk 'NR==2 { print $1 }')

/bin/echo 1 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6
/sbin/ifconfig $1 0.0.0.0 up
/usr/sbin/brctl addif ${switch} $1
/usr/sbin/brctl setfd ${switch} 0
/usr/sbin/brctl stp ${switch} off