crypttab.aug | |
USEFUL PRIMITIVES | |
Separators | |
sep_tab | |
comma | |
Generic primitives | |
eol | |
comment | |
empty | |
word | |
optval | |
target | |
fspath | |
ENTRIES | |
comma_sep_list | A comma separated list of options (opt=value or opt) |
record | A crypttab record |
lns | The crypttab lens |
filter |
let sep_tab = Sep.tab
let comma = Sep.comma
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let word = Rx.word
let optval = /[A-Za-z0-9_.:-]+/
let target = Rx.device_name
let fspath = Rx.fspath
A comma separated list of options (opt=value or opt)
let comma_sep_list ( l:string ) = let value = [ label "value" . Util.del_str "=" . store optval ] in
A crypttab record
let record = [ seq "entry" . [ label "target" . store target ] . sep_tab . [ label "device" . store fspath ] . (sep_tab . [ label "password" . store fspath ] . ( sep_tab . comma_sep_list "opt")? )? . eol ]
The crypttab lens
let lns = ( empty | comment | record ) *