Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / crypttab.aug
index 19b1163..8c9409b 100644 (file)
@@ -1,4 +1,4 @@
-(* -*- coding: utf-8 -*-
+(*
 Module: Crypttab
   Parses /etc/crypttab from the cryptsetup package.
 
@@ -8,7 +8,7 @@ About: Reference
   This lens tries to keep as close as possible to `man crypttab` where possible.
 
 About: License
-  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
   Sample usage of this lens in augtool
@@ -58,7 +58,7 @@ module Crypttab =
   let word    = Rx.word
 
    (* Variable: optval *)
-  let optval  = /[A-Za-z0-9_.:-]+/
+  let optval  = /[A-Za-z0-9\/_.:-]+/
 
   (* Variable: target *)
   let target  = Rx.device_name
@@ -66,6 +66,9 @@ module Crypttab =
   (* Variable: fspath *)
   let fspath  = Rx.fspath
 
+  (* Variable: uuid *)
+  let uuid = /UUID=[0-9a-f-]+/
+
   (************************************************************************
    * Group:                       ENTRIES
    *************************************************************************)
@@ -86,7 +89,7 @@ module Crypttab =
 
   let record = [ seq "entry" .
                    [ label "target" . store target ] . sep_tab .
-                   [ label "device" . store fspath ] .
+                   [ label "device" . store (fspath|uuid) ] .
                    (sep_tab . [ label "password" . store fspath ] .
                     ( sep_tab . comma_sep_list "opt")? )?
                  . eol ]
@@ -101,3 +104,5 @@ module Crypttab =
   let filter = (incl "/etc/crypttab")
 
   let xfm = transform lns filter
+
+(* coding: utf-8 *)