Changeset 384


Ignore:
Timestamp:
Jan 4, 2018, 5:19:53 PM (6 years ago)
Author:
g7moreau
Message:
  • Add more test in addentrydb
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r383 r384  
    15691569   my @ARGV = @_;
    15701570
    1571    my ($ip, $mac, $network);
     1571   my ($ip, $mac, $net);
    15721572
    15731573   GetOptions(
    15741574      'ip|i=s'      => \$ip,
    1575       'mac|r=s'     => \$mac,
    1576       'network|r=s' => \$net,
     1575      'mac|m=s'     => \$mac,
     1576      'network|n=s' => \$net,
    15771577      );
    15781578
     1579   if (not $ip or not $mac or not $net) {
     1580      print {*STDERR} "Error: mandatory parameter --ip $ip\n"       if not $ip;
     1581      print {*STDERR} "Error: mandatory parameter --mac $mac\n"     if not $mac;
     1582      print {*STDERR} "Error: mandatory parameter --network $net\n" if not $net;
     1583      print {*STDERR} "\n";
     1584      $CMD_DB{'help'}->();
     1585      exit 1;
     1586      }
     1587
    15791588   test_maindb_environnement();
    15801589
    1581    my $mac = normalize_mac_address($mac);
     1590   $mac = normalize_mac_address($mac);
    15821591
    15831592   if ($ip !~ m/^ $RE_IPv4_ADDRESS $/xms or $mac !~ m/^ $RE_MAC_ADDRESS $/xms or not exists $KLASK_CFG->{'network'}{$net}) {
Note: See TracChangeset for help on using the changeset viewer.