Changeset 329 for trunk/ddt/ddt


Ignore:
Timestamp:
Aug 27, 2018, 1:30:00 PM (6 years ago)
Author:
g7moreau
Message:
  • Change and operator (to strong) to comma ,
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ddt/ddt

    r318 r329  
    2121use strict;
    2222#use warnings;
    23 use version; our $VERSION = version->declare('0.10.0');
     23use version; our $VERSION = version->declare('0.10.1');
    2424
    2525use Getopt::Long qw(GetOptions);
     
    724724         my ($mac_address, $attribute) = %{$computer};
    725725
    726          $computer_index++ and next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;
     726         $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;
    727727
    728728         $attribute->{'modify_time'} = time;
     
    743743         my ($mac_address, $attribute) = %{$computer};
    744744
    745          $computer_index++ and next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;
     745         $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;
    746746
    747747         $attribute->{'modify_time'} = time;
    748748         $computer_db->{$domainset}[$computer_index] = { $mac => $attribute };
    749749         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";
    751751         exit;
    752752         }
     
    985985         my ($mac_address, $attribute) = %{$computer};
    986986
    987          $computer_index++ and next LOOP_ON_COMPUTER if $mac_address ne $mac;
     987         $computer_index++, next LOOP_ON_COMPUTER if $mac_address ne $mac;
    988988         next LOOP_ON_DOMAINSET if $attribute->{'ip'} ne $ip;
    989989
     
    14421442         my ($mac_address, $attribute) = %{$computer};
    14431443
    1444          $computer_index++ and next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;
     1444         $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip;
    14451445         
    14461446         splice(@{$computer_db->{$domainset}}, $computer_index => 1);
     
    14611461         my ($mac_address, $attribute) = %{$computer};
    14621462
    1463          $computer_index++ and next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;
     1463         $computer_index++, next LOOP_ON_COMPUTER if $attribute->{'hostname'} ne $hostname;
    14641464
    14651465         if ($attribute->{'address_type'} eq 'pool-dhcp') {
     
    15051505         my ($mac_address, $attribute) = %{$computer};
    15061506
    1507          $computer_index++ and next LOOP_ON_COMPUTER if $mac_address ne $mac;
     1507         $computer_index++, next LOOP_ON_COMPUTER if $mac_address ne $mac;
    15081508
    15091509         if ($attribute->{'ip'} ne $pool) {
Note: See TracChangeset for help on using the changeset viewer.