This commit is contained in:
teldra 2021-05-09 19:15:51 +02:00
parent bdfb8eec26
commit e0a3ca2f08

View File

@ -7,10 +7,10 @@ declare -A disk=()
index=0
for i in $(find /dev/disk/by-id/ -type l -printf "%P\n"|grep -v "part" |tac); do
name="$(readlink -f /dev/disk/by-id/"${i}")"
if [[ ! "${id}" =~ "ata-"* ]]; then
if [[ ! "${i}" =~ "ata-"* ]]; then
continue
fi
if [[ ! "${id}" =~ "usb-"* ]]; then
if [[ ! "${i}" =~ "usb-"* ]]; then
continue
fi
if [[ "${name}" =~ *"^[0-9]+$"* ]]; then