Index: /trunk/DNSDB/ExportBIND.pm
===================================================================
--- /trunk/DNSDB/ExportBIND.pm	(revision 866)
+++ /trunk/DNSDB/ExportBIND.pm	(revision 867)
@@ -376,8 +376,8 @@
     if ($val->masklen < 16) {
       foreach my $sub ($val->split(16)) {
-        __publish_template_bind($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0);
+        __publish_template_bind($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 'y');
       }
     } else {
-      __publish_template_bind($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0);
+      __publish_template_bind($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 'y');
     }
   } # A+PTR template
@@ -401,8 +401,9 @@
   my $loc = shift;
   my $zone = new NetAddr::IP shift;
-  my $ptrflag = shift || 0;    ##fixme:  default to PTR instead of A record for the BIND variant of this sub?
+  my $revrec = shift || 'y';
+#  my $ptrflag = shift || 0;    ##fixme:  default to PTR instead of A record for the BIND variant of this sub?
 
   # do this conversion once, not (number-of-ips-in-subnet) times
-  my $arpabase = _ZONE($zone, 'ZONE.in-addr.arpa', 'r', '.');
+  my $arpabase = DNSDB::_ZONE($zone, 'ZONE.in-addr.arpa', 'r', '.');
 
   my $iplist = $sub->splitref(32);
@@ -429,15 +430,19 @@
     next if !$rec;
 ##fixme:  trim merged record type voodoo.  "if ($ptrflag) {} else {}" ?
-    if ($ptrflag || $zone->masklen > 24) {
+#    if ($ptrflag || $zone->masklen > 24) {
+    if ($revrec eq 'y' || $zone->masklen > 24) {
 #      print $fh "^$lastoct.$arpabase:$rec:$ttl:$stamp:$loc\n" or die $!;
+##fixme: use $ORIGIN instead?  make the FQDN output switchable-optional?
       print $fh "$lastoct.$arpabase    $ttl    IN      PTR     $rec\n" or die $!;
-      if (!$ptrflag) {
+#      if (!$ptrflag) {
+      if ($revrec ne 'y') {
         # print a separate A record.  Arguably we could use an = record here instead.
 #        print $fh "+$rec:$ip:$ttl:$stamp:$loc\n" or die $!;
+        print $fh "$rec	$ttl	IN	A	$ip\n" or die $!;
       }
     } else {
       # A record, not merged
 #      print $fh "=$rec:$ip:$ttl:$stamp:$loc\n" or die $!;
-      print $fh "$rec  $ttl    IN      A       $ip\n" or die $!;
+      print $fh "$rec	$ttl	IN	A	$ip\n" or die $!;
     }
   }
