#! /bin/sh # DEFINE_ISA_SWITCH is used to tell whether or not our version of qemu # supports the -isa switch. If it does we use that (and pci becomes # default) if not we use -pci switch (and isa becomes default). DEFINE_ISA_SWITCH=on if [ "$1" = "-config" ]; then . $2 shift 2 else . ./.qemurc fi comline=`which qemu` if [ -n "$qemu" ]; then comline="$qemu" fi if [ "$vde" = "on" ]; then comline="vdeq $comline" fi if [ -n "$boot" ]; then comline="$comline -boot $boot" fi if [ -n "$megs" ]; then comline="$comline -m $megs" fi if [ -n "$fda" ]; then comline="$comline -fda $fda" fi if [ -n "$fdb" ]; then comline="$comline -fdb $fdb" fi if [ -n "$hda" ]; then comline="$comline -hda $hda" fi if [ -n "$hdachs" ]; then comline="$comline -hdachs $hdachs" fi if [ -n "$hdb" ]; then comline="$comline -hdb $hdb" fi if [ -n "$cdrom" ]; then comline="$comline -cdrom $cdrom" fi if [ -n "$hdc" ]; then comline="$comline -hda $hdc" fi if [ -n "$hdd" ]; then comline="$comline -hda $hdd" fi if [ "$audio" = "on" ]; then comline="$comline -enable-audio" fi if [ "$DEFINE_ISA_SWITCH" = "on"]; then if [ "$pci" = "off" || "$isa" = "on" ]; then comline="$comline -isa" fi else if [ "$pci" = "off" || "$isa" = "on" ]; then # do nothing else # make sure that PCI is the default comline="$comline -pci" fi fi if [ -n "$macaddr" ]; then comline="$comline -macaddr $macaddr" fi if [ "$cirrus" = "on" ]; then comline="$comline -cirrusvga" fi if [ "$localtime" = "on" ]; then comline="$comline -localtime" fi if [ "$usernet" = "on" ]; then comline="$comline -user-net" elif [ "$usernet" = "dummy" ]; then comline="$comline -dummy-net" fi if [ -n "$nics" ]; then comline="$comline -nics $nics" fi if [ -n "$netscript" ]; then comline="$comline -n $netscript" fi if [ "$graphic" = "off" ]; then comline="$comline -nographic" fi exec $comline "$@"