summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
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
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