scripts/fiber_channel/scan_fc_luns

16 lines
274 B
Plaintext
Raw Permalink Normal View History

#!/bin/ksh
PGM_LS_LUNS=/usr/local/sbin/ls_fc_luns
set -A hosts $($PGM_LS_LUNS | awk '$1 ~ /^HBA/ {print $3}')
for host in "${hosts[@]}"; do
fn=/sys/class/scsi_host/$host/scan
if [[ -f $fn ]]
then
echo "- - -" > $fn
else
echo "ERR file not found : '$fn'"
fi
done