Blame lenses/modules_conf.aug
|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Modules_conf
|
|
Packit Service |
a2ae7a |
Parses /etc/modules.conf and /etc/conf.modules
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Based on the similar Modprobe lens
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Not all directives currently listed in modules.conf(5) are currently
|
|
Packit Service |
a2ae7a |
supported.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
module Modules_conf =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let comment = Util.comment
|
|
Packit Service |
a2ae7a |
let empty = Util.empty
|
|
Packit Service |
a2ae7a |
let eol = Util.eol | Util.comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Basic file structure is the same as modprobe.conf *)
|
|
Packit Service |
a2ae7a |
let sto_to_eol = Modprobe.sto_to_eol
|
|
Packit Service |
a2ae7a |
let sep_space = Modprobe.sep_space
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let path = [ key "path" . Util.del_str "=" . sto_to_eol . eol ]
|
|
Packit Service |
a2ae7a |
let keep = [ key "keep" . eol ]
|
|
Packit Service |
a2ae7a |
let probeall = Build.key_value_line_comment "probeall" sep_space
|
|
Packit Service |
a2ae7a |
sto_to_eol
|
|
Packit Service |
a2ae7a |
comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let entry =
|
|
Packit Service |
a2ae7a |
Modprobe.alias
|
|
Packit Service |
a2ae7a |
| Modprobe.options
|
|
Packit Service |
a2ae7a |
| Modprobe.kv_line_command /install|pre-install|post-install/
|
|
Packit Service |
a2ae7a |
| Modprobe.kv_line_command /remove|pre-remove|post-remove/
|
|
Packit Service |
a2ae7a |
| keep
|
|
Packit Service |
a2ae7a |
| path
|
|
Packit Service |
a2ae7a |
| probeall
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let lns = (comment|empty|entry)*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = (incl "/etc/modules.conf") .
|
|
Packit Service |
a2ae7a |
(incl "/etc/conf.modules")
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|