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