aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/qemu/qemu-ifdown
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-04-01 15:20:13 -0700
committerKhem Raj <raj.khem@gmail.com>2010-04-01 15:20:13 -0700
commitc652a39e6c87f4d4e5efdda3bcc7a120a99b14d8 (patch)
tree01cf81de8066654144a1a4cb52a40f78eb0b2c13 /contrib/qemu/qemu-ifdown
parentb311e10ca11856ba052ad32e041af1ec3479b0b9 (diff)
downloadopenembedded-c652a39e6c87f4d4e5efdda3bcc7a120a99b14d8.tar.gz
contrib: Add scripts to run qemu
* These scripts are tested on ubuntu and should run on debian like systems. * For networking to work it needs ethernet does not work on wireless. Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'contrib/qemu/qemu-ifdown')
-rwxr-xr-xcontrib/qemu/qemu-ifdown9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/qemu/qemu-ifdown b/contrib/qemu/qemu-ifdown
new file mode 100755
index 0000000000..204f29864c
--- /dev/null
+++ b/contrib/qemu/qemu-ifdown
@@ -0,0 +1,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