devs[$i]=`sg_map | awk "{if (\\\$2 == \"$d\") print \\\$1}"`
if [ -z "${devs[i]}" ]; then
echo "Can't find SG device for $d, testing for partition"
devs[$i]=`sg_map | awk "{if (\\\$2 == \"$d\") print \\\$1}"`
if [ -z "${devs[i]}" ]; then
echo "Can't find SG device for $d, testing for partition"