Menu

#5 import patch

open
nobody
None
5
2012-07-18
2008-06-24
Anonymous
No

In order to parse my zone files I had to make the following adjustment.

root@ethel /usr/local/www/probind/etc ** Mon Jun 23 21:56:17

diff -wc import~ import

import~ Tue Dec 25 16:46:36 2007
--- import Mon Jun 23 21:17:28 2008
***
1,4 ****
! #!/usr/bin/php -q
<?php

require '../inc/lib.inc';
--- 1,4 ----
! #!/usr/local/bin/php -q
<?php

require '../inc/lib.inc';


115,133 *
break;
}
$mname = $soa[3];
! if ( $soa[6] != '(' ) {
! $serial = $soa[6];
! $refresh = ttl_to_seconds($soa[7]);
! $retry = ttl_to_seconds($soa[8]);
! $expire = ttl_to_seconds($soa[9]);
! $ttl = ttl_to_seconds($soa[10]);
! }
! else {
$serial = $soa[7];
$refresh = ttl_to_seconds($soa[8]);
$retry = ttl_to_seconds($soa[9]);
$expire = ttl_to_seconds($soa[10]);
$ttl = ttl_to_seconds($soa[11]);
}
if ($soa[0] == '@') {
$lastdomain = $origin;
--- 115,140 ----
break;
}
$mname = $soa[3];
! if ( $soa[6] == '(' ) {
$serial = $soa[7];
$refresh = ttl_to_seconds($soa[8]);
$retry = ttl_to_seconds($soa[9]);
$expire = ttl_to_seconds($soa[10]);
$ttl = ttl_to_seconds($soa[11]);
+
+ } elseif ( $soa[4] == '(' ) {
+ $serial = $soa[5];
+ $refresh = ttl_to_seconds($soa[6]);
+ $retry = ttl_to_seconds($soa[7]);
+ $expire = ttl_to_seconds($soa[8]);
+ $ttl = ttl_to_seconds($soa[9]);
+
+ } else {
+ $serial = $soa[6];
+ $refresh = ttl_to_seconds($soa[7]);
+ $retry = ttl_to_seconds($soa[8]);
+ $expire = ttl_to_seconds($soa[9]);
+ $ttl = ttl_to_seconds($soa[10]);
}
if ($soa[0] == '@') {
$lastdomain = $origin;

An example of the zone file header:

;; -- zone --
;; File: zone.ericx.net
;; Author: Charlie Root, ericx@vineyard.net
;; Date: Wed Apr 18 21:33:16 2001
;; Time-stamp: <2008-06-20 22:45:44 ericx>
;; Description: the home zone
;;
;; $Id: ericx.net.zone.base,v 1.21 2008/06/21 02:45:54 ericx Exp $
;; $Log: ericx.net.zone.base,v $
;; Revision 1.21 2008/06/21 02:45:54 ericx
;; Removed an IP from the beginning of the dhcp range
;;
;; Revision 1.20 2008/03/22 20:33:26 ericx
;; Added maude
;;

$TTL 8h

ericx.net. SOA ethel.ericx.net. hostmaster.ericx.net. (
2008062000 ; serial
3h ; refresh Slave now wants a refresh.
1h ; retry Retry interval if slave cannot reach master.
1w ; expire Data is SO OLD slaves will now delete.
8h ; ttl How long ANYONE may cache this record.
)

Discussion

Anonymous
Anonymous

Add attachments
Cancel