diff options
Diffstat (limited to 'state/gen')
-rwxr-xr-x | state/gen | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -25,11 +25,12 @@ rm -f sdcard_part sdcard_fmt # if no explicit SDCARD_DISK is set, guess which device is the sd card by # checking if it is removable AND has a size of approx. 8GB if [ -z "$SDCARD_DISK" ] ; then - SDCARD_DISK="$(lsblk --noheadings --bytes --output PATH,SIZE,TYPE,RM | awk ' + SDCARD_DISK="$(lsblk --noheadings --bytes --list \ + --output PATH,SIZE,TYPE,RM,NAME | awk ' $3 != "disk" { next } $2 < 7900000000 { next } $2 > 8000000000 { next } - $4 != 1 { next } + ($4 != 1) && (match($5, /^mmcblk/) == 0) { next } { print $1 }' | head -n1)" fi if [ -n "$SDCARD_DISK" ] ; then |