#!/bin/bash set -e if [ -f "$HARVEY/util/harvey.qcow2" ] then HARVEY_DISK="$HARVEY/util/harvey.qcow2" elif [ -f "$HARVEY/util/harvey.raw" ] then HARVEY_DISK="$HARVEY/util/harvey.raw,format=raw" else echo "ERROR: Disk image not found" exit 1 fi trap : 2 $HARVEY/util/ufs -root=$HARVEY & ufspid=$! export machineflag=q35 if [ "$(uname)" = "Linux" ] && [ -e /dev/kvm ]; then export kvmflag='-enable-kvm' export machineflag='pc,accel=kvm' if [ ! -w /dev/kvm ]; then # we don't have access as a regular user export kvmdo=sudo fi fi # The -usb flag is necessary for the system to recognize usb devices # To specify a specific device you must follow the following format: # -device usb-host,hostbus='X',hostaddr='Y' # The 'X'/'Y' values can be found with lsusb(8) (Linux/BSD) # Provided is an example lsusb(8) output: # Bus 002 Device 004: ID 056a:00e6 Wacom Co., Ltd TPCE6 # Where 'X'== 2 and 'Y'== 4 read -r cmd <