diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-05-03 19:12:34 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-06 09:55:48 +0100 |
| commit | c048ff9f9dbd6a00eb9d39dad2098e473db94a0d (patch) | |
| tree | 57444468586e2e6eed5412b58ac7aa7dc7676448 /scripts/runqemu | |
| parent | 56f243e4ce3082aed3be19a20f5a8d48dc386a9e (diff) | |
| download | poky-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-x | scripts/runqemu | 13 |
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. |
| 93 | KVM_ENABLED="no" | 93 | KVM_ENABLED="no" |
| 94 | i=1 | 94 | while true; do |
| 95 | while [ $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 |
| 178 | done | 178 | done |
| 179 | 179 | ||
| 180 | if [ ! -c /dev/net/tun ] ; then | 180 | if [ ! -c /dev/net/tun ] ; then |
| @@ -391,6 +391,9 @@ if [ "$libgl" != 'yes' ]; then | |||
| 391 | exit 1; | 391 | exit 1; |
| 392 | fi | 392 | fi |
| 393 | 393 | ||
| 394 | INTERNAL_SCRIPT="$0-internal" | ||
| 395 | if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then | ||
| 394 | INTERNAL_SCRIPT=`which runqemu-internal` | 396 | INTERNAL_SCRIPT=`which runqemu-internal` |
| 397 | fi | ||
| 395 | 398 | ||
| 396 | . $INTERNAL_SCRIPT | 399 | . $INTERNAL_SCRIPT |
