Skip to content

Commit

Permalink
feat: Use SATA CD-ROM by default (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Oct 1, 2024
1 parent 2b2214f commit bfef562
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -536,16 +536,18 @@ case "${DISK_TYPE,,}" in
* ) error "Invalid DISK_TYPE specified, value \"$DISK_TYPE\" is not recognized!" && exit 80 ;;
esac

if [ -z "${MEDIA_TYPE:-}" ]; then
case "${MACHINE,,}" in
"virt" )
MEDIA_TYPE="usb" ;;
"pc-q35-2"* | "pc-i440fx-2"* )
MEDIA_TYPE="auto" ;;
* )
MEDIA_TYPE="ide" ;;
esac
fi

case "${MEDIA_TYPE,,}" in
"" )
case "${MACHINE,,}" in
"virt" )
MEDIA_TYPE="usb" ;;
"pc-q35-2"* | "pc-i440fx-2"* )
MEDIA_TYPE="auto" ;;
* )
MEDIA_TYPE="ide" ;;
esac ;;
"ide" | "usb" | "scsi" | "blk" | "auto" ) ;;
* ) error "Invalid MEDIA_TYPE specified, value \"$MEDIA_TYPE\" is not recognized!" && exit 80 ;;
esac
Expand Down

0 comments on commit bfef562

Please sign in to comment.