Merge pull request #1466 from fewtarius/dev

Fix burnimage to reverse sort to restore previous behavior so the correct device is returned after a match.
This commit is contained in:
fewtarius 2023-05-26 06:57:30 -04:00 committed by GitHub
commit 74be1487c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ fi
# Exclude the boot device.
MYBOOTDEVICE=$(readlink -f /dev/disk/by-partuuid/$(efibootmgr -v | awk 'BEGIN {FS=","} /Boot0000/ {print $3}'))
SDDEVICES=($(awk '/sd*[a-z]$|mmcblk[0-9]$|nvme[0-9]n[0-9]$/ {print $4}' /proc/partitions))
SDDEVICES=($(awk '/sd*[a-z]$|mmcblk[0-9]$|nvme[0-9]n[0-9]$/ {print $4}' /proc/partitions | sort -r))
for SDDEVICE in ${SDDEVICES[@]}
do