Avoid sigpipe by looking at last IPAddress
The docker command to inspect returns 2 "IPAdress:" items.
Both are the same, just different sections of the docker
output command. To avoid getting a SIGPIPE from the grep
command, use the tail command line tool to just grab the
last IPAddress from the grep command.
Resolves openbmc/openbmc-build-scripts#16
Change-Id: I5560ba21f9ae60998f78db8e7478c655b65eca3e
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/run-qemu-robot-test.sh b/run-qemu-robot-test.sh
index 7475ece..70456ac 100755
--- a/run-qemu-robot-test.sh
+++ b/run-qemu-robot-test.sh
@@ -129,7 +129,7 @@
trap '' PIPE
DOCKER_QEMU_IP_ADDR="$(docker inspect $obmc_qemu_docker | \
- grep -m 1 "IPAddress\":" | cut -d '"' -f 4)"
+ grep "IPAddress\":" | tail -n1 | cut -d '"' -f 4)"
#Now wait for the OpenBMC QEMU Docker instance to get to standby
delay=5