diff options
Diffstat (limited to 'contrib/qemu/qemu-ifup')
-rwxr-xr-x | contrib/qemu/qemu-ifup | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/qemu/qemu-ifup b/contrib/qemu/qemu-ifup new file mode 100755 index 0000000000..34ae96013f --- /dev/null +++ b/contrib/qemu/qemu-ifup @@ -0,0 +1,10 @@ +#!/bin/sh +echo "executing qemu-ifup" +sudo /sbin/modprobe tun # to network QEMU +echo "bringing up $1 for bridged mode..." + +sudo /sbin/ifconfig $1 0.0.0.0 up +bridge=$(/sbin/ip route list | /usr/bin/awk '/^default / { print $5 }') +echo "adding $1 to $bridge ..." +sudo /usr/sbin/brctl addif ${bridge} $1 + |