|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Netmasks
|
|
Packit Service |
a2ae7a |
Parses /etc/inet/netmasks on Solaris
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Dominic Cleal <dcleal@redhat.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
This lens tries to keep as close as possible to `man 4 netmasks` where possible.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Licence
|
|
Packit Service |
a2ae7a |
This file is licensed under the LGPL v2+, like the rest of Augeas.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Lens Usage
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to /etc/netmasks and /etc/inet/netmasks. See <filter>.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Netmasks =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: USEFUL PRIMITIVES
|
|
Packit Service |
a2ae7a |
************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: comment *)
|
|
Packit Service |
a2ae7a |
let comment = Util.comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: comment_or_eol *)
|
|
Packit Service |
a2ae7a |
let comment_or_eol = Util.comment_or_eol
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: indent *)
|
|
Packit Service |
a2ae7a |
let indent = Util.indent
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: empty *)
|
|
Packit Service |
a2ae7a |
let empty = Util.empty
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: sep
|
|
Packit Service |
a2ae7a |
The separator for network/mask entries *)
|
|
Packit Service |
a2ae7a |
let sep = Util.del_ws_tab
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: ENTRIES
|
|
Packit Service |
a2ae7a |
************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: entry
|
|
Packit Service |
a2ae7a |
Network / netmask line *)
|
|
Packit Service |
a2ae7a |
let entry = [ seq "network" . indent .
|
|
Packit Service |
a2ae7a |
[ label "network" . store Rx.ipv4 ] . sep .
|
|
Packit Service |
a2ae7a |
[ label "netmask" . store Rx.ipv4 ] . comment_or_eol ]
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* Group: LENS
|
|
Packit Service |
a2ae7a |
************************************************************************)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* View: lns *)
|
|
Packit Service |
a2ae7a |
let lns = ( empty
|
|
Packit Service |
a2ae7a |
| comment
|
|
Packit Service |
a2ae7a |
| entry )*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Variable: filter *)
|
|
Packit Service |
a2ae7a |
let filter = (incl "/etc/netmasks"
|
|
Packit Service |
a2ae7a |
. incl "/etc/inet/netmasks")
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|