Changeset 173
- Timestamp:
- Aug 24, 2016, 2:36:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r172 r173 293 293 # va rechercher le nom des switchs pour savoir qui est qui 294 294 sub init_switch_names { 295 my ($verbose, $verb_description, $check_hostname ) = @_;295 my ($verbose, $verb_description, $check_hostname, $check_location) = @_; 296 296 297 297 printf "%-26s %-25s %s\n",'Switch','Description','Type' if $verbose; … … 334 334 print " error hostname: $sw->{hostname}\n" if $result->{$OID_NUMBER{sysName}} ne $hostname; 335 335 } 336 if ($check_location) { 337 my ($hostname) = split /\./, $sw->{hostname}, 2; 338 print " error location: $sw->{location} =/= $result->{$OID_NUMBER{sysLocation}}\n" 339 if $result->{$OID_NUMBER{sysLocation}} ne $sw->{location}; 340 } 336 341 #$sw->{location} = $result->{"1.3.6.1.2.1.1.6.0"} || $sw->{hostname}; 337 342 #$sw->{contact} = $result->{"1.3.6.1.2.1.1.4.0"} || $sw->{hostname}; … … 877 882 @ARGV = @_; 878 883 879 my ($verbose, $verb_description, $check_hostname );884 my ($verbose, $verb_description, $check_hostname, $check_location); 880 885 881 886 GetOptions( … … 883 888 'verb-description|d' => \$verb_description, 884 889 'chk-hostname|h' => \$check_hostname, 890 'chk-location|l' => \$check_location, 885 891 ); 886 892 … … 903 909 my $detected_computer = 0; 904 910 905 init_switch_names('yes', $verb_description, $check_hostname ); #nomme les switchs911 init_switch_names('yes', $verb_description, $check_hostname, $check_location); #nomme les switchs 906 912 907 913 { # Remplis le champs portignore des ports d'inter-connection pour chaque switch
Note: See TracChangeset
for help on using the changeset viewer.