summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-01 21:04:48 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-02 13:21:30 (GMT)
commitd1a84c9f3d387bfeaeaa0007dda8d90164633255 (patch)
treef51c9af343a5ab6f3a0990aefeee94d432d1ceea /scripts/runqemu-internal
parentc0df2ab7ebac5650e52089ada97e8657f8af3979 (diff)
downloadpoky-d1a84c9f3d387bfeaeaa0007dda8d90164633255.tar.gz
scripts: Show sensible warning messages if expected binaries don't exist
[YOCTO #1438] (From OE-Core rev: 6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal20
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 19f8d3d..4f6909b 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -88,8 +88,16 @@ fi
88# sudo. 88# sudo.
89NOSUDO_FLAG="/etc/runqemu-nosudo" 89NOSUDO_FLAG="/etc/runqemu-nosudo"
90 90
91QEMUIFUP=`which runqemu-ifup` 91QEMUIFUP=`which runqemu-ifup 2> /dev/null`
92QEMUIFDOWN=`which runqemu-ifdown` 92QEMUIFDOWN=`which runqemu-ifdown 2> /dev/null`
93if [ -z "$QEMUIFUP" -o ! -x "$QEMUIFUP" ]; then
94 echo "runqemu-ifup cannot be found or executed"
95 exit 1
96fi
97if [ -z "$QEMUIFDOWN" -o ! -x "$QEMUIFDOWN" ]; then
98 echo "runqemu-ifdown cannot be found or executed"
99 exit 1
100fi
93 101
94NFSRUNNING="false" 102NFSRUNNING="false"
95 103
@@ -137,6 +145,10 @@ IFCONFIG=`which ifconfig 2> /dev/null`
137if [ -z "$IFCONFIG" ]; then 145if [ -z "$IFCONFIG" ]; then
138 IFCONFIG=/sbin/ifconfig 146 IFCONFIG=/sbin/ifconfig
139fi 147fi
148if [ ! -x "$IFCONFIG" ]; then
149 echo "$IFCONFIG cannot be executed"
150 exit 1
151fi
140 152
141POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` 153POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'`
142TAP="" 154TAP=""
@@ -418,7 +430,7 @@ fi
418 430
419PATH=$CROSSPATH:$OECORE_NATIVE_SYSROOT/usr/bin:$PATH 431PATH=$CROSSPATH:$OECORE_NATIVE_SYSROOT/usr/bin:$PATH
420 432
421QEMUBIN=`which $QEMU` 433QEMUBIN=`which $QEMU 2> /dev/null`
422if [ ! -x "$QEMUBIN" ]; then 434if [ ! -x "$QEMUBIN" ]; then
423 echo "Error: No QEMU binary '$QEMU' could be found." 435 echo "Error: No QEMU binary '$QEMU' could be found."
424 cleanup 436 cleanup
@@ -434,7 +446,7 @@ function _quit() {
434 return 446 return
435} 447}
436 448
437DISTCCD=`which distccd` 449DISTCCD=`which distccd 2> /dev/null`
438PIDFILE="" 450PIDFILE=""
439 451
440trap _quit INT TERM QUIT 452trap _quit INT TERM QUIT