~ubuntu-branches/ubuntu/natty/zonecheck/natty

« back to all changes in this revision

Viewing changes to zc/param.rb

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Delafond
  • Date: 2010-10-05 11:42:10 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20101005114210-8atdjx2gp166ijc0
Tags: 3.0.3-1
* New upstream release (Closes: #599169).
* Updated watch file.
* Bumpred-up Standards revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: param.rb,v 1.109 2010/06/21 11:27:38 chabannf Exp $
 
1
# $Id: param.rb,v 1.110 2010/10/04 09:29:50 rpaulmier Exp $
2
2
 
3
3
4
4
# CONTACT     : zonecheck@nic.fr
5
5
# AUTHOR      : Stephane D'Alu <sdalu@nic.fr>
6
6
#
7
7
# CREATED     : 2002/08/02 13:58:17
8
 
# REVISION    : $Revision: 1.109 $ 
9
 
# DATE        : $Date: 2010/06/21 11:27:38 $
 
8
# REVISION    : $Revision: 1.110 $ 
 
9
# DATE        : $Date: 2010/10/04 09:29:50 $
10
10
#
11
11
# CONTRIBUTORS: (see also CREDITS file)
12
12
#
216
216
             ips_str =~ Dnsruby::IPv6::Regex
217
217
            raise ParamError, $mc.get("param:ns_ip") % ips_str
218
218
          end
219
 
          
 
219
 
 
220
          # Canonicalize host names (final dot mandatory)
 
221
          host_str = host_str + '.' unless host_str =~ /.\.$/          
220
222
          host = Dnsruby::Name::create(host_str)
221
223
          ips_str.split(/\s*,\s*|\s+/).each { |str|
222
224
            if str =~ Dnsruby::IPv4::Regex
235
237
               !(entry =~ /^[A-Za-z0-9.-]+$/)
236
238
              raise ParamError, $mc.get("param:ns_name") % entry
237
239
            end
 
240
            # Canonicalize host names (final dot mandatory)
 
241
            entry = entry + '.' unless entry =~ /.\.$/
238
242
            host = Dnsruby::Name::create(entry)
239
243
          end
240
244
          @ns_input << [ host, ips ]