Changeset 189
- Timestamp:
- Nov 11, 2016, 12:24:37 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r188 r189 1204 1204 1205 1205 if ($repairdns) { # Search and update unkown computer in reverse DNS 1206 LOOP_ON_ COMPUTER:1207 for my $ one_computer (@computer) {1208 next LOOP_ON_ COMPUTER if $computerdb->{$one_computer}{hostname_fq} ne 'unknow';1209 1210 my $packed_ip = scalar gethostbyname($ one_computer);1211 next LOOP_ON_ COMPUTERif not defined $packed_ip;1206 LOOP_ON_IP_ADDRESS: 1207 for my $ip (keys %{$computerdb}) { 1208 next LOOP_ON_IP_ADDRESS if $computerdb->{$ip}{hostname_fq} ne 'unknow'; 1209 1210 my $packed_ip = scalar gethostbyname($ip); 1211 next LOOP_ON_IP_ADDRESS if not defined $packed_ip; 1212 1212 1213 1213 my $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET); 1214 next LOOP_ON_ COMPUTERif not defined $hostname_fq;1215 1216 $computerdb->{$ one_computer}{hostname_fq} = $hostname_fq;1214 next LOOP_ON_IP_ADDRESS if not defined $hostname_fq; 1215 1216 $computerdb->{$ip}{hostname_fq} = $hostname_fq; 1217 1217 $database_has_changed++; 1218 1218 }
Note: See TracChangeset
for help on using the changeset viewer.