diff --git a/main.sh b/main.sh index ecc0b25..97dcbb2 100644 --- a/main.sh +++ b/main.sh @@ -29,7 +29,7 @@ target_phy_id() { local i local f2 set -x - for i in $(find /dev/disk/by-id|grep -v part); do + for i in $(find /dev/disk/by-id ! -type d|grep -v part); do if realpath "$i" | grep -q -i "$TARGET_PHY_DISK"; then if echo "$i" | grep -q -v "wwn" | grep -q -v "eui"; then TARGET_PHY_ID="$i"