aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-08-13 21:08:35 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-08-13 21:08:35 +0300
commit7f0cdfdba61d14f24389baef859f17acca99d884 (patch)
tree05d44d2838997bee1369e3319c30743493fdf438
parent488db18a722fbf80cd4f76af6a82891293551f84 (diff)
downloadcfpeek-7f0cdfdba61d14f24389baef859f17acca99d884.tar.gz
cfpeek-7f0cdfdba61d14f24389baef859f17acca99d884.tar.bz2
Add support for DHCPD configuration files.
* doc/cfpeek.1: Document DHCPD parser. * doc/cfpeek.texi: Likewise. * grecs: Updgrade. * imprimatur: Upgrade. * src/cmdline.opt (--parser): New value: dhcdp.
-rw-r--r--doc/cfpeek.114
-rw-r--r--doc/cfpeek.texi22
m---------grecs0
m---------imprimatur0
-rw-r--r--src/cmdline.opt2
5 files changed, 33 insertions, 5 deletions
diff --git a/doc/cfpeek.1 b/doc/cfpeek.1
index c1e5a9e..ff8ffa9 100644
--- a/doc/cfpeek.1
+++ b/doc/cfpeek.1
@@ -1,5 +1,5 @@
.\" This file is part of cfpeek -*- nroff -*-
-.\" Copyright (C) 2011 Sergey Poznyakoff
+.\" Copyright (C) 2011, 2012 Sergey Poznyakoff
.\"
.\" Cfpeek is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
.\" You should have received a copy of the GNU General Public License
.\" along with cfpeek. If not, see <http://www.gnu.org/licenses/>.
.\"
-.TH CFPEEK 1 "March 30, 2012" "CFPEEK" "Cfpeek User Reference"
+.TH CFPEEK 1 "August 13, 2012" "CFPEEK" "Cfpeek User Reference"
.SH NAME
cfpeek \- retrieve values from a structured configuration file
.SH SYNOPSIS
@@ -133,6 +133,13 @@ See
.BR named.conf (5),
for a detailed description.
.TP
+.B DHCPD
+The format used by \fBdhcpd\fR daemon. It is similar to
+\fBBIND\fR, with a few exceptions.
+See
+.BR dhcpd.conf (5),
+for a detailed description.
+.TP
.B META1
The format used by \fBMeTA1\fR configuration file. Similar to
\fBGRECS\fR, in some aspects. The most prominent differences are:
@@ -388,6 +395,9 @@ Format used by \fBMeTA1\fR configuration file. See
.B BIND
Format used by \fBnamed\fR. See
.BR named.conf (5)
+.B DHCPD
+Format used by \fBdhcpd\fR. See
+.BR dhcpd.conf (5)
.TP
.B GIT
Format used by \fBgit\fR configuration files. See the section
diff --git a/doc/cfpeek.texi b/doc/cfpeek.texi
index a29fbef..f2eae83 100644
--- a/doc/cfpeek.texi
+++ b/doc/cfpeek.texi
@@ -110,6 +110,7 @@ Supported Configuration File Formats
* grecs::
* path::
* bind::
+* dhcpd::
* meta1::
* git::
@@ -548,7 +549,7 @@ identifier @var{id}.
@kwindex sibling
Similarly, the @code{sibling} keyword instructs @command{cfpeek} to
find first sibling of the current node wich has the given identifier.
-For example, to find the names of zone files for all master nodes in
+For example, to find names of the zone files for all master nodes in
the @file{named.conf} file:
@example
@@ -757,6 +758,7 @@ please let us know (@pxref{Reporting Bugs}).
* grecs::
* path::
* bind::
+* dhcpd::
* meta1::
* git::
@end menu
@@ -844,6 +846,19 @@ produces
(127.0.0.1, 127.0.0.2), keys, (rndc-key))
@end example
+@node dhcpd
+@section DHCPD Configuration File
+@cindex dhcpd configuration format
+This is the format used by the @sc{isc} @sc{dhcpd} configuration
+files (@file{/etc/dhcpd.conf} and any files it might include).
+It is very similar to @samp{Bind}, with some minor differences:
+
+@itemize @bullet
+@item Block statements do not end with a semicolon.
+@item Tags or values can contain lists of quoted strings delimited by
+commas.
+@end itemize
+
@node meta1
@section MeTA1 Configuration File
@cindex MeTA1 configuration format
@@ -1168,8 +1183,9 @@ Output at most @var{number} matches for each key.
@item -p
@itemx --parser=@var{type}
Set parser type for the input file. The argument is one of:
-@samp{grecs}, @samp{path}, @samp{meta1}, @samp{bind} and @samp{git}
-(case-insensitive). @xref{Formats}, for a description of each type.
+@samp{grecs}, @samp{path}, @samp{meta1}, @samp{bind}, @samp{dhcpd},
+and @samp{git} (case-insensitive). @xref{Formats}, for a description
+of each type.
@opsummary{reduce,r}
@item -r
diff --git a/grecs b/grecs
-Subproject 84009ba4cd4246be9def916554e0b9856124477
+Subproject 0b44dc8fcb5c4a4d4b8c7e74a90d8bda602ed22
diff --git a/imprimatur b/imprimatur
-Subproject f32ef1983968e755cd580b06e369476d7e7f88b
+Subproject 04255b6d5551952b4e0c94da15988f573e3e9fc
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 941c20f..55bc403 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -230,6 +230,8 @@ BEGIN
grecs_parser_fun = grecs_meta1_parser;
else if (strcasecmp(optarg, "BIND") == 0)
grecs_parser_fun = grecs_bind_parser;
+ else if (strcasecmp(optarg, "DHCPD") == 0)
+ grecs_parser_fun = grecs_dhcpd_parser;
else if (strcasecmp(optarg, "GIT") == 0)
grecs_parser_fun = grecs_git_parser;
else if (strcasecmp(optarg, "PATH") == 0)

Return to:

Send suggestions and report system problems to the System administrator.