Révision 13

bin/add-iscsi-volume (revision 13)
4 4

  
5 5
function restrictedIP {
6 6

  
7
for IP in $(echo $restrited|sed -e "s/;/ /g")
7
for IP in $(echo $restricted|sed -e "s/;/ /g")
8 8
do
9 9
    echo "iqn.$TODAY:$(hostname)-ens-zfs-iscsi-$target $IP" >>/etc/iet/initiators.allow
10 10
done
bin/get-conf-iscsi-volume (revision 13)
81 81

  
82 82
done < "/proc/net/iet/session"
83 83

  
84
allowIP=""
85
while read line
86
do
87
  SEARCH_MYTARGET=$(echo $line |grep -i "$TARGET")
88
  if [ "$SEARCH_MYTARGET" != "" ]
89
  then
90
     if [ "$allowIP" == "" ]
91
     then
92
        allowIP=$(echo $SEARCH_MYTARGET |cut -d " " -f2)
93
     else
94
        allowIP=$allowIP";"$(echo $SEARCH_MYTARGET |cut -d " " -f2)
95
     fi
96
  fi
97
done < "/etc/iet/initiators.allow"
98
echo "allowIP $allowIP"

Formats disponibles : Unified diff