Changeset 184
- Timestamp:
- 12/06/11 12:27:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vega-import.pl
r172 r184 81 81 my $recget = $vegadbh->prepare("SELECT record_id,host,type,val,distance,weight,port,ttl,description ". 82 82 "FROM records WHERE domain_id=?"); 83 my $defrecget = $vegadbh->prepare("SELECT record_id,group_id, host, type, val, distance, weight, port, ttl, ".83 my $defrecget = $vegadbh->prepare("SELECT group_id, host, type, val, distance, weight, port, ttl, ". 84 84 "description FROM default_records WHERE group_id=?"); 85 85 … … 101 101 my $newrec = $newdbh->prepare("INSERT INTO records (domain_id,record_id,host,type,val,distance,weight,port,". 102 102 "ttl,description) VALUES (?,?,?,?,?,?,?,?,?,?)"); 103 my $newdefrec = $newdbh->prepare("INSERT INTO default_records ( record_id,group_id,host,type,val,distance,".104 "weight,port,ttl,description) VALUES (?,?,?,?,?,?,?,?,? ,?)");103 my $newdefrec = $newdbh->prepare("INSERT INTO default_records (group_id,host,type,val,distance,". 104 "weight,port,ttl,description) VALUES (?,?,?,?,?,?,?,?,?)"); 105 105 106 106 my $foo = qq( … … 202 202 ## Default records 203 203 print " default records: "; 204 $defrecget->execute($grpid); 204 $defrecget->execute(1); # Vega 1.1.5/1.1.6 do not have default records for all groups; 205 # there is only support for one set of default records coded. 205 206 while (my @rec = $defrecget->fetchrow_array) { 206 $rec[3] = $reverse_typemap{$vegatypes{$rec[3]}}; 207 $rec[0] = $grpid; 208 $rec[2] = $reverse_typemap{$vegatypes{$rec[2]}}; 209 $rec[4] = 0 if !$rec[4]; 207 210 $rec[5] = 0 if !$rec[5]; 208 211 $rec[6] = 0 if !$rec[6]; 209 $rec[7] = 0 if !$rec[7];210 212 $newdefrec->execute(@rec); 211 213 }
Note:
See TracChangeset
for help on using the changeset viewer.