Skip to content

Commit 8893d32

Browse files
committed
Sort the drives, but let lsblk be the commanding order of the drives
1 parent 7a8264c commit 8893d32

File tree

1 file changed

+1
-1
lines changed
  • Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib

1 file changed

+1
-1
lines changed

Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ getHardDisk() {
15041504

15051505
# Get valid devices (filter out 0B disks) once, sort lexicographically for stable name order
15061506
local devs
1507-
devs=$(lsblk -dpno KNAME,SIZE -I 3,8,9,179,202,253,259 | awk '$2 != "0B" { print $1 }' | sort -u)
1507+
devs=$(lsblk -dpno KNAME,SIZE -I 3,8,9,179,202,253,259 | awk '$2 != "0B" && !seen[$1]++ { print $1 }')
15081508

15091509
if [[ -n $fdrive ]]; then
15101510
local found_match=0

0 commit comments

Comments
 (0)