diff --git a/qemu-vm b/qemu-vm index 8ff9230..012f742 100755 --- a/qemu-vm +++ b/qemu-vm @@ -37,7 +37,7 @@ NET_CONF_FILE="$NET_CONF_FILE" "$SUDO" --preserve-env=PATH,NET_CONF_FILE qemu-vm # rebind devices old_IFS="$IFS" IFS=$'\n' -for device_override in $(cat "$CONFIG_PATH/vfio-devices.txt" || true) $(cat "$CONFIG_PATH/vfio-devices-$VMNAME.txt" || true); do +for device_override in $(cat "$CONFIG_PATH/vfio-devices.txt" || true) $(sh "$CONFIG_PATH/vfio-devices.sh") $(cat "$CONFIG_PATH/vfio-devices-$VMNAME.txt" || true) $(sh "$CONFIG_PATH/vfio-devices-$VMNAME.sh"); do device_override="${device_override%%#*}" device="$(awk '{print $1}' <<< "$device_override")" override="$(awk '{print $2}' <<< "$device_override")" @@ -48,7 +48,7 @@ for device_override in $(cat "$CONFIG_PATH/vfio-devices.txt" || true) $(cat "$CO $SUDO --preserve-env=SUDO,PATH qemu-vm-pci vfio_override_device "$device" done $SUDO modprobe vfio-pci -for device_override in $(cat "$CONFIG_PATH/vfio-devices.txt" || true) $(cat "$CONFIG_PATH/vfio-devices-$VMNAME.txt" || true); do +for device_override in $(cat "$CONFIG_PATH/vfio-devices.txt" || true) $(sh "$CONFIG_PATH/vfio-devices.sh") $(cat "$CONFIG_PATH/vfio-devices-$VMNAME.txt" || true) $(sh "$CONFIG_PATH/vfio-devices-$VMNAME.sh"); do device_override="${device_override%%#*}" device="$(awk '{print $1}' <<< "$device_override")" override="$(awk '{print $2}' <<< "$device_override")"