mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
man: use configured dhcpd.conf and dhcpd.leases paths
Making dhcpd.conf and dhcpd.leases file references being dynamic causes manual contents being replaced at compile time, so make some other data items dynamic as well. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
822ca33804
commit
c48a8d411f
4 changed files with 52 additions and 43 deletions
58
configure.ac
58
configure.ac
|
|
@ -6,6 +6,8 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_INIT([dhcpd-pools],
|
AC_INIT([dhcpd-pools],
|
||||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||||
[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
|
[kerolasa@iki.fi],,[http://dhcpd-pools.sourceforge.net/])
|
||||||
|
PACKAGE_MAINTAINER="Sami Kerola"
|
||||||
|
AC_SUBST([PACKAGE_MAINTAINER])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz -Wextra-portability])
|
AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz -Wextra-portability])
|
||||||
AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
|
AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
|
||||||
|
|
@ -83,12 +85,6 @@ if test x$have_builtin_expect = xyes ; then
|
||||||
AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.])
|
AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
|
||||||
lib/Makefile
|
|
||||||
man/Makefile
|
|
||||||
src/Makefile
|
|
||||||
contrib/Makefile])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether program_invocation_short_name is defined)
|
AC_MSG_CHECKING(whether program_invocation_short_name is defined)
|
||||||
AC_TRY_COMPILE([#include <argp.h>],
|
AC_TRY_COMPILE([#include <argp.h>],
|
||||||
[program_invocation_short_name = "test";],
|
[program_invocation_short_name = "test";],
|
||||||
|
|
@ -104,21 +100,39 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
|
||||||
AC_MSG_RESULT(yes),
|
AC_MSG_RESULT(yes),
|
||||||
AC_MSG_RESULT(no))
|
AC_MSG_RESULT(no))
|
||||||
|
|
||||||
AC_ARG_WITH(dhcpd-conf,
|
AC_ARG_WITH([dhcpd-conf],
|
||||||
[AC_HELP_STRING([--with-dhcpd-conf], [default path of dhcpd.conf])],
|
[AC_HELP_STRING([--with-dhcpd-conf=FILE], [default path of dhcpd.conf])],
|
||||||
AC_DEFINE_UNQUOTED(DHCPDCONF_FILE,"$withval"),
|
[dhcpd_conf_path="$withval"],
|
||||||
AC_DEFINE(DHCPDCONF_FILE,["/etc/dhcpd.conf"],[default path of dhcpd.conf]))
|
[dhcpd_conf_path="/etc/dhcpd.conf"])
|
||||||
AC_ARG_WITH(dhcpd-leases,
|
AC_DEFINE_UNQUOTED([DHCPDCONF_FILE], ["$dhcpd_conf_path"], [default path of dhcpd.conf])
|
||||||
[AC_HELP_STRING([--with-dhcpd-leases], [default path of dhcpd.leases])],
|
AC_SUBST([DHCPDCONF_FILE], [$dhcpd_conf_path])
|
||||||
AC_DEFINE_UNQUOTED(DHCPDLEASE_FILE,"$withval"),
|
|
||||||
AC_DEFINE(DHCPDLEASE_FILE,["/var/lib/dhcp/dhcpd.leases"],[default path of dhcpd.leases]))
|
AC_ARG_WITH([dhcpd-leases],
|
||||||
AC_ARG_WITH(output-format,
|
[AC_HELP_STRING([--with-dhcpd-leases=FILE], [default path of dhcpd.leases])],
|
||||||
[AC_HELP_STRING([--with-output-format], [default output format])],
|
[dhcpd_leases_path="$withval"],
|
||||||
AC_DEFINE_UNQUOTED(OUTPUT_FORMAT,"$withval"),
|
[dhcpd_leases_path="/var/lib/dhcp/dhcpd.leases"])
|
||||||
AC_DEFINE(OUTPUT_FORMAT,["text"],[default output format]))
|
AC_DEFINE_UNQUOTED([DHCPDLEASE_FILE], ["$dhcpd_leases_path"], [default path of dhcpd.leases])
|
||||||
AC_ARG_WITH(output-limit,
|
AC_SUBST([DHCPDLEASE_FILE], [$dhcpd_leases_path])
|
||||||
[AC_HELP_STRING([--with-output-limit], [default output limitations])],
|
|
||||||
AC_DEFINE_UNQUOTED(OUTPUT_LIMIT,"$withval"),
|
AC_ARG_WITH([output-format],
|
||||||
AC_DEFINE(OUTPUT_LIMIT,["77"],[default output limitations]))
|
[AC_HELP_STRING([--with-output-format=FORMAT], [default output format])],
|
||||||
|
[output_format="$withval"],
|
||||||
|
[output_format="text"])
|
||||||
|
AC_DEFINE_UNQUOTED([OUTPUT_FORMAT], ["$output_format"], [default output format])
|
||||||
|
AC_SUBST([OUTPUT_FORMAT], [$output_format])
|
||||||
|
|
||||||
|
AC_ARG_WITH([output-limit],
|
||||||
|
[AC_HELP_STRING([--with-output-limit=MASK], [default output limit])],
|
||||||
|
[output_limit="$withval"],
|
||||||
|
[output_limit="77"])
|
||||||
|
AC_DEFINE_UNQUOTED([OUTPUT_LIMIT], ["$output_limit"], [default output limit])
|
||||||
|
AC_SUBST([OUTPUT_LIMIT], [$output_limit])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile
|
||||||
|
lib/Makefile
|
||||||
|
man/Makefile
|
||||||
|
man/dhcpd-pools.1
|
||||||
|
src/Makefile
|
||||||
|
contrib/Makefile])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
||||||
1
man/.gitignore
vendored
Normal file
1
man/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/dhcpd-pools.1
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
## Process this file with automake to produce Makefile.in
|
|
||||||
|
|
||||||
man_MANS = dhcpd-pools.1
|
man_MANS = dhcpd-pools.1
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = dhcpd-pools.1.in
|
||||||
MAINTAINERCLEANFILES = $(man_MANS)
|
CLEANFILES = dhcpd-pools.1
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,4 @@
|
||||||
.\" Sami Kerola
|
.TH DHCPD-POOLS "1" "2012-11-25" "@PACKAGE_STRING@" "User Commands"
|
||||||
.\" http://www.iki.fi/kerolasa/
|
|
||||||
.\" kerolasa@iki.fi
|
|
||||||
.\"
|
|
||||||
.\" Add'l ontributions by:
|
|
||||||
.\" Dan Thorson
|
|
||||||
.\"
|
|
||||||
.TH DHCPD-POOLS "1" "October 2012" "dhcpd-pools" "User Commands"
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
dhcpd-pools \- ISC dhcpd pools usage analysis
|
dhcpd-pools \- ISC dhcpd pools usage analysis
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
@ -63,15 +56,15 @@ Path to the dhcpd.leases file.
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR
|
\fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR
|
||||||
Sort ranges by chosen fields as a sorting keys. Maximum of five sort keys
|
Sort ranges by chosen fields as a sorting keys. Maximum of five sort keys
|
||||||
can be defined. Keys weight from left to right i.e. if more weighting keys
|
can be defined. Keys weight from left to right, i.e., if more weighting keys
|
||||||
are equal next one is used. The IP field is default sort key.
|
are equal next one is used. The IP field is default sort key.
|
||||||
.TP
|
.TP
|
||||||
\fB\-r\fR, \fB\-\-reverse\fR
|
\fB\-r\fR, \fB\-\-reverse\fR
|
||||||
Sort results in reverse order.
|
Sort results in reverse order.
|
||||||
.TP
|
.TP
|
||||||
\fB\-f\fR, \fB\-\-format\fR=\fI[thHcxX]\fR
|
\fB\-f\fR, \fB\-\-format\fR=\fI[thHcxX]\fR
|
||||||
Output format. The default is
|
Output format.
|
||||||
text
|
Text
|
||||||
.RI ( t ).
|
.RI ( t ).
|
||||||
Standard html
|
Standard html
|
||||||
.RI ( h )
|
.RI ( h )
|
||||||
|
|
@ -85,6 +78,9 @@ stands for comma-separated values. Output format xml
|
||||||
is similar to the dhcpstatus Perl module output. The extended xml
|
is similar to the dhcpstatus Perl module output. The extended xml
|
||||||
.RI ( X )
|
.RI ( X )
|
||||||
format will print ethernet address details.
|
format will print ethernet address details.
|
||||||
|
.IP
|
||||||
|
The default format is
|
||||||
|
.IR @OUTPUT_FORMAT@ .
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
|
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
|
||||||
.I File
|
.I File
|
||||||
|
|
@ -103,7 +99,7 @@ The first digit determines which headers to display, and the second digit
|
||||||
determines which numeric analysis tables to include in the output. The
|
determines which numeric analysis tables to include in the output. The
|
||||||
following values are "OR'd" together to create the desired output. The
|
following values are "OR'd" together to create the desired output. The
|
||||||
default is
|
default is
|
||||||
.IR 77 .
|
.IR @OUTPUT_LIMIT@ .
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.PD 0
|
.PD 0
|
||||||
|
|
@ -176,10 +172,10 @@ $ dhcpd-pools -c dhcpd.conf -l dhcpd.leases --critical 80.1 --warning 75
|
||||||
CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4
|
CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
/etc/dhcpd.conf
|
@DHCPDCONF_FILE@
|
||||||
ISC dhcpd configuration file.
|
ISC dhcpd configuration file.
|
||||||
.TP
|
.TP
|
||||||
/var/lib/dhcp/dhcpd.leases
|
@DHCPDLEASE_FILE@
|
||||||
ISC dhcpd lease file.
|
ISC dhcpd lease file.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Written by Sami Kerola.
|
Written by Sami Kerola.
|
||||||
|
|
@ -189,11 +185,11 @@ XML support by Dominic Germain, Sogetel inc.
|
||||||
The software has FreeBSD License.
|
The software has FreeBSD License.
|
||||||
.SH "REPORTING BUGS"
|
.SH "REPORTING BUGS"
|
||||||
Report bugs to
|
Report bugs to
|
||||||
.MT kerolasa@iki.fi
|
.MT @PACKAGE_BUGREPORT@
|
||||||
Sami Kerola
|
@PACKAGE_MAINTAINER@
|
||||||
.ME
|
.ME
|
||||||
.br
|
.br
|
||||||
.UR http://dhcpd-pools.sourceforge.net/
|
.UR @PACKAGE_URL@
|
||||||
Home page
|
Home page
|
||||||
.UE
|
.UE
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue