37,9 → 37,10 |
fi |
|
case $args in |
--save) # save all the IP before changing the configuration |
--save) |
rm -f $TMP_ip_gw_save |
gw_list="gw0" # ipset name list for load_balancing |
# ipset name list for load_balancing |
gw_list="gw0" |
for ((i=1 ; i<=$nb_gw ; i++)); do |
gw_list="${gw_list} gw$i" |
done |
49,7 → 50,7 |
if [ $? -eq 0 ] |
then |
# the cut -d":" -f5 deletes all the lines with a :, i.e all the lines except the members |
ipset list $i | grep -v ":" >> $TMP_ip_gw_save |
ipset list $i | cut -d":" -f5 | sed '/^[[:space:]]*$/d' >> $TMP_ip_gw_save |
fi |
done |
exit 0 |