Changeset 169 for branches


Ignore:
Timestamp:
02/22/05 17:00:37 (20 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Updated checkcusts.pl hack to skip new allocation-type-centric
CustIDs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/checkcusts.pl

    r156 r169  
    77# Last update by $Author$
    88###
    9 # Copyright (C) 2004 Kris Deugau <kdeugau@vianet.ca>
     9# Copyright (C) 2004,2005 Kris Deugau <kdeugau@vianet.ca>
    1010
    1111use DBI;
     
    2727($dbh,$errstr) = connectDB("ipdb", "ipdb", "ipdbpwd");
    2828$IDH = DBI->connect ("DBI:Pg:host=newbilling;dbname=custids", "cidcheck", "c1dch4ck");
     29
     30$sth = $dbh->prepare("select distinct def_custid from alloctypes where listorder >=40");
     31$sth->execute;
     32while (@data = $sth->fetchrow_array) {
     33  push @def_custids, $data[0];
     34}
    2935$sth = $dbh->prepare("select cidr,custid from searchme where not (custid='6750400') ".
    3036        "and not (custid='STAFF') order by cidr");
     
    3541$count = $bad = 0;
    3642while (@data = $sth->fetchrow_array) {
    37   $count++;
    3843  $cidr = new NetAddr::IP $data[0];
    39   if ($cidr->within($priv1) or $cidr->within($priv2) or $cidr->within($priv3)) {
     44  if ($cidr->within($priv1) or $cidr->within($priv2) or $cidr->within($priv3) or
     45        (grep /$data[1]/, @def_custids)) {
    4046    # no-op.  we ignore these.
    4147  } else {
     48    $count++;
    4249    $IDS->execute($data[1]);
    4350    $hr = $IDS->fetchrow_hashref();
Note: See TracChangeset for help on using the changeset viewer.