Skip to content

Commit

Permalink
feat: Allow drivers in root
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored May 15, 2024
1 parent 011c083 commit 702765b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ else
DISK_OPTS="$DISK_OPTS -device ide-cd,drive=cdrom0,bootindex=$BOOT_INDEX"
fi

DRIVERS="$STORAGE/drivers.iso"
DRIVERS="/drivers.iso"
[ ! -f "$DRIVERS" ] || [ ! -s "$DRIVERS" ] && DRIVERS="$STORAGE/drivers.iso"
[ ! -f "$DRIVERS" ] || [ ! -s "$DRIVERS" ] && DRIVERS="/run/drivers.iso"

if [ -f "$DRIVERS" ] && [[ "${MACHINE,,}" != "pc-q35-2"* ]]; then
Expand Down Expand Up @@ -511,6 +512,7 @@ fi
: "${DEVICE3:=""}"
: "${DEVICE4:=""}"

[ -z "$DEVICE" ] && [ -b "/disk" ] && DEVICE="/disk"
[ -z "$DEVICE" ] && [ -b "/disk1" ] && DEVICE="/disk1"
[ -z "$DEVICE2" ] && [ -b "/disk2" ] && DEVICE2="/disk2"
[ -z "$DEVICE3" ] && [ -b "/disk3" ] && DEVICE3="/disk3"
Expand Down

0 comments on commit 702765b

Please sign in to comment.