<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 17: managing the TTL in the descrion zone</title><link>https://sourceforge.net/p/ispman/feature-requests/17/</link><description>Recent changes to 17: managing the TTL in the descrion zone</description><atom:link href="https://sourceforge.net/p/ispman/feature-requests/17/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 28 Apr 2003 17:16:32 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/ispman/feature-requests/17/feed.rss" rel="self" type="application/rss+xml"/><item><title>managing the TTL in the descrion zone</title><link>https://sourceforge.net/p/ispman/feature-requests/17/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As I manage dynamic DNS I need to control the TTL of&lt;br /&gt;
the domain and name in the domain.&lt;br /&gt;
Ispman propose to change the minimum entry of the SOA&lt;br /&gt;
but don't use it after that for the NAME entry.&lt;/p&gt;
&lt;p&gt;So I suggest that the writezonefile function use the&lt;br /&gt;
minimum entry as the TTL for each NAME.&lt;/p&gt;
&lt;p&gt;After suggesting that idea in the bad list, I check the&lt;br /&gt;
function. It was clear enough to do the change.  I am&lt;br /&gt;
not a perl developper so the firsts line to get the&lt;br /&gt;
minimum entry are not clean. I copy the code that print&lt;br /&gt;
the SOA entry and put them at the begining of the&lt;br /&gt;
writezonefile (sorry, the perl munger will correct) :&lt;/p&gt;
&lt;p&gt;sub writeZoneFile {&lt;br /&gt;
my $domain=shift;&lt;br /&gt;
open &amp;amp;quot;ZONE&amp;amp;quot;, &amp;amp;quot;&amp;amp;gt;$namedPriDir/$domain&amp;amp;quot; || die &amp;amp;quot;$!&amp;amp;quot;;&lt;br /&gt;
print &amp;amp;quot;Writting zone file for $domain\n&amp;amp;quot;;&lt;br /&gt;
my $soa=$ispman-&amp;amp;gt;getSOA($domain);&lt;/p&gt;
&lt;p&gt;=     for (qw(serial refresh retry expire minimum)) {&lt;br /&gt;
=        $plttl=$soa-&amp;amp;gt;{$_} ;&lt;br /&gt;
=     }&lt;/p&gt;
&lt;p&gt;Now you have the minimum entry in the $plttl var. and&lt;br /&gt;
each time you see &amp;amp;quot;1D&amp;amp;quot; in the the &amp;amp;quot;print ZONE....&amp;amp;quot; you&lt;br /&gt;
change it with $plttl :&lt;/p&gt;
&lt;p&gt;print ZONE join (&amp;amp;quot;\t&amp;amp;quot;, ($_-&amp;amp;gt;{'host'}, $plttl,&lt;br /&gt;
&amp;amp;quot;IN&amp;amp;quot;, &amp;amp;quot;A&amp;amp;quot;, $_-&amp;amp;gt;{'ip'})), &amp;amp;quot;\n&amp;amp;quot;;&lt;/p&gt;
&lt;p&gt;simple enough.&lt;/p&gt;
&lt;p&gt;Sincerely.&lt;/p&gt;
&lt;p&gt;Pierre Léonard&lt;/p&gt;
&lt;p&gt;It's a hack but it work.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 28 Apr 2003 17:16:32 -0000</pubDate><guid>https://sourceforge.netefc72fc993e19437c541e419a72957a04b41399b</guid></item></channel></rss>