Changeset fa33ac4 in mainline for contrib/conf/net-qe.sh


Ignore:
Timestamp:
2013-03-20T16:56:07Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
119b46e
Parents:
f597bc4
Message:

make QEMU scripts compatible with newer distros (that lack the legacy "qemu" binary)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/conf/net-qe.sh

    rf597bc4 rfa33ac4  
    11#!/bin/sh
     2
     3if [ -z "${QEMU_BINARY}" ] ; then
     4        QEMU_BINARY="`which --tty-only qemu 2> /dev/null`"
     5fi
     6
     7if [ -z "${QEMU_BINARY}" ] ; then
     8        QEMU_BINARY="`which --tty-only qemu-system-x86_64 2> /dev/null`"
     9fi
     10
     11if [ -z "${QEMU_BINARY}" ] ; then
     12        QEMU_BINARY="`which --tty-only qemu-system-i386 2> /dev/null`"
     13fi
     14
     15if [ -z "${QEMU_BINARY}" ] ; then
     16        echo "QEMU binary not found"
     17fi
    218
    319case "$1" in
    420        ne2k)
    521                shift
    6                 qemu $@ -device ne2k_isa,irq=5,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
     22                "${QEMU_BINARY}" "$@" -device ne2k_isa,irq=5,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
    723                ;;
    824        e1k)
    925                shift
    10                 qemu $@ -device e1000,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
     26                "${QEMU_BINARY}" "$@" -device e1000,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
    1127                ;;
    1228        rtl8139)
    1329                shift
    14                 qemu $@ -device rtl8139,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
     30                "${QEMU_BINARY}" "$@" -device rtl8139,vlan=0 -net user -boot d -redir udp:8080::8080 -redir udp:8081::8081 -redir tcp:8080::8080 -redir tcp:8081::8081 -cdrom image.iso
    1531                ;;
    1632        *)
Note: See TracChangeset for help on using the changeset viewer.