summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-05-03 19:12:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-06 09:55:48 +0100
commitc048ff9f9dbd6a00eb9d39dad2098e473db94a0d (patch)
tree57444468586e2e6eed5412b58ac7aa7dc7676448 /scripts/runqemu
parent56f243e4ce3082aed3be19a20f5a8d48dc386a9e (diff)
downloadpoky-c048ff9f9dbd6a00eb9d39dad2098e473db94a0d.tar.gz
runqemu: be sh neutral
Now runs with dash and busybox' ash as well as with bash (From OE-Core rev: 2b93ed90736ed08c25561e24343a5ef2b8f7dbef) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 000d93a160..305e46aebf 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -91,10 +91,9 @@ process_filename() {
91# Parse command line args without requiring specific ordering. It's a 91# Parse command line args without requiring specific ordering. It's a
92# bit more complex, but offers a great user experience. 92# bit more complex, but offers a great user experience.
93KVM_ENABLED="no" 93KVM_ENABLED="no"
94i=1 94while true; do
95while [ $i -le $# ]; do 95 arg=${1}
96 arg=${!i} 96 case "$arg" in
97 case $arg in
98 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemuppc") 97 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemuppc")
99 [ -z "$MACHINE" ] && MACHINE=$arg || \ 98 [ -z "$MACHINE" ] && MACHINE=$arg || \
100 error "conflicting MACHINE types [$MACHINE] and [$arg]" 99 error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -152,6 +151,7 @@ while [ $i -le $# ]; do
152 KVM_ENABLED="yes" 151 KVM_ENABLED="yes"
153 KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1` 152 KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1`
154 ;; 153 ;;
154 "") break ;;
155 *) 155 *)
156 # A directory name is an nfs rootfs 156 # A directory name is an nfs rootfs
157 if [ -d "$arg" ]; then 157 if [ -d "$arg" ]; then
@@ -174,7 +174,7 @@ while [ $i -le $# ]; do
174 fi 174 fi
175 ;; 175 ;;
176 esac 176 esac
177 i=$((i + 1)) 177 shift
178done 178done
179 179
180if [ ! -c /dev/net/tun ] ; then 180if [ ! -c /dev/net/tun ] ; then
@@ -391,6 +391,9 @@ if [ "$libgl" != 'yes' ]; then
391 exit 1; 391 exit 1;
392fi 392fi
393 393
394INTERNAL_SCRIPT="$0-internal"
395if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
394INTERNAL_SCRIPT=`which runqemu-internal` 396INTERNAL_SCRIPT=`which runqemu-internal`
397fi
395 398
396. $INTERNAL_SCRIPT 399. $INTERNAL_SCRIPT