Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / resolv.aug
index f1b7af2..30ed713 100644 (file)
@@ -8,7 +8,7 @@ About: Reference
   This lens tries to keep as close as possible to `man resolv.conf` where possible.
 
 About: Licence
-  This file is licensed under the LGPLv2+, like the rest of Augeas.
+  This file is licensed under the LGPL v2+, like the rest of Augeas.
 
 About: Lens Usage
 
@@ -30,7 +30,7 @@ let comment = Util.comment_generic /[ \t]*[;#][ \t]*/ "# "
 let comment_eol = Util.comment_generic /[ \t]*[;#][ \t]*/ " # "
 
 (* View: empty *)
-let empty = Util.empty
+let empty = Util.empty_generic_dos /[ \t]*[#;]?[ \t]*/
 
 
 (************************************************************************
@@ -41,8 +41,8 @@ let empty = Util.empty
 A network mask for IP addresses *)
 let netmask = [ label "netmask" . Util.del_str "/" . store Rx.ip ]
 
-(* View: ipaddr 
-An IP address or range with an optional mask *) 
+(* View: ipaddr
+An IP address or range with an optional mask *)
 let ipaddr = [label "ipaddr" . store Rx.ip . netmask?]
 
 
@@ -58,7 +58,7 @@ let domain = Build.key_value_line_comment
 (* View: search *)
 let search = Build.key_value_line_comment
                     "search" Sep.space
-                    (Build.opt_list 
+                    (Build.opt_list
                            [label "domain" . store Rx.word]
                             Sep.space)
                     comment_eol
@@ -68,26 +68,49 @@ let sortlist = Build.key_value_line_comment
                     "sortlist" Sep.space
                     (Build.opt_list
                            ipaddr
-                           Sep.space) 
+                           Sep.space)
                     comment_eol
 
+(* View: lookup *)
+let lookup =
+  let lookup_entry = Build.flag("bind"|"file"|"yp")
+    in Build.key_value_line_comment
+             "lookup" Sep.space
+             (Build.opt_list
+                    lookup_entry
+                    Sep.space)
+             comment_eol
+
+(* View: family *)
+let family =
+  let family_entry = Build.flag("inet4"|"inet6")
+    in Build.key_value_line_comment
+             "family" Sep.space
+             (Build.opt_list
+                    family_entry
+                    Sep.space)
+             comment_eol
+
 (************************************************************************
  * Group:                 SPECIAL OPTIONS
  *************************************************************************)
 
 (* View: ip6_dotint
      ip6-dotint option, which supports negation *)
-let ip6_dotint = 
+let ip6_dotint =
   let negate = [ del "no-" "no-" . label "negate" ]
     in [ negate? . key "ip6-dotint" ]
 
-(* View: options 
+(* View: options
      Options values *)
 let options =
-      let options_entry = Build.key_value ("ndots"|"timeout"|"attempts") 
+      let options_entry = Build.key_value ("ndots"|"timeout"|"attempts")
                                           (Util.del_str ":") (store Rx.integer)
                         | Build.flag ("debug"|"rotate"|"no-check-names"
-                                     |"inet6"|"ip6-bytestring"|"edns0")
+                                     |"inet6"|"ip6-bytestring"|"edns0"
+                                     |"single-request"|"single-request-reopen"
+                                     |"no-tld-query"|"use-vc"|"no-reload"
+                                     |"trust-ad")
                         | ip6_dotint
 
             in Build.key_value_line_comment
@@ -103,13 +126,13 @@ let entry = nameserver
           | search
           | sortlist
           | options
+          | lookup
+          | family
 
 (* View: lns *)
 let lns = ( empty | comment | entry )*
 
 (* Variable: filter *)
 let filter = (incl "/etc/resolv.conf")
-    . Util.stdexcl
 
 let xfm = transform lns filter
-