diff options
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 |