diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id index b6752ba1b..6fddd12f3 100755 --- a/cmd/vdev_id/vdev_id +++ b/cmd/vdev_id/vdev_id @@ -116,7 +116,7 @@ map_slot() { local MAPPED_SLOT= MAPPED_SLOT=`awk "\\$1 == \"slot\" && \\$2 == ${LINUX_SLOT} && \ - \\$4 ~ /^(${CHANNEL}|)$/ { print \\$3; exit }" $CONFIG` + \\$4 ~ /^${CHANNEL}$|^$/ { print \\$3; exit }" $CONFIG` if [ -z "$MAPPED_SLOT" ] ; then MAPPED_SLOT=$LINUX_SLOT fi