From 702765ba3b4539d43027fa0911f7bf2b0f0347f6 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 15 May 2024 17:49:56 +0200 Subject: [PATCH] feat: Allow drivers in root --- src/disk.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/disk.sh b/src/disk.sh index b0857473..aca658cc 100644 --- a/src/disk.sh +++ b/src/disk.sh @@ -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 @@ -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"