Commit 737d086d authored by Colin Shea's avatar Colin Shea

Allow setting $TTL in individual zones

parent c3c44937
......@@ -219,6 +219,13 @@ class Zone
end
end
# Set the default TTL for this zone. ($TTL in the zonefile)
#
# ttl 3600
def ttl(value)
@zonefile.ttl = value
end
protected
# evaluates a file
......
......@@ -113,7 +113,7 @@ class Zonefile
# global $ORIGIN option
attr :origin
# global $TTL option
attr :ttl
attr_accessor :ttl
@@preserve_name = true
......@@ -417,10 +417,10 @@ class Zonefile
#{self.soa[:origin]} #{self.soa[:ttl]} IN SOA #{self.soa[:primary]} #{self.soa[:email]} (
#{self.soa[:serial]} ; serial number
#{self.soa[:refresh]} ; refresh
#{self.soa[:retry]} ; retry
#{self.soa[:expire]} ; expire
#{self.soa[:minimumTTL]} ; minimum TTL
#{self.soa[:refresh]} ; refresh
#{self.soa[:retry]} ; retry
#{self.soa[:expire]} ; expire
#{self.soa[:minimumTTL]} ; minimum TTL
)
ENDH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment