diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-01 22:04:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-02 14:21:30 +0100 |
commit | d1a84c9f3d387bfeaeaa0007dda8d90164633255 (patch) | |
tree | f51c9af343a5ab6f3a0990aefeee94d432d1ceea /scripts/runqemu-internal | |
parent | c0df2ab7ebac5650e52089ada97e8657f8af3979 (diff) | |
download | poky-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-x | scripts/runqemu-internal | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 19f8d3de8e..4f6909b734 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
@@ -88,8 +88,16 @@ fi | |||
88 | # sudo. | 88 | # sudo. |
89 | NOSUDO_FLAG="/etc/runqemu-nosudo" | 89 | NOSUDO_FLAG="/etc/runqemu-nosudo" |
90 | 90 | ||
91 | QEMUIFUP=`which runqemu-ifup` | 91 | QEMUIFUP=`which runqemu-ifup 2> /dev/null` |
92 | QEMUIFDOWN=`which runqemu-ifdown` | 92 | QEMUIFDOWN=`which runqemu-ifdown 2> /dev/null` |
93 | if [ -z "$QEMUIFUP" -o ! -x "$QEMUIFUP" ]; then | ||
94 | echo "runqemu-ifup cannot be found or executed" | ||
95 | exit 1 | ||
96 | fi | ||
97 | if [ -z "$QEMUIFDOWN" -o ! -x "$QEMUIFDOWN" ]; then | ||
98 | echo "runqemu-ifdown cannot be found or executed" | ||
99 | exit 1 | ||
100 | fi | ||
93 | 101 | ||
94 | NFSRUNNING="false" | 102 | NFSRUNNING="false" |
95 | 103 | ||
@@ -137,6 +145,10 @@ IFCONFIG=`which ifconfig 2> /dev/null` | |||
137 | if [ -z "$IFCONFIG" ]; then | 145 | if [ -z "$IFCONFIG" ]; then |
138 | IFCONFIG=/sbin/ifconfig | 146 | IFCONFIG=/sbin/ifconfig |
139 | fi | 147 | fi |
148 | if [ ! -x "$IFCONFIG" ]; then | ||
149 | echo "$IFCONFIG cannot be executed" | ||
150 | exit 1 | ||
151 | fi | ||
140 | 152 | ||
141 | POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` | 153 | POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` |
142 | TAP="" | 154 | TAP="" |
@@ -418,7 +430,7 @@ fi | |||
418 | 430 | ||
419 | PATH=$CROSSPATH:$OECORE_NATIVE_SYSROOT/usr/bin:$PATH | 431 | PATH=$CROSSPATH:$OECORE_NATIVE_SYSROOT/usr/bin:$PATH |
420 | 432 | ||
421 | QEMUBIN=`which $QEMU` | 433 | QEMUBIN=`which $QEMU 2> /dev/null` |
422 | if [ ! -x "$QEMUBIN" ]; then | 434 | if [ ! -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 | ||
437 | DISTCCD=`which distccd` | 449 | DISTCCD=`which distccd 2> /dev/null` |
438 | PIDFILE="" | 450 | PIDFILE="" |
439 | 451 | ||
440 | trap _quit INT TERM QUIT | 452 | trap _quit INT TERM QUIT |