Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1
netcf
routes_lens.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File routes_lens.patch of Package netcf
From:Patrick Mullaney <pmullaney@novell.com> netcf: add routes lens for sysconfig routing info Signed-off-by: Patrick Mullaney <pmullaney@novell.com> --- data/lenses/routes.aug | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 data/lenses/routes.aug diff --git a/data/lenses/routes.aug b/data/lenses/routes.aug new file mode 100644 index 0000000..3e26d51 --- /dev/null +++ b/data/lenses/routes.aug @@ -0,0 +1,30 @@ +(* +Module: Routes + Parses /etc/sysconfig/network/routes +*) +module Routes = +autoload xfm + +let comment = Util.comment +let empty = Util.empty +let eol = Util.eol | Util.comment + +(* Anything that's not a separator is part of a token *) +let tok_ch = /[^ \t\n#\\",]|\\\\[^ \t\n]/ +let indent = Util.del_ws " " + +let token = store tok_ch+ +let route_token = /[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+/ +let mask_token = /[0-9]+/ + +let column(n:string) = [ label n . token ] + +let default_route = [ key /default/ . indent . column "gateway" . indent . column "netmask" . indent . column "device" . eol ] +let route_entry = [ key route_token . del "/" "/" . [ key mask_token . indent . column "gateway" . indent . column "netmask" . indent . column "device" . eol ] ] + +let lns = (comment|empty| default_route | route_entry )* + +let filter = incl "/etc/sysconfig/network/routes" . + Util.stdexcl + +let xfm = transform lns filter
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor