summaryrefslogtreecommitdiff
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-01 22:04:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-02 14:20:32 +0100
commit6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647 (patch)
tree436599b7eda0bd343518cfcc81e72976dc16444e /scripts/runqemu-internal
parent06625096f897235ed85f0d9a1355497f92938454 (diff)
downloadopenembedded-core-6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647.tar.gz
openembedded-core-6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647.tar.bz2
openembedded-core-6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647.zip
scripts: Show sensible warning messages if expected binaries don't exist
[YOCTO #1438] 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 19f8d3de8e..4f6909b734 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -88,8 +88,16 @@ fi
# sudo.
NOSUDO_FLAG="/etc/runqemu-nosudo"
-QEMUIFUP=`which runqemu-ifup`
-QEMUIFDOWN=`which runqemu-ifdown`
+QEMUIFUP=`which runqemu-ifup 2> /dev/null`
+QEMUIFDOWN=`which runqemu-ifdown 2> /dev/null`
+if [ -z "$QEMUIFUP" -o ! -x "$QEMUIFUP" ]; then
+ echo "runqemu-ifup cannot be found or executed"
+ exit 1
+fi
+if [ -z "$QEMUIFDOWN" -o ! -x "$QEMUIFDOWN" ]; then
+ echo "runqemu-ifdown cannot be found or executed"
+ exit 1
+fi
NFSRUNNING="false"
@@ -137,6 +145,10 @@ IFCONFIG=`which ifconfig 2> /dev/null`
if [ -z "$IFCONFIG" ]; then
IFCONFIG=/sbin/ifconfig
fi
+if [ ! -x "$IFCONFIG" ]; then
+ echo "$IFCONFIG cannot be executed"
+ exit 1
+fi
POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'`
TAP=""
@@ -418,7 +430,7 @@ fi
PATH=$CROSSPATH:$OECORE_NATIVE_SYSROOT/usr/bin:$PATH
-QEMUBIN=`which $QEMU`
+QEMUBIN=`which $QEMU 2> /dev/null`
if [ ! -x "$QEMUBIN" ]; then
echo "Error: No QEMU binary '$QEMU' could be found."
cleanup
@@ -434,7 +446,7 @@ function _quit() {
return
}
-DISTCCD=`which distccd`
+DISTCCD=`which distccd 2> /dev/null`
PIDFILE=""
trap _quit INT TERM QUIT