summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJeff Dike <jdike@x86_64.user-mode-linux.org>2010-08-04 17:19:59 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-20 16:20:09 +0100
commitd9aa25a3379c21a999bd39e78702f932ead7b840 (patch)
tree09cbff6b7d779f056953b5311b0cbf906981f6f8 /scripts
parentc791544bb02e852644c55401018bc17ec1b9b40e (diff)
downloadopenembedded-core-d9aa25a3379c21a999bd39e78702f932ead7b840.tar.gz
openembedded-core-d9aa25a3379c21a999bd39e78702f932ead7b840.tar.bz2
openembedded-core-d9aa25a3379c21a999bd39e78702f932ead7b840.zip
poky-qemu-ifup: allow multiple tap devices
This patch bases the tap IP address on the device number, providing each device with its own IP address. Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-qemu-ifup3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup
index e7f689d251..3b2ed7c04a 100755
--- a/scripts/poky-qemu-ifup
+++ b/scripts/poky-qemu-ifup
@@ -30,7 +30,8 @@ if [ "x$IFCONFIG" = "x" ]; then
IFCONFIG=/sbin/ifconfig
fi
-$IFCONFIG $TAP 192.168.7.1
+n=$[ `echo $TAP | sed 's/tap//'` + 1 ]
+$IFCONFIG $TAP 192.168.7.$n
# setup NAT for tap0 interface to have internet access in QEMU
IPTABLES=`which iptables`