#!/bin/bash

brctl addbr br0;
ifconfig eth1 0.0.0.0 promisc up;
brctl addif br0 eth1;
dhclient br0;
iptables -F FORWARD

echo "about to run qemu..."

qemu-system-arm -M overo -m 256 -sd ./sd.img -clock unix -serial stdio -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup.sh -device usb-kbd -device usb-mouse

ifconfig br0 down
ifconfig eth1 down
brctl delif br0 eth1
brctl delbr br0
dhclient eth1
