Changeset 172
- Timestamp:
- Aug 24, 2016, 2:30:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r171 r172 293 293 # va rechercher le nom des switchs pour savoir qui est qui 294 294 sub init_switch_names { 295 my ($verbose, $verb_description ) = @_;295 my ($verbose, $verb_description, $check_hostname) = @_; 296 296 297 297 printf "%-26s %-25s %s\n",'Switch','Description','Type' if $verbose; … … 330 330 print " description: $desc\n" 331 331 } 332 if ($check_hostname) { 333 my ($hostname) = split /\./, $sw->{hostname}, 2; 334 print " error hostname: $sw->{hostname}\n" if $result->{$OID_NUMBER{sysName}} ne $hostname; 335 } 332 336 #$sw->{location} = $result->{"1.3.6.1.2.1.1.6.0"} || $sw->{hostname}; 333 337 #$sw->{contact} = $result->{"1.3.6.1.2.1.1.4.0"} || $sw->{hostname}; … … 873 877 @ARGV = @_; 874 878 875 my ($verbose, $verb_description );879 my ($verbose, $verb_description, $check_hostname); 876 880 877 881 GetOptions( 878 'verbose|v' => \$verbose, 879 'verb_description|d' => \$verb_description, 882 'verbose|v' => \$verbose, 883 'verb-description|d' => \$verb_description, 884 'chk-hostname|h' => \$check_hostname, 880 885 ); 881 886 … … 898 903 my $detected_computer = 0; 899 904 900 init_switch_names('yes', $verb_description ); #nomme les switchs905 init_switch_names('yes', $verb_description, $check_hostname); #nomme les switchs 901 906 902 907 { # Remplis le champs portignore des ports d'inter-connection pour chaque switch
Note: See TracChangeset
for help on using the changeset viewer.