Changeset 97 for trunk/klask


Ignore:
Timestamp:
Mar 30, 2011, 11:17:56 PM (9 years ago)
Author:
g7moreau
Message:
  • Add verbose on method ip-free
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r96 r97  
    11861186   my $days_to_dead = 365 * 2;
    11871187   my $format = 'txt';
     1188   my $verbose;
    11881189
    11891190   my $ret = GetOptionsFromArray(\@vlan_name,
    11901191      'day|d=i'      => \$days_to_dead,
    11911192      'format|f=s'   => \$format,
     1193      'verbose|v'    => \$verbose,
    11921194      );
    11931195
     
    11951197      txt  => \&cmd_ip_free_txt,
    11961198      html => \&cmd_ip_free_html,
     1199      none => sub {},
    11971200      );
    11981201   $format = 'txt' if not defined $possible_format{$format};
     
    12121215
    12131216      my @ip_list = get_list_ip($vlan);
    1214 #      my $current_interface = get_current_interface($vlan);
    1215      
     1217
    12161218      LOOP_ON_IP_ADDRESS:
    12171219      for my $ip (@ip_list) {
     
    12361238            $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET) || 'unknown' if defined $packed_ip;
    12371239         $result_ip{$ip}->{hostname_fq} = $hostname_fq;
    1238          
     1240
    12391241         $result_ip{$ip}->{vlan} = $vlan;
     1242
     1243         printf "VERBOSE_1: %-15s %-12s %s\n", $ip, $vlan, $hostname_fq if $verbose;
    12401244         }
    12411245      }
Note: See TracChangeset for help on using the changeset viewer.