scripts/fiber_channel/lip_fc_hosts

29 lines
564 B
Plaintext
Raw 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
# set -A parts $( echo $tuple | awk -F ':' '{print($1,$2,$3,$4)}' )
# h=${parts[0]}
# b=${parts[1]}
# t=${parts[2]}
# l=${parts[3]}
# #echo $host $bus $tgt $lun
fn_mulx=/sys/class/fc_host/$host/issue_lip
fn_qla=/sys/class/fc_host/$host/issue_lip
set -x
if [[ -f $fn_mulx ]]
then
echo "1" > $fn_mulx
#echo "1 $fn_mulx"
elif [[ -f $fn_qla ]]
then
echo "1" > $fn_qla
#echo "1 $fn_qla"
fi
set +x
done