- Timestamp:
- Aug 27, 2018, 1:30:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r318 r329 21 21 use strict; 22 22 #use warnings; 23 use version; our $VERSION = version->declare('0.10. 0');23 use version; our $VERSION = version->declare('0.10.1'); 24 24 25 25 use Getopt::Long qw(GetOptions); … … 724 724 my ($mac_address, $attribute) = %{$computer}; 725 725 726 $computer_index++ andnext LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;726 $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip; 727 727 728 728 $attribute->{'modify_time'} = time; … … 743 743 my ($mac_address, $attribute) = %{$computer}; 744 744 745 $computer_index++ andnext LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;745 $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname; 746 746 747 747 $attribute->{'modify_time'} = time; 748 748 $computer_db->{$domainset}[$computer_index] = { $mac => $attribute }; 749 749 ipamdb_save("$COMPUTER_YAML", $computer_db); 750 print "Info: Update host $hostname MAC: $mac IP: $ip[OK]\n";750 print "Info: Update HOST: $hostname DOMAINSET: $domainset MAC: $mac IP: $attribute->{'ip'} [OK]\n"; 751 751 exit; 752 752 } … … 985 985 my ($mac_address, $attribute) = %{$computer}; 986 986 987 $computer_index++ andnext LOOP_ON_COMPUTER if $mac_address ne $mac;987 $computer_index++, next LOOP_ON_COMPUTER if $mac_address ne $mac; 988 988 next LOOP_ON_DOMAINSET if $attribute->{'ip'} ne $ip; 989 989 … … 1442 1442 my ($mac_address, $attribute) = %{$computer}; 1443 1443 1444 $computer_index++ andnext LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;1444 $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip; 1445 1445 1446 1446 splice(@{$computer_db->{$domainset}}, $computer_index => 1); … … 1461 1461 my ($mac_address, $attribute) = %{$computer}; 1462 1462 1463 $computer_index++ andnext LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;1463 $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname; 1464 1464 1465 1465 if ($attribute->{'address_type'} eq 'pool-dhcp') { … … 1505 1505 my ($mac_address, $attribute) = %{$computer}; 1506 1506 1507 $computer_index++ andnext LOOP_ON_COMPUTER if $mac_address ne $mac;1507 $computer_index++, next LOOP_ON_COMPUTER if $mac_address ne $mac; 1508 1508 1509 1509 if ($attribute->{'ip'} ne $pool) {
Note: See TracChangeset
for help on using the changeset viewer.