diff --git a/bootiso b/bootiso index db60091..a0eedfd 100755 --- a/bootiso +++ b/bootiso @@ -510,7 +510,7 @@ initDevicesList() { mapfile -t devices < <(lsblk -o NAME,TYPE | grep --color=never -oP '^\K\w+(?=\s+disk$)') devicesList=() for device in "${devices[@]}"; do - if [ "$(getDeviceType "/dev/$device")" == "usb" ] || [ "$disableUSBCheck" == 'true' ]; then + if [ "$(getDeviceType "/dev/$device")" == "usb" ] && [ "$(getDeviceTypewithExHDD "/dev/$device")" == "ID_DRIVE_THUMB=1" ] || [ "$disableUSBCheck" == 'true' ]; then devicesList+=("$device") fi done @@ -739,6 +739,12 @@ getDeviceType() { echo "$deviceType" } +getDeviceTypewithExHDD() { + typeset deviceName=/sys/block/${1#/dev/} + typeset getDeviceTypewithExHDD=$(udevadm info --query=property --path="$deviceName" | grep -o 'ID_DRIVE_THUMB=1') + echo "$getDeviceTypewithExHDD" +} + deviceIsDisk() { lsblk --nodeps -o NAME,TYPE "$1" | grep -q disk return $?