diff options
Diffstat (limited to 'cmd')
-rwxr-xr-x | cmd/vdev_id/vdev_id | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id index c7d962045..a2cba086e 100755 --- a/cmd/vdev_id/vdev_id +++ b/cmd/vdev_id/vdev_id @@ -237,7 +237,7 @@ sas_handler() { PHY=`ls -d $port_dir/phy* 2>/dev/null | head -1 | awk -F: '{print $NF}'` if [ -z "$PHY" ] ; then - return + PHY=0 fi PORT=$(( $PHY / $PHYS_PER_PORT )) @@ -262,6 +262,10 @@ sas_handler() { "phy") SLOT=`cat $end_device_dir/phy_identifier 2>/dev/null` ;; + "port") + d=$(eval echo \${$i}) + SLOT=`echo $d | sed -e 's/^.*://'` + ;; "id") i=$(($i + 1)) d=$(eval echo \${$i}) |