diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-03-30 15:21:19 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-03-30 15:21:19 -0500 |
commit | b4a027550acf2c1051c34f997b8e7e845017af4b (patch) | |
tree | 9e38d3c17b42cb1e6765620a87e908973a93c821 /yocto-poky/scripts/runqemu-ifup | |
parent | 2fe86d90044af218ced8f42fdded6b136f1046d2 (diff) | |
parent | f1e5d6968976c2341c6d554bfcc8895f1b33c26b (diff) | |
download | talos-openbmc-b4a027550acf2c1051c34f997b8e7e845017af4b.tar.gz talos-openbmc-b4a027550acf2c1051c34f997b8e7e845017af4b.zip |
Merge commit 'f1e5d6968976c2341c6d554bfcc8895f1b33c26b' from yocto-2.0.1
Diffstat (limited to 'yocto-poky/scripts/runqemu-ifup')
-rwxr-xr-x | yocto-poky/scripts/runqemu-ifup | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/yocto-poky/scripts/runqemu-ifup b/yocto-poky/scripts/runqemu-ifup index b5a3db964..d9bd89412 100755 --- a/yocto-poky/scripts/runqemu-ifup +++ b/yocto-poky/scripts/runqemu-ifup @@ -91,10 +91,25 @@ fi n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] $IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP +STATUS=$? +if [ $STATUS -ne 0 ]; then + echo "Failed to set up IP addressing on $TAP" + exit 1 +fi $IFCONFIG link set dev $TAP up +STATUS=$? +if [ $STATUS -ne 0 ]; then + echo "Failed to bring up $TAP" + exit 1 +fi dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] $IFCONFIG route add to 192.168.7.$dest dev $TAP +STATUS=$? +if [ $STATUS -ne 0 ]; then + echo "Failed to add route to 192.168.7.$dest using $TAP" + exit 1 +fi # setup NAT for tap0 interface to have internet access in QEMU $IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32 |