Update upstream source from tag 'upstream/2.3.2'
Update to upstream version '2.3.2'
with Debian dir b1209ab07c
This commit is contained in:
commit
ea1902b0da
104 changed files with 34386 additions and 7430 deletions
1
AUTHORS
1
AUTHORS
|
|
@ -23,3 +23,4 @@ Holger Weiss
|
|||
Michael Wirtgen
|
||||
Oliver Skibbe
|
||||
Andreas Baumann
|
||||
Lorenz Kästle
|
||||
|
|
|
|||
320
INSTALL
320
INSTALL
|
|
@ -1,8 +1,8 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||
Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
@ -12,97 +12,96 @@ without warranty of any kind.
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
Briefly, the shell command './configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the 'README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
'INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
The 'configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
those values to create a 'Makefile' in each directory of the package.
|
||||
It may also create one or more '.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script 'config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
file 'config.log' containing compiler output (useful mainly for
|
||||
debugging 'configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
It can also use an optional file (typically called 'config.cache' and
|
||||
enabled with '--cache-file=config.cache' or simply '-C') that saves the
|
||||
results of its tests to speed up reconfiguring. Caching is disabled by
|
||||
default to prevent problems with accidental use of stale cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
to figure out how 'configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the 'README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
some point 'config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
The file 'configure.ac' (or 'configure.in') is used to create
|
||||
'configure' by a program called 'autoconf'. You need 'configure.ac' if
|
||||
you want to change it or regenerate 'configure' using a newer version of
|
||||
'autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
1. 'cd' to the directory containing the package's source code and type
|
||||
'./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
Running 'configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
2. Type 'make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
3. Optionally, type 'make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
4. Type 'make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
user, and only the 'make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
5. Optionally, type 'make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
regular user, particularly if the prior 'make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
source code directory by typing 'make clean'. To also remove the
|
||||
files that 'configure' created (so you can compile the package for
|
||||
a different kind of computer), type 'make distclean'. There is
|
||||
also a 'make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
7. Often, you can also type 'make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
8. Some packages, particularly those that use Automake, provide 'make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
targets like 'make install' and 'make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
the 'configure' script does not know about. Run './configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
You can give 'configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here is
|
||||
an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
|
|
@ -113,21 +112,21 @@ Compiling For Multiple Architectures
|
|||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
own directory. To do this, you can use GNU 'make'. 'cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
the 'configure' script. 'configure' automatically checks for the source
|
||||
code in the directory that 'configure' is in and in '..'. This is known
|
||||
as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
With a non-GNU 'make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
installed the package for one architecture, use 'make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
"universal" binaries--by specifying multiple '-arch' options to the
|
||||
compiler but only a single '-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
|
|
@ -136,105 +135,104 @@ this:
|
|||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
using the 'lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
By default, 'make install' installs the package's commands under
|
||||
'/usr/local/bin', include files under '/usr/local/include', etc. You
|
||||
can specify an installation prefix other than '/usr/local' by giving
|
||||
'configure' the option '--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
options like '--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run 'configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the default
|
||||
for these options is expressed in terms of '${prefix}', so that
|
||||
specifying just '--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
correct locations to 'configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
'make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
affected directory. For example, 'make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
'${prefix}'. Any directories that were specified during 'configure',
|
||||
but not in terms of '${prefix}', must each be overridden at install time
|
||||
for the entire installation to be relocated. The approach of makefile
|
||||
variable overrides for each directory variable is required by the GNU
|
||||
Coding Standards, and ideally causes no recompilation. However, some
|
||||
platforms have known limitations with the semantics of shared libraries
|
||||
that end up requiring recompilation when using this method, particularly
|
||||
noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
The second method involves providing the 'DESTDIR' variable. For
|
||||
example, 'make install DESTDIR=/alternate/directory' will prepend
|
||||
'/alternate/directory' before all installation names. The approach of
|
||||
'DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
when some directory options were not specified in terms of '${prefix}'
|
||||
at 'configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
with an extra prefix or suffix on their names by giving 'configure' the
|
||||
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
Some packages pay attention to '--enable-FEATURE' options to
|
||||
'configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
|
||||
is something like 'gnu-as' or 'x' (for the X Window System). The
|
||||
'README' should mention any '--enable-' and '--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
For packages that use the X Window System, 'configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
you can use the 'configure' options '--x-includes=DIR' and
|
||||
'--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
execution of 'make' will be. For these packages, running './configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
overridden with 'make V=1'; while running './configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
overridden with 'make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
|
||||
is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
HP-UX 'make' updates targets which have the same time stamps as their
|
||||
prerequisites, which makes it generally unusable when shipped generated
|
||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
|
||||
workaround. If GNU CC is not installed, it is therefore recommended to
|
||||
try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
|
|
@ -242,26 +240,26 @@ and if that doesn't work, try
|
|||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
||||
in your 'PATH', put it _after_ '/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
On Haiku, software installed for all users goes in '/boot/common',
|
||||
not '/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
There may be some features 'configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
_same_ architectures, 'configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
'--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as 'sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
|
|
@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
|
|||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
See the file 'config.sub' for the possible values of each field. If
|
||||
'config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
use the option '--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
eventually be run) with '--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
If you want to set default values for 'configure' scripts to share,
|
||||
you can create a site shell script called 'config.site' that gives
|
||||
default values for variables like 'CC', 'cache_file', and 'prefix'.
|
||||
'configure' looks for 'PREFIX/share/config.site' if it exists, then
|
||||
'PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
'CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all 'configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
environment passed to 'configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
them in the 'configure' command line, using 'VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
causes the specified 'gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
|
||||
Autoconf limitation. Until the limitation is lifted, you can use this
|
||||
workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
'configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
'configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
'--help'
|
||||
'-h'
|
||||
Print a summary of all of the options to 'configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
'--help=short'
|
||||
'--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
'configure', and exit. The 'short' variant lists options used only
|
||||
in the top level, while the 'recursive' variant lists options also
|
||||
present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
'--version'
|
||||
'-V'
|
||||
Print the version of Autoconf used to generate the 'configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
'--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
traditionally 'config.cache'. FILE defaults to '/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
'--config-cache'
|
||||
'-C'
|
||||
Alias for '--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
'--quiet'
|
||||
'--silent'
|
||||
'-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
suppress all normal output, redirect it to '/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
'--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
'configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
'--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names:: for
|
||||
more details, including other options available for fine-tuning the
|
||||
installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
'--no-create'
|
||||
'-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
'configure' also accepts some other, not widely useful, options. Run
|
||||
'configure --help' for more details.
|
||||
|
|
|
|||
401
Makefile.in
401
Makefile.in
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -15,23 +14,61 @@
|
|||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -50,15 +87,6 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/test.pl.in $(top_srcdir)/configure \
|
||||
$(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS THANKS build-aux/compile \
|
||||
build-aux/config.guess build-aux/config.rpath \
|
||||
build-aux/config.sub build-aux/depcomp build-aux/install-sh \
|
||||
build-aux/ltmain.sh build-aux/missing build-aux/mkinstalldirs \
|
||||
config.rpath mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -161,21 +189,36 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = test.pl pkg/solaris/pkginfo
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
|
@ -183,12 +226,49 @@ am__can_run_installinfo = \
|
|||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir distdir-am dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
|
||||
config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/test.pl.in $(top_srcdir)/build-aux/compile \
|
||||
$(top_srcdir)/build-aux/config.guess \
|
||||
$(top_srcdir)/build-aux/config.rpath \
|
||||
$(top_srcdir)/build-aux/config.sub \
|
||||
$(top_srcdir)/build-aux/install-sh \
|
||||
$(top_srcdir)/build-aux/ltmain.sh \
|
||||
$(top_srcdir)/build-aux/missing \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs \
|
||||
$(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS README THANKS build-aux/compile \
|
||||
build-aux/config.guess build-aux/config.rpath \
|
||||
build-aux/config.sub build-aux/install-sh build-aux/ltmain.sh \
|
||||
build-aux/missing build-aux/mkinstalldirs config.rpath \
|
||||
mkinstalldirs
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
|
@ -198,6 +278,7 @@ am__remove_distdir = \
|
|||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
|
|
@ -225,6 +306,9 @@ am__relativize = \
|
|||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
|
|
@ -234,6 +318,7 @@ ACLOCAL = @ACLOCAL@
|
|||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1359,6 +1444,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1402,15 +1488,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1423,8 +1508,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
|
|
@ -1451,22 +1536,25 @@ distclean-libtool:
|
|||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
|
|
@ -1481,57 +1569,12 @@ $(RECURSIVE_TARGETS):
|
|||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
|
|
@ -1547,12 +1590,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1564,15 +1602,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1581,11 +1615,36 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
|
|
@ -1653,41 +1712,47 @@ distdir: $(DISTFILES)
|
|||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zstd: distdir
|
||||
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
|
|
@ -1695,11 +1760,9 @@ dist dist-all: distdir
|
|||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
|
|
@ -1707,24 +1770,27 @@ distcheck: dist
|
|||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
|
|
@ -1745,7 +1811,7 @@ distcheck: dist
|
|||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
|
|
@ -1880,25 +1946,26 @@ ps-am:
|
|||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
|
||||
dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
#
|
||||
|
|
|
|||
93
NEWS
93
NEWS
|
|
@ -1,5 +1,96 @@
|
|||
This file documents the major additions and syntax changes between releases.
|
||||
|
||||
2.3.2 20th Oct 2022
|
||||
GENERAL
|
||||
Use netcat-openbsd for debian explicitely (by @RincewindsHat #1704)
|
||||
Replace egrep with grep -E (by @RincewindsHat #1791)
|
||||
Use silent automake by default (by @RincewindsHat #1747)
|
||||
|
||||
SINGLE PLUGINS
|
||||
check_by_ssh: added option to exit with an warning, if there is output on STDERR (by @nafets #1301)
|
||||
check_by_ssh: Add "-U" flag (#1123). (by @archiecobbs #1774)
|
||||
check_by_ssh: Let ssh decide if a host is valid, enables usage of ssh .config file (by @RincewindsHat #1691)
|
||||
check_curl: Add an option to check_curl to verify the peer certificate & host using the system CA's (by @bazzisoft #1669)
|
||||
check_curl: fixed -ffollow for HTTP/2.0 (Fixes #1685): added major_version parsing to PicoHTTPParser (by @andreasbaumann #1742)
|
||||
check_curl: fixes check_curl: "CRITICAL - Cannot retrieve certificate subject." (by @andreasbaumann #1689)
|
||||
check_curl: fix if http header contains leading spaces (by @sni #1666)
|
||||
check_curl: Update check_curl.c to display a specific human-readable error message where possible (by @bazzisoft #1668)
|
||||
check_curl: verify certificates option should not force SSL to be used (by @bazzisoft #1688)
|
||||
check_disk: Description for -M was the wrong way around (by @RincewindsHat #1746)
|
||||
check_disk: Fixing the stuff that is broken on btrfs (by @waja #1388)
|
||||
check_disk: Fix perfdata for big values for check disk (by @RincewindsHat #1714)
|
||||
check_disk_smb: Add configfile feature (by @Napsty #1402)
|
||||
check_disk_smb: Add timeout (by @cdruee #1770)
|
||||
check_dns: Add --expect-nxdomain (by @Jonny007-MKD #1623)
|
||||
check_dns: split multiple IP addresses passed in one -a argument (by @DerDakon #1649)
|
||||
check_file_age: Make size parameter a little bit more intelligible (by @RincewindsHat #1730)
|
||||
check_fping: Implements 'host-alive' mode (Closes. #1027) (by @waja #1740)
|
||||
check_game: Update Url to qstat (by @RincewindsHat #1725)
|
||||
check_http: changed 'STATE_CRITICAL' to 'STATE_WARNING' for infinite loop (by @xFuture603 #1690)
|
||||
check_http: Increase regexp limit (by @hydrapolic #1566)
|
||||
check_http: Support http redirect (by @waja #1449)
|
||||
check_icmp: buffer offerflow (by @RincewindsHat #1733)
|
||||
check_icmp: delay set_source_ip() until address_family is detected (by @ghciv6 #1735)
|
||||
check_icmp: Fix "Invalid Argument" from sendmsg() under FreeBSD 13.1 and "setsockopt failed" for TTL setting (by @eriksejr #1771)
|
||||
check_icmp: Fix pkt perfdata in check_host mode (by @sjoegren #1721)
|
||||
check_ldap: Allows check_ldap to read password from environment variable (by @mullumaus #1724)
|
||||
check_load: add LOAD prefix to load plugin (by @haraldj #1694)
|
||||
check_load: Display total and scaled load values if check_load scales the values (by number of CPUs by @RincewindsHat #1778)
|
||||
check_log: Missing oldlog now aborts check_log (by @RincewindsHat #1732)
|
||||
check_mailq: Add mailq -C option for config dir or config file (by @leeclemens #1490)
|
||||
check_mailq: Check mailq domain specific warnings (by @RincewindsHat #1731)
|
||||
check_mailq: Fix regexp for nullmailer "mailq" output (by @darksoul42 #1493)
|
||||
check_mysql: fix segfaults with mysql-connector-c #1562 (by @ghciv6 #1644)
|
||||
check_pgsql: add --queryname parameter to check_pgsql (by @datamuc #1741)
|
||||
check_ping: Do not show RTA if no connection was possible (by @RincewindsHat #1697)
|
||||
check_ping: understang ping6 output from iputils package (by @glensc #1412)
|
||||
check_proc: Fix check proc ps detection (by @sni #1712)
|
||||
check_procs: exchange needle and haystack in strstr() for proper st… (by @wolfgangkarall #1654)
|
||||
check_smtp: add -L flag to support LMTP (LHLO instead of HELO/EHLO). (by @ghen2 #1715)
|
||||
check_snmp: Added option for null zero length string exit codes (by @FracKenA #1496)
|
||||
check_snmp: fix performance thresholds when using multiple oids (by @sni #1722)
|
||||
check_snmp fix segfaults (by @adrb #1589)
|
||||
check_snmp: put the "c" (to mark a counter) after the perfdata value (by @lausser #1465)
|
||||
check_swap: fix parsing swap values (by @sni #1780)
|
||||
check_swap: Fix perfdata for check swap (by @RincewindsHat #1707)
|
||||
check_swap: Fix unit for total in perfdata (by @RincewindsHat #1779)
|
||||
check_swap: Handle cached swap (by @mdavranche #1642)
|
||||
check_swap: Small fix to threshold validation and style (indentation) fixes (by @RincewindsHat #1723)
|
||||
check_ups: Fix possible overflow in check_ups (by @phibos #1727)
|
||||
check_uptime: Add option to report uptime in days instead of seconds (by @amotl #1750)
|
||||
check_uptime: Fix/improve output message "Uptime is ..." (by @amotl #1751)
|
||||
|
||||
MULTIPLE PLUGINS
|
||||
check_http, check_curl: added --max-redirs=N option (feature #1684) (by @andreasbaumann #1744)
|
||||
check_http, check_curl: Enhancement --continue-after-certificate (backport from nagios-plugins) (by @andreasbaumann #1762)
|
||||
check_http, check_curl: Remove check_http and check_curl test which are somehow always failing (by @RincewindsHat #1777)
|
||||
check_log, check_oracle, check_sensors: Several fixes shellcheck complaining about (by @waja #1459)
|
||||
sslutils: use chain from client certificates (by @tobiaswiese #1664)
|
||||
|
||||
NON FUNCTIONAL CHANGES
|
||||
Trivial source code whitespace formatting fixes to standard. (by @ziesemer #1424)
|
||||
docs: fix simple typo, conspicuosly -> conspicuously (by @timgates42 #1652)
|
||||
Migrate to GitHub actions (by @jacobbaungard #1686)
|
||||
Point to Icinga Exchange instead of dead Monitoring Exchange (by @RincewindsHat #1737)
|
||||
github actions: fix check_users test case (by @sni #1713)
|
||||
Add CodeQL checks (by @phibos #1682)
|
||||
Fix some QL problems (by @RincewindsHat #1729)
|
||||
Update CodeQL and update runner before installing (by @RincewindsHat #1775)
|
||||
check_disk: Check disk compiler warnings (by @RincewindsHat #1758)
|
||||
check_disk: Trivial printf fix and a little bit of code style (by @RincewindsHat #1695)
|
||||
check_http: Docs: make -C obvious (by @stblassitude #1554)
|
||||
check_ifoperstatus: Re-attach a comment to where it actually belongs (by @peternewman #1699)
|
||||
check_ircd: Restrict the nickname length of the test user for check_ircd (by @RincewindsHat #1710)
|
||||
check_load: Check load compiler warnings (by @RincewindsHat #1759)
|
||||
check_log: Modernize check log (by @RincewindsHat #1692)
|
||||
check_mailq: remove duplicate W=i/C=i args in check_mailq.pl (by @ichdasich #1755)
|
||||
check_ntp: Check ntp remove unused variables (by @RincewindsHat #1781)
|
||||
check_pgsql: Using snprintf which honors the buffers size and guarantees null temination. (Closes: #1601) (by @waja #1663)
|
||||
check_procs: Fix double percentage sign in usage (by @RincewindsHat #1743)
|
||||
check_sensors.sh: Make shellcheck happier (by @RincewindsHat #1679)
|
||||
check_snmp: Fixed option description authpassword -> authpasswd + whitespaces (by @RincewindsHat #1676)
|
||||
check_swap: Check swap compiler warnings (by @RincewindsHat #1756)
|
||||
|
||||
2.3.1 10 April 2021
|
||||
ENHANCEMENTS
|
||||
check_curl: Add an option to verify the peer certificate & host using the system CA's
|
||||
|
|
@ -28,6 +119,7 @@ This file documents the major additions and syntax changes between releases.
|
|||
check_dns: Accept CIDR
|
||||
check_dns: allow unsorted addresses
|
||||
check_dns: allow forcing complete match of all addresses
|
||||
check_dns: option to expect NXDOMAIN
|
||||
check_apt: add --only-critical switch
|
||||
check_apt: add -l/--list option to print packages
|
||||
check_file_age: add range checking
|
||||
|
|
@ -543,4 +635,3 @@ This file documents the major additions and syntax changes between releases.
|
|||
check_swap % thresholds changed to measure amount free, instead of amount used
|
||||
check_disk syntax changes for -p, -m/-M, defaults to MB instead of kB
|
||||
check_procs -C expects no path for the command name
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
SRC_ROOT=`dirname $0`
|
||||
|
||||
NPVF=NP-VERSION-FILE
|
||||
DEF_VER=2.3.1
|
||||
DEF_VER=2.3.2
|
||||
|
||||
LF='
|
||||
'
|
||||
|
|
|
|||
38
THANKS
38
THANKS
|
|
@ -2,14 +2,16 @@ This software is brought to you by the Monitoring Plugins Development Team. Howe
|
|||
there have been many contributors to this project. Everyone below has helped in
|
||||
raising bug reports, creating patches or contributing new plugins.
|
||||
|
||||
Diego Elio Pettenò
|
||||
fabiodds
|
||||
Elan Ruusamäe
|
||||
Nicolai Søborg
|
||||
Marc Sánchez
|
||||
dag rob?le
|
||||
Matthias Hähnel
|
||||
Aksel Sjögren
|
||||
Marc Sánchez
|
||||
Wolfgang Karall-Ahlborn
|
||||
Randy O'Meara
|
||||
Elan Ruusamäe
|
||||
Matthias Hähnel
|
||||
Nicolai Søborg
|
||||
fabiodds
|
||||
Diego Elio Pettenò
|
||||
Oskar Ahner
|
||||
Lance Albertson
|
||||
David Alden
|
||||
|
|
@ -20,8 +22,8 @@ Felipe Gustavo de Almeida
|
|||
Michael Almond
|
||||
Michael Anthon
|
||||
Bernd Apfel
|
||||
Bernd Arnold
|
||||
Paula Arnold
|
||||
Bernd Arnold
|
||||
Kondoros Attila
|
||||
Daniel Austin
|
||||
Karol Babioch
|
||||
|
|
@ -77,16 +79,18 @@ Yannick Charton
|
|||
Stephane Chazelas
|
||||
Eric Chen
|
||||
Alwyn Cherrington
|
||||
Lee Clemens
|
||||
Ben Clewett
|
||||
Jean-Claude Computing
|
||||
Lionel Cons
|
||||
Garry Cook
|
||||
Charlie Cook
|
||||
Ollie Cook
|
||||
Charlie Cook
|
||||
Garry Cook
|
||||
Luca Corti
|
||||
Greg Cox
|
||||
Jason Crawford
|
||||
David Croft
|
||||
Ken D
|
||||
Robert Dale
|
||||
Vincent Danjean
|
||||
Rok Debevc
|
||||
|
|
@ -109,6 +113,7 @@ Matthew Ericson
|
|||
Andreas Ericsson
|
||||
Heiti Ernits
|
||||
Ragnar Hojland Espinosa
|
||||
Klaus Ethgen
|
||||
O'Shaughnessy Evans
|
||||
Merijn Evertse
|
||||
Karl Ewald
|
||||
|
|
@ -119,9 +124,10 @@ Reuben Farrelly
|
|||
Mark Favas
|
||||
Duncan Ferguson
|
||||
Juan Carlos Fernandez
|
||||
Paulo Fessel
|
||||
Paulo Afonso Graner Fessel
|
||||
Paulo Fessel
|
||||
James Fidell
|
||||
Tobias Fiebig
|
||||
Roman Fiedler
|
||||
Johan Fischer
|
||||
Bernhard Fischer
|
||||
|
|
@ -137,8 +143,8 @@ Tim Gates
|
|||
Sven Geggus
|
||||
Jonas Genannt
|
||||
Robby Giffin
|
||||
Flo Gleixner
|
||||
Florian Gleixner
|
||||
Flo Gleixner
|
||||
Evgeni Golov
|
||||
Joseph Gooch
|
||||
Aravind Gottipati
|
||||
|
|
@ -150,6 +156,7 @@ Alex Griffin
|
|||
Chris Grim
|
||||
Steven Grimm
|
||||
Sebastien Guay
|
||||
Linda Guo
|
||||
Jon Hallett
|
||||
Steve Hanselman
|
||||
Jacob Hansen
|
||||
|
|
@ -158,6 +165,7 @@ Sebastian Harl
|
|||
Michael Haro
|
||||
Olli Hauer
|
||||
Gunnar Hellekson
|
||||
Geert Hendrickx
|
||||
Sebastian Herbszt
|
||||
Johannes Herlitz
|
||||
Ian Holsman
|
||||
|
|
@ -196,6 +204,7 @@ Steven Kreuzer
|
|||
Julius Kriukas
|
||||
Christoph Kron
|
||||
Frederic Krueger
|
||||
Claudio Kuenzler
|
||||
Marcel Kuiper
|
||||
Christian Kujau
|
||||
Alexander Kulak
|
||||
|
|
@ -228,8 +237,8 @@ Pawel Malachowski
|
|||
Ricardo Maraschini
|
||||
Michael Markstaller
|
||||
John Marquart
|
||||
Ernst-Dieter Martin
|
||||
Jason Martin
|
||||
Ernst-Dieter Martin
|
||||
Christopher Maser
|
||||
Mathieu Masseboeuf
|
||||
Alexander Matey
|
||||
|
|
@ -250,6 +259,7 @@ Jonathan Milby
|
|||
Russell Miller
|
||||
Eric J. Mislivec
|
||||
Janos Mohacsi
|
||||
Andreas Motl
|
||||
Tomas Mozes
|
||||
Gerd Mueller
|
||||
Adrian Murphy
|
||||
|
|
@ -257,6 +267,7 @@ Michael Musikhin
|
|||
Damian Myerscough
|
||||
Jan-Frode Myklebust
|
||||
Sivakumar Nellurandi
|
||||
Peter Newman
|
||||
Truongchinh Nguyen
|
||||
Simon L Nielsen
|
||||
Thomas Nilsen
|
||||
|
|
@ -353,6 +364,7 @@ Julien Touche
|
|||
Gabriele Tozzi
|
||||
Kyle Tucker
|
||||
Jerome Tytgat
|
||||
Daniel Uhlmann
|
||||
Stéphane Urbanovski
|
||||
Matthias Urlichs
|
||||
Matteo HCE Valsasna
|
||||
|
|
@ -378,6 +390,7 @@ Torsten Werner
|
|||
Ben Whaley
|
||||
Andrew Widdersheim
|
||||
Adrian Wieczorek
|
||||
Tobias Wiese
|
||||
Sebastian Wiesinger
|
||||
Paul Wiggins
|
||||
Howard Wilkinson
|
||||
|
|
@ -387,6 +400,7 @@ Mario Witte
|
|||
Alexander Wittig
|
||||
Tobias Wolf
|
||||
Brian De Wolf
|
||||
Eric Wunderlin
|
||||
Patric Wust
|
||||
Jamie Zawinski
|
||||
Vadim Zhukov
|
||||
|
|
|
|||
886
aclocal.m4
vendored
886
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-03-05.13; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
|
||||
# Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -18,7 +17,7 @@ scriptversion=2012-03-05.13; # UTC
|
|||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
|
@ -54,7 +53,7 @@ func_file_conv ()
|
|||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
CYGWIN* | MSYS*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
|
|
@ -68,7 +67,7 @@ func_file_conv ()
|
|||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
|
|
@ -113,6 +112,11 @@ func_cl_dashl ()
|
|||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
|
|
@ -251,7 +255,8 @@ EOF
|
|||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
|
@ -335,9 +340,9 @@ exit $ret
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
920
build-aux/config.guess
vendored
920
build-aux/config.guess
vendored
File diff suppressed because it is too large
Load diff
409
build-aux/config.sub
vendored
409
build-aux/config.sub
vendored
|
|
@ -1,36 +1,31 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-04-18'
|
||||
timestamp='2018-02-22'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
|
@ -38,7 +33,7 @@ timestamp='2012-04-18'
|
|||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
|
|
@ -58,12 +53,11 @@ timestamp='2012-04-18'
|
|||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
Operation modes:
|
||||
Options:
|
||||
-h, --help print this help, then exit
|
||||
-t, --time-stamp print date of last modification, then exit
|
||||
-v, --version print version number, then exit
|
||||
|
|
@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
|
@ -102,7 +94,7 @@ while test $# -gt 0 ; do
|
|||
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
echo "$1"
|
||||
exit ;;
|
||||
|
||||
* )
|
||||
|
|
@ -120,24 +112,24 @@ esac
|
|||
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
||||
kopensolaris*-gnu* | cloudabi*-eabi* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
android-linux)
|
||||
os=-linux-android
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
|
||||
if [ "$basic_machine" != "$1" ]
|
||||
then os=`echo "$1" | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
|
@ -156,7 +148,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
|
@ -186,44 +178,44 @@ case $os in
|
|||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-udk*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*178)
|
||||
os=-lynxos178
|
||||
|
|
@ -235,10 +227,7 @@ case $os in
|
|||
os=-lynxos
|
||||
;;
|
||||
-ptx*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-windowsnt*)
|
||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-psos*)
|
||||
os=-psos
|
||||
|
|
@ -259,21 +248,25 @@ case $basic_machine in
|
|||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| ba \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| e2k | epiphany \
|
||||
| fido | fr30 | frv | ft32 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| i370 | i860 | i960 | ia16 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
|
|
@ -287,26 +280,30 @@ case $basic_machine in
|
|||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| open8 | or1k | or1knd | or32 \
|
||||
| pdp10 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pru \
|
||||
| pyramid \
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
|
|
@ -314,7 +311,8 @@ case $basic_machine in
|
|||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| we32k \
|
||||
| visium \
|
||||
| wasm32 \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
|
|
@ -328,11 +326,14 @@ case $basic_machine in
|
|||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
leon|leon[3-9])
|
||||
basic_machine=sparc-$basic_machine
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
|
|
@ -361,7 +362,7 @@ case $basic_machine in
|
|||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
|
|
@ -370,26 +371,29 @@ case $basic_machine in
|
|||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| ba-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| e2k-* | elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| k1om-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
|
|
@ -403,28 +407,34 @@ case $basic_machine in
|
|||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| or1k*-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
| pru-* \
|
||||
| pyramid-* \
|
||||
| riscv32-* | riscv64-* \
|
||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
||||
| tahoe-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tile*-* \
|
||||
|
|
@ -432,6 +442,8 @@ case $basic_machine in
|
|||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| visium-* \
|
||||
| wasm32-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
|
|
@ -445,7 +457,7 @@ case $basic_machine in
|
|||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
basic_machine=i386-unknown
|
||||
basic_machine=i386-pc
|
||||
os=-bsd
|
||||
;;
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
|
|
@ -479,7 +491,7 @@ case $basic_machine in
|
|||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amd64-*)
|
||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
|
|
@ -508,6 +520,9 @@ case $basic_machine in
|
|||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
asmjs)
|
||||
basic_machine=asmjs-unknown
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
|
|
@ -521,7 +536,7 @@ case $basic_machine in
|
|||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
bluegene*)
|
||||
|
|
@ -529,13 +544,13 @@ case $basic_machine in
|
|||
os=-cnk
|
||||
;;
|
||||
c54x-*)
|
||||
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c55x-*)
|
||||
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c6x-*)
|
||||
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
|
|
@ -624,10 +639,18 @@ case $basic_machine in
|
|||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
;;
|
||||
dpx2* | dpx2*-bull)
|
||||
dpx2*)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
e500v[12])
|
||||
basic_machine=powerpc-unknown
|
||||
os=$os"spe"
|
||||
;;
|
||||
e500v[12]-*)
|
||||
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
os=$os"spe"
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
|
|
@ -717,9 +740,6 @@ case $basic_machine in
|
|||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
hppaosf)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-osf
|
||||
|
|
@ -732,26 +752,26 @@ case $basic_machine in
|
|||
basic_machine=i370-ibm
|
||||
;;
|
||||
i*86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i*86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i*86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i*86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
i386mach)
|
||||
basic_machine=i386-mach
|
||||
os=-mach
|
||||
;;
|
||||
i386-vsta | vsta)
|
||||
vsta)
|
||||
basic_machine=i386-unknown
|
||||
os=-vsta
|
||||
;;
|
||||
|
|
@ -769,17 +789,17 @@ case $basic_machine in
|
|||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
leon-*|leon[3-9]-*)
|
||||
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
magnum | m3230)
|
||||
basic_machine=mips-mips
|
||||
os=-sysv
|
||||
|
|
@ -788,11 +808,15 @@ case $basic_machine in
|
|||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
|
|
@ -807,10 +831,10 @@ case $basic_machine in
|
|||
os=-mint
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
|
|
@ -820,15 +844,19 @@ case $basic_machine in
|
|||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
moxiebox)
|
||||
basic_machine=moxie-unknown
|
||||
os=-moxiebox
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
|
|
@ -867,7 +895,7 @@ case $basic_machine in
|
|||
basic_machine=v70-nec
|
||||
os=-sysv
|
||||
;;
|
||||
next | m*-next )
|
||||
next | m*-next)
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
-nextstep* )
|
||||
|
|
@ -912,6 +940,12 @@ case $basic_machine in
|
|||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
nsv-tandem)
|
||||
basic_machine=nsv-tandem
|
||||
;;
|
||||
nsx-tandem)
|
||||
basic_machine=nsx-tandem
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
|
|
@ -944,7 +978,7 @@ case $basic_machine in
|
|||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
|
|
@ -960,7 +994,7 @@ case $basic_machine in
|
|||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
|
|
@ -975,16 +1009,16 @@ case $basic_machine in
|
|||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
|
|
@ -994,23 +1028,23 @@ case $basic_machine in
|
|||
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-* | ppcbe-*)
|
||||
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
ppcle | powerpclittle)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
ppc64le | powerpc64little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
|
|
@ -1019,7 +1053,11 @@ case $basic_machine in
|
|||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
|
|
@ -1060,17 +1098,10 @@ case $basic_machine in
|
|||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
|
|
@ -1089,7 +1120,7 @@ case $basic_machine in
|
|||
os=-sysv4
|
||||
;;
|
||||
strongarm-* | thumb-*)
|
||||
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
|
|
@ -1211,6 +1242,9 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
x64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
|
|
@ -1219,20 +1253,12 @@ case $basic_machine in
|
|||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
xscale-* | xscalee[bl]-*)
|
||||
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
z80-*-coff)
|
||||
basic_machine=z80-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
|
|
@ -1261,10 +1287,6 @@ case $basic_machine in
|
|||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp10)
|
||||
# there are many clones, so DEC is not a safe bet
|
||||
basic_machine=pdp10-unknown
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
|
|
@ -1274,9 +1296,6 @@ case $basic_machine in
|
|||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
|
|
@ -1296,7 +1315,7 @@ case $basic_machine in
|
|||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1304,10 +1323,10 @@ esac
|
|||
# Here we canonicalize certain aliases for manufacturers.
|
||||
case $basic_machine in
|
||||
*-digital*)
|
||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||
basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
|
||||
;;
|
||||
*-commodore*)
|
||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||
basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
|
|
@ -1318,8 +1337,8 @@ esac
|
|||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# First match some system type aliases that might get confused
|
||||
# with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-auroraux)
|
||||
os=-auroraux
|
||||
|
|
@ -1330,45 +1349,48 @@ case $os in
|
|||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-unixware*)
|
||||
os=-sysv4.2uw
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# es1800 is here to avoid being matched by es* (a different OS)
|
||||
-es1800*)
|
||||
os=-ose
|
||||
;;
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -morphos* | -superux* | -rtmk* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
||||
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
|
||||
| -midnightbsd*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
|
@ -1385,12 +1407,12 @@ case $os in
|
|||
-nto*)
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||
-sim | -xray | -os68k* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux-dietlibc)
|
||||
os=-linux-dietlibc
|
||||
|
|
@ -1399,10 +1421,10 @@ case $os in
|
|||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-opened*)
|
||||
os=-openedition
|
||||
|
|
@ -1413,12 +1435,6 @@ case $os in
|
|||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
|
|
@ -1443,7 +1459,7 @@ case $os in
|
|||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
-ns2)
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
|
|
@ -1465,7 +1481,7 @@ case $os in
|
|||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-svr4)
|
||||
-svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-svr3)
|
||||
|
|
@ -1480,35 +1496,38 @@ case $os in
|
|||
-ose*)
|
||||
os=-ose
|
||||
;;
|
||||
-es1800*)
|
||||
os=-ose
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-pikeos*)
|
||||
# Until real need of OS specific support for
|
||||
# particular features comes up, bare metal
|
||||
# configurations are quite functional.
|
||||
case $basic_machine in
|
||||
arm*)
|
||||
os=-eabi
|
||||
;;
|
||||
*)
|
||||
os=-elf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nacl*)
|
||||
;;
|
||||
-ios)
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
# Get rid of the `-' at the beginning of $os.
|
||||
os=`echo $os | sed 's/[^-]*-//'`
|
||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1543,6 +1562,9 @@ case $basic_machine in
|
|||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
|
|
@ -1595,12 +1617,12 @@ case $basic_machine in
|
|||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
pru-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-haiku)
|
||||
os=-haiku
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
|
|
@ -1640,7 +1662,7 @@ case $basic_machine in
|
|||
m88k-omron*)
|
||||
os=-luna
|
||||
;;
|
||||
*-next )
|
||||
*-next)
|
||||
os=-nextstep
|
||||
;;
|
||||
*-sequent)
|
||||
|
|
@ -1655,9 +1677,6 @@ case $basic_machine in
|
|||
i370-*)
|
||||
os=-mvs
|
||||
;;
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
|
|
@ -1767,15 +1786,15 @@ case $basic_machine in
|
|||
vendor=stratus
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
echo "$basic_machine$os"
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'write-file-functions 'time-stamp)
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2012-03-27.16; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -17,7 +16,7 @@ scriptversion=2012-03-27.16; # UTC
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
|
@ -28,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
|
|||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
|
@ -57,11 +56,65 @@ EOF
|
|||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
|
|
@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
|
|
@ -86,32 +142,32 @@ if test "$depmode" = hp; then
|
|||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
|
|
@ -134,8 +190,7 @@ gcc3)
|
|||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -143,13 +198,17 @@ gcc3)
|
|||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
|
|
@ -157,15 +216,14 @@ gcc)
|
|||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
|
|
@ -174,15 +232,15 @@ gcc)
|
|||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' "$nl" < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -200,8 +258,7 @@ sgi)
|
|||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -209,7 +266,6 @@ sgi)
|
|||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
|
|
@ -217,19 +273,15 @@ sgi)
|
|||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr "$nl" ' ' >> "$depfile"
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
|
@ -247,9 +299,8 @@ aix)
|
|||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
|
|
@ -262,9 +313,7 @@ aix)
|
|||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -273,65 +322,113 @@ aix)
|
|||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
|
||||
# However on
|
||||
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\':
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
# tcc 0.9.26 (FIXME still under development at the moment of writing)
|
||||
# will emit a similar output, but also prepend the continuation lines
|
||||
# with horizontal tabulation characters.
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form 'foo.o: dependent.h',
|
||||
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# '$object: dependent.h' and one to simply 'dependent.h:'.
|
||||
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
|
||||
< "$tmpdepfile" > "$depfile"
|
||||
sed '
|
||||
s/[ '"$tab"'][ '"$tab"']*/ /g
|
||||
s/^ *//
|
||||
s/ *\\*$//
|
||||
s/^[^:]*: *//
|
||||
/^$/d
|
||||
/:$/d
|
||||
s/$/ :/
|
||||
' < "$tmpdepfile" >> "$depfile"
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -342,9 +439,8 @@ hp2)
|
|||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
|
|
@ -355,8 +451,7 @@ hp2)
|
|||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -366,76 +461,61 @@ hp2)
|
|||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
|
|
@ -446,8 +526,7 @@ msvc7)
|
|||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test "$stat" = 0; then :
|
||||
else
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
|
@ -473,6 +552,7 @@ $ {
|
|||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -524,13 +604,14 @@ dashmstdout)
|
|||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' "$nl" < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
|
|
@ -583,10 +664,12 @@ makedepend)
|
|||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
|
|
@ -622,10 +705,10 @@ cpp)
|
|||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
|
|
@ -657,15 +740,15 @@ msvisualcpp)
|
|||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
|
|
@ -700,9 +783,9 @@ exit 0
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-01-19.21; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
|
@ -35,25 +35,21 @@ scriptversion=2011-01-19.21; # UTC
|
|||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
|
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
|
|||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
|
@ -97,7 +87,7 @@ dir_arg=
|
|||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
|
|
@ -114,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
|
@ -137,46 +137,62 @@ while test $# -ne 0; do
|
|||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
|
|
@ -190,7 +206,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
|
|
@ -202,11 +218,20 @@ if test $# -eq 0; then
|
|||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
|
|
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
|
|||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
|
|
@ -240,7 +265,7 @@ fi
|
|||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
|
@ -250,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
|
@ -266,178 +295,148 @@ do
|
|||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
posix_mkdir=false
|
||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
trap '
|
||||
ret=$?
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
||||
exit $ret
|
||||
' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p'.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
mkdir_mode=
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
trap '' 0;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -450,14 +449,25 @@ do
|
|||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
|
|
@ -472,20 +482,24 @@ do
|
|||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
|
@ -493,24 +507,24 @@ do
|
|||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
|
|
@ -519,9 +533,9 @@ do
|
|||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2012-01-06.13; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -18,7 +17,7 @@ scriptversion=2012-01-06.13; # UTC
|
|||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
|
|
@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC
|
|||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
|
|
@ -99,233 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
|
|||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
scriptversion=2020-07-26.22; # UTC
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
|
|
@ -81,9 +81,9 @@ case $dirmode in
|
|||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# On NextStep and OpenStep, the 'mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# directories to create, and then abort because '.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
|
|
@ -92,6 +92,8 @@ case $dirmode in
|
|||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
|
|
@ -104,6 +106,9 @@ case $dirmode in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo "umask 22"
|
||||
umask 22
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
|
|
@ -132,21 +137,16 @@ do
|
|||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $file"
|
||||
chmod "$dirmode" "$file" || errstatus=$?
|
||||
fi
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
|
@ -154,9 +154,9 @@ exit $errstatus
|
|||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
|
|||
150
build-aux/test-driver
Executable file
150
build-aux/test-driver
Executable file
|
|
@ -0,0 +1,150 @@
|
|||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
||||
[--enable-hard-errors {yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
See the GNU Automake documentation for information.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
|
@ -1889,9 +1889,6 @@
|
|||
/* Define if gettimeofday is needed */
|
||||
#undef NEED_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Enable INI file parsing. */
|
||||
#undef NP_EXTRA_OPTS
|
||||
|
||||
|
|
|
|||
137
configure.ac
137
configure.ac
|
|
@ -1,10 +1,11 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(monitoring-plugins,2.3.1)
|
||||
AC_INIT(monitoring-plugins,2.3.2)
|
||||
AC_CONFIG_SRCDIR(NPTest.pm)
|
||||
AC_CONFIG_FILES([gl/Makefile])
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
AM_INIT_AUTOMAKE([1.8.3])
|
||||
AM_SILENT_RULES([yes])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CANONICAL_HOST
|
||||
|
|
@ -426,7 +427,7 @@ if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no"
|
|||
then
|
||||
AC_PATH_PROG(PATH_TO_WHO,who)
|
||||
|
||||
if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null]
|
||||
if [$PATH_TO_WHO -q 2>/dev/null | grep -E -i "^# users=[0-9]+$" >/dev/null]
|
||||
then
|
||||
ac_cv_path_to_who="$PATH_TO_WHO -q"
|
||||
else
|
||||
|
|
@ -775,7 +776,7 @@ dnl Removing this for the moment - Ton
|
|||
dnl Using /usr/ucb/ps on Solaris systems, to avoid truncation
|
||||
dnl Limitation that command name is not available
|
||||
dnl elif test "$ac_cv_uname_s" = "SunOS" && /usr/ucb/ps -alxwwn 2>/dev/null | \
|
||||
dnl egrep -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
|
||||
dnl grep -E -i ["^ *F +UID +PID +PPID +%C +PRI +NI +SZ +RSS +WCHAN +S +TT +TIME +COMMAND"] > /dev/null
|
||||
dnl then
|
||||
dnl ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrss,procstat,&pos]"
|
||||
dnl ac_cv_ps_command="/usr/ucb/ps -alxwwn"
|
||||
|
|
@ -783,10 +784,20 @@ dnl ac_cv_ps_format=["%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSRZT
|
|||
dnl ac_cv_ps_cols=8
|
||||
dnl AC_MSG_RESULT([$ac_cv_ps_command])
|
||||
|
||||
dnl This one is the exact same test as the next one but includes etime
|
||||
elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
|
||||
grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +ELAPSED +COMMAND"] > /dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'"
|
||||
ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n"
|
||||
ac_cv_ps_cols=10
|
||||
AC_MSG_RESULT([$ac_cv_ps_command])
|
||||
|
||||
dnl Some gnu/linux systems (debian for one) don't like -axwo and need axwo.
|
||||
dnl so test for this first...
|
||||
elif ps axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
|
||||
grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -798,7 +809,7 @@ dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
|
|||
dnl Should also work for FreeBSD 5.2.1 and 5.3
|
||||
dnl STAT UCOMM VSZ RSS USER PPID COMMAND
|
||||
elif ps -axwo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
|
||||
grep -E -i ["^ *STAT +[UCOMAND]+ +VSZ +RSS +USER +UID +PID +PPID +COMMAND"] > /dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -810,7 +821,7 @@ dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4.
|
|||
dnl Limitation: Only first 16 chars returned for ucomm field
|
||||
dnl Must come before ps -weo
|
||||
elif ps -axwo 'stat uid pid ppid vsz rss pcpu ucomm command' 2>/dev/null | \
|
||||
egrep -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
|
||||
grep -E -i ["^ *STAT +UID +PID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid pid ppid vsz rss pcpu ucomm command'"
|
||||
|
|
@ -820,7 +831,7 @@ then
|
|||
|
||||
dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
|
||||
elif ps -weo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
|
||||
egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid pid ppid vsz rss pcpu etime comm args'"
|
||||
|
|
@ -830,7 +841,7 @@ then
|
|||
|
||||
dnl FreeBSD
|
||||
elif ps waxco 'state command vsz rss uid user pid ppid' 2>/dev/null | \
|
||||
egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null
|
||||
grep -E -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PID +PPID"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS waxco 'state uid pid ppid vsz rss pcpu command command'"
|
||||
|
|
@ -840,7 +851,7 @@ then
|
|||
|
||||
dnl BSD-like mode in RH 6.1
|
||||
elif ps waxno 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S +COMMAND +VSZ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS waxno 'state uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -852,7 +863,7 @@ dnl SunOS 4.1.3:
|
|||
dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
|
||||
dnl Need the head -1 otherwise test will work because arguments are found
|
||||
elif ps -laxnwww 2>/dev/null | head -1 | \
|
||||
egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
|
||||
grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -laxnwww"
|
||||
|
|
@ -865,7 +876,7 @@ dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMA
|
|||
dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
|
||||
dnl
|
||||
elif ps laxnwww 2>/dev/null | \
|
||||
egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
|
||||
grep -E -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[&procuid,&procpid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS laxnwww"
|
||||
|
|
@ -875,7 +886,7 @@ then
|
|||
|
||||
dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
|
||||
elif ps -axo 'stat comm vsz rss user uid pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -888,7 +899,7 @@ dnl Has /usr/bin/ps and /sbin/ps - force sbin version
|
|||
dnl Can't use vsize and rssize because comes back with text (eg, 1.5M instead
|
||||
dnl of 1500). Will need big changes to check_procs to support
|
||||
elif /sbin/ps -eo 'stat uid pid ppid pcpu etime comm args' 2>/dev/null | \
|
||||
egrep -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null
|
||||
grep -E -i ["^ *S +[UID]+ +[PID]+ +[PID]+ +[%CPU]+ +[ELAPSD]+ +[COMMAND]+ +[COMMAND]+"] > /dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procpcpu,procetime,procprog,&pos]"
|
||||
ac_cv_ps_command="/sbin/ps -eo 'stat uid pid ppid pcpu etime comm args'"
|
||||
|
|
@ -897,7 +908,7 @@ then
|
|||
AC_MSG_RESULT([$ac_cv_ps_command])
|
||||
|
||||
elif ps -eo 's comm vsz rss user uid pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -eo 's uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -907,7 +918,7 @@ then
|
|||
|
||||
dnl AIX 4.3.3 and 5.1 do not have an rss field
|
||||
elif ps -eo 'stat uid pid ppid vsz pcpu comm args' 2>/dev/null | \
|
||||
egrep -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
|
||||
grep -E -i ["^ *S[TAUES]* +UID +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid pid ppid vsz pcpu comm args'"
|
||||
|
|
@ -917,7 +928,7 @@ then
|
|||
|
||||
dnl Solaris 2.6
|
||||
elif ps -Ao 's comm vsz rss uid user pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -Ao 's uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -928,7 +939,7 @@ then
|
|||
AC_MSG_RESULT([$ac_cv_ps_command])
|
||||
|
||||
elif ps -Ao 'status comm vsz rss uid user pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -937,7 +948,7 @@ then
|
|||
AC_MSG_RESULT([$ac_cv_ps_command])
|
||||
|
||||
elif ps -Ao 'state comm vsz rss uid user pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid pid ppid vsz rss pcpu comm args'"
|
||||
|
|
@ -947,7 +958,7 @@ then
|
|||
|
||||
dnl wonder who takes state instead of stat
|
||||
elif ps -ao 'state command vsz rss user pid ppid args' 2>/dev/null | \
|
||||
egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PID +PPID +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -ao 'state uid pid ppid vsz rss pcpu command args'"
|
||||
|
|
@ -957,7 +968,7 @@ then
|
|||
|
||||
dnl IRIX 53
|
||||
elif ps -el 2>/dev/null | \
|
||||
egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -el (IRIX 53)"
|
||||
|
|
@ -967,7 +978,7 @@ then
|
|||
|
||||
dnl IRIX 63
|
||||
elif ps -el 2>/dev/null | \
|
||||
egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -el (IRIX 63)"
|
||||
|
|
@ -980,7 +991,7 @@ dnl S UID RUID USER RUSER PID PPID VSZ %CPU COMMAND
|
|||
dnl S 0 400 root oracle 2805 1 12904 0.00 ora_dism_SEA1X ora_dism_SEA1X
|
||||
dnl S 400 400 oracle oracle 19261 1 126488 0.00 tnslsnr /u01/app/oracle/product/db/11.2.0.3/bin/tnslsnr LISTENER -inherit
|
||||
elif env UNIX95=1 ps -eo 'state uid ruid user ruser pid ppid vsz pcpu comm args' 2>/dev/null | head -n 1 | \
|
||||
egrep -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
|
||||
grep -E -i ["^ *S +UID +RUID +USER +RUSER +PID +PPID +VSZ +%CPU +COMMAND +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procpcpu,procprog,&pos]"
|
||||
ac_cv_ps_command="$PATH_TO_ENV UNIX95=1 $PATH_TO_PS -eo 'state uid pid ppid vsz pcpu comm args'"
|
||||
|
|
@ -992,7 +1003,7 @@ dnl AIX 4.1:
|
|||
dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD
|
||||
dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper
|
||||
elif ps -el 2>/dev/null | \
|
||||
egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
grep -E -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -el (AIX 4.1 and HP-UX)"
|
||||
|
|
@ -1002,7 +1013,7 @@ then
|
|||
|
||||
dnl AIX?
|
||||
elif ps glaxen 2>/dev/null | \
|
||||
egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
|
||||
grep -E -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[&procuid,&procpid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS glaxen"
|
||||
|
|
@ -1016,7 +1027,7 @@ dnl Some truncation will happen in UCOMM column
|
|||
dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND
|
||||
dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon
|
||||
elif ps wwaxo 'state vsz rss uid pid ppid pcpu ucomm command' 2>/dev/null | \
|
||||
egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
|
||||
grep -E -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid pid ppid pcpu ucomm command'"
|
||||
ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procpid,&procppid,&procpcpu,procprog,&pos]"
|
||||
|
|
@ -1026,7 +1037,7 @@ then
|
|||
|
||||
dnl UnixWare
|
||||
elif ps -Al 2>/dev/null | \
|
||||
egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
|
||||
grep -E -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null
|
||||
then
|
||||
ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&pos,procprog]"
|
||||
ac_cv_ps_command="$PATH_TO_PS -Al"
|
||||
|
|
@ -1094,14 +1105,14 @@ then
|
|||
|
||||
elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
|
||||
$PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -U -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
# check if -4 is supported - issue #1550
|
||||
with_ping_command="$PATH_TO_PING -4 -n -U -w %d -c %d %s"
|
||||
|
|
@ -1109,7 +1120,7 @@ then
|
|||
ac_cv_ping_has_timeout=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
|
|
@ -1117,52 +1128,52 @@ then
|
|||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -U -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n 127.0.0.1 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n %s -c %d"
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING 127.0.0.1 -n 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING %s -n %d"
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -s %s 56 %d"
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d"
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -s 56 -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -n -c 1 127.0.0.1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping_command="$PATH_TO_PING -n -c %d %s"
|
||||
ac_cv_ping_packets_first=yes
|
||||
|
|
@ -1218,14 +1229,14 @@ elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then
|
|||
elif test "x$PATH_TO_PING6" != "x"; then
|
||||
if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
|
||||
$PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -U -w 10 -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -U -w %d -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
|
|
@ -1233,52 +1244,52 @@ elif test "x$PATH_TO_PING6" != "x"; then
|
|||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -U -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -U -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n ::1 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n %s -c %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 ::1 -n 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 %s -n %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -s %s 56 %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -h %s -s 56 -c %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -s 56 -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -s 56 -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING6 -n -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING6 -n -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
|
|
@ -1289,59 +1300,59 @@ elif test "x$PATH_TO_PING6" != "x"; then
|
|||
elif test "x$PATH_TO_PING" != "x"; then
|
||||
if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
|
||||
$PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -U -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -U -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n ::1 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n %s -c %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 ::1 -n 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 %s -n %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -s ::1 56 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -s %s 56 %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -h ::1 -s 56 -c 1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -h %s -s 56 -c %d"
|
||||
AC_MSG_RESULT([$with_ping6_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -s 56 -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -s 56 -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
AC_MSG_RESULT([$with_ping_command])
|
||||
|
||||
elif $PATH_TO_PING -A inet6 -n -c 1 ::1 2>/dev/null | \
|
||||
egrep -i "^round-trip|^rtt" >/dev/null
|
||||
grep -E -i "^round-trip|^rtt" >/dev/null
|
||||
then
|
||||
with_ping6_command="$PATH_TO_PING -A inet6 -n -c %d %s"
|
||||
ac_cv_ping6_packets_first=yes
|
||||
|
|
@ -1578,14 +1589,14 @@ then
|
|||
ac_cv_have_swap=yes
|
||||
ac_cv_swap_command="$PATH_TO_SWAP -l"
|
||||
if [$PATH_TO_SWAP -l 2>/dev/null | \
|
||||
egrep -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
|
||||
grep -E -i "^lswap +path +pri +swaplo +blocks +free +maxswap" \
|
||||
>/dev/null]
|
||||
then
|
||||
ac_cv_swap_format=[" %*d %*s %*d,%*d %*d %*d %f %f"]
|
||||
ac_cv_swap_conv=2048
|
||||
AC_MSG_RESULT([using IRIX format swap])
|
||||
|
||||
elif [$PATH_TO_SWAP -l 2>/dev/null | egrep -i "^path +dev +swaplo +blocks +free" >/dev/null]
|
||||
elif [$PATH_TO_SWAP -l 2>/dev/null | grep -E -i "^path +dev +swaplo +blocks +free" >/dev/null]
|
||||
then
|
||||
ac_cv_swap_format=["%*s %*[0-9,-] %*d %f %f"]
|
||||
ac_cv_swap_conv=2048
|
||||
|
|
@ -1604,19 +1615,19 @@ AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
|
|||
if (test -n "$PATH_TO_SWAPINFO")
|
||||
then
|
||||
AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
|
||||
if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
|
||||
if [$PATH_TO_SWAPINFO -k 2>&1 | grep -E -i "^Device" >/dev/null]
|
||||
then
|
||||
ac_cv_have_swap=yes
|
||||
ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
|
||||
|
||||
if [$PATH_TO_SWAPINFO -k 2>/dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null]
|
||||
if [$PATH_TO_SWAPINFO -k 2>/dev/null | grep -E -i "^Device +1K-blocks +Used +Avail" >/dev/null]
|
||||
then
|
||||
ac_cv_swap_format=["%*s %f %*d %f"]
|
||||
ac_cv_swap_conv=1024
|
||||
AC_MSG_RESULT([using FreeBSD format swapinfo])
|
||||
fi
|
||||
|
||||
elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
|
||||
elif [$PATH_TO_SWAPINFO -dfM 2>/dev/null | grep -E -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
|
||||
then
|
||||
ac_cv_have_swap=yes
|
||||
ac_cv_swap_command="$PATH_TO_SWAPINFO -dfM"
|
||||
|
|
@ -1631,7 +1642,7 @@ AC_PATH_PROG(PATH_TO_LSPS,lsps)
|
|||
if (test -n "$PATH_TO_LSPS")
|
||||
then
|
||||
AC_MSG_CHECKING([for $PATH_TO_LSPS format])
|
||||
if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null]
|
||||
if [$PATH_TO_LSPS -a 2>/dev/null | grep -E -i "^Page Space" > /dev/null]
|
||||
then
|
||||
ac_cv_have_swap=yes
|
||||
ac_cv_swap_command="$PATH_TO_LSPS -a"
|
||||
|
|
@ -1833,7 +1844,7 @@ AC_ARG_ENABLE(redhat-pthread-workaround,
|
|||
[ac_cv_enable_redhat_pthread_workaround=$enableval],
|
||||
[ac_cv_enable_redhat_pthread_workaround=test])
|
||||
if test "$ac_cv_enable_redhat_pthread_workaround" = "test" ; then
|
||||
if echo $ac_cv_uname_r | egrep "\.EL(smp)?$" >/dev/null 2>&1 ; then
|
||||
if echo $ac_cv_uname_r | grep -E "\.EL(smp)?$" >/dev/null 2>&1 ; then
|
||||
AC_MSG_NOTICE([See https://www.monitoring-plugins.org/doc/faq/configure-hangs.html if this next part takes a long time])
|
||||
AC_MSG_CHECKING(for redhat spopen problem)
|
||||
( cd config_test && make && make test ) > /dev/null 2>&1
|
||||
|
|
|
|||
735
gl/Makefile.in
735
gl/Makefile.in
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -41,23 +40,61 @@
|
|||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -76,8 +113,6 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = gl
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -180,11 +215,18 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
am__v_AR_1 =
|
||||
libgnu_a_AR = $(AR) $(ARFLAGS)
|
||||
am__DEPENDENCIES_1 =
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
|
|
@ -199,29 +241,93 @@ am_libgnu_a_OBJECTS = base64.$(OBJEXT) sha1.$(OBJEXT) \
|
|||
wctype-h.$(OBJEXT) xmalloc.$(OBJEXT) xalloc-die.$(OBJEXT) \
|
||||
xsize.$(OBJEXT) xstrndup.$(OBJEXT)
|
||||
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/asnprintf.Po ./$(DEPDIR)/asprintf.Po \
|
||||
./$(DEPDIR)/base64.Po ./$(DEPDIR)/basename-lgpl.Po \
|
||||
./$(DEPDIR)/basename.Po ./$(DEPDIR)/btowc.Po \
|
||||
./$(DEPDIR)/dirname-lgpl.Po ./$(DEPDIR)/dirname.Po \
|
||||
./$(DEPDIR)/error.Po ./$(DEPDIR)/exitfail.Po \
|
||||
./$(DEPDIR)/fd-hook.Po ./$(DEPDIR)/float.Po \
|
||||
./$(DEPDIR)/floor.Po ./$(DEPDIR)/floorf.Po \
|
||||
./$(DEPDIR)/fsusage.Po ./$(DEPDIR)/full-read.Po \
|
||||
./$(DEPDIR)/full-write.Po ./$(DEPDIR)/gai_strerror.Po \
|
||||
./$(DEPDIR)/getaddrinfo.Po ./$(DEPDIR)/gethostname.Po \
|
||||
./$(DEPDIR)/getloadavg.Po ./$(DEPDIR)/getopt.Po \
|
||||
./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/idpriv-droptemp.Po \
|
||||
./$(DEPDIR)/inet_ntop.Po ./$(DEPDIR)/itold.Po \
|
||||
./$(DEPDIR)/localcharset.Po ./$(DEPDIR)/localeconv.Po \
|
||||
./$(DEPDIR)/malloc.Po ./$(DEPDIR)/malloca.Po \
|
||||
./$(DEPDIR)/math.Po ./$(DEPDIR)/mbrtowc.Po \
|
||||
./$(DEPDIR)/mbsinit.Po ./$(DEPDIR)/mbtowc.Po \
|
||||
./$(DEPDIR)/memchr.Po ./$(DEPDIR)/mktime.Po \
|
||||
./$(DEPDIR)/mountlist.Po ./$(DEPDIR)/msvc-inval.Po \
|
||||
./$(DEPDIR)/msvc-nothrow.Po ./$(DEPDIR)/nl_langinfo.Po \
|
||||
./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po \
|
||||
./$(DEPDIR)/read.Po ./$(DEPDIR)/regcomp.Po \
|
||||
./$(DEPDIR)/regex.Po ./$(DEPDIR)/regex_internal.Po \
|
||||
./$(DEPDIR)/regexec.Po ./$(DEPDIR)/safe-read.Po \
|
||||
./$(DEPDIR)/setenv.Po ./$(DEPDIR)/sha1.Po \
|
||||
./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/sockets.Po \
|
||||
./$(DEPDIR)/strcasecmp.Po ./$(DEPDIR)/strcasestr.Po \
|
||||
./$(DEPDIR)/strerror-override.Po ./$(DEPDIR)/strerror.Po \
|
||||
./$(DEPDIR)/stripslash.Po ./$(DEPDIR)/strncasecmp.Po \
|
||||
./$(DEPDIR)/strndup.Po ./$(DEPDIR)/strnlen.Po \
|
||||
./$(DEPDIR)/strsep.Po ./$(DEPDIR)/strstr.Po \
|
||||
./$(DEPDIR)/sys_socket.Po ./$(DEPDIR)/time_r.Po \
|
||||
./$(DEPDIR)/timegm.Po ./$(DEPDIR)/unistd.Po \
|
||||
./$(DEPDIR)/unsetenv.Po ./$(DEPDIR)/vasnprintf.Po \
|
||||
./$(DEPDIR)/vasprintf.Po ./$(DEPDIR)/vsnprintf.Po \
|
||||
./$(DEPDIR)/wcrtomb.Po ./$(DEPDIR)/wctype-h.Po \
|
||||
./$(DEPDIR)/xalloc-die.Po ./$(DEPDIR)/xmalloc.Po \
|
||||
./$(DEPDIR)/xsize.Po ./$(DEPDIR)/xstrndup.Po \
|
||||
glthread/$(DEPDIR)/lock.Po glthread/$(DEPDIR)/threadlib.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES)
|
||||
DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
|
@ -230,12 +336,35 @@ am__can_run_installinfo = \
|
|||
HEADERS = $(noinst_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir distdir-am
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/build-aux/depcomp \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
|
|
@ -267,6 +396,7 @@ ACLOCAL = @ACLOCAL@
|
|||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1392,6 +1522,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1532,14 +1663,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits gl/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1553,6 +1683,17 @@ $(am__aclocal_m4_deps):
|
|||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
glthread/$(am__dirstamp):
|
||||
@$(MKDIR_P) glthread
|
||||
@: > glthread/$(am__dirstamp)
|
||||
|
|
@ -1563,130 +1704,127 @@ glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \
|
|||
glthread/$(DEPDIR)/$(am__dirstamp)
|
||||
glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \
|
||||
glthread/$(DEPDIR)/$(am__dirstamp)
|
||||
libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES)
|
||||
-rm -f libgnu.a
|
||||
$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD)
|
||||
$(RANLIB) libgnu.a
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES)
|
||||
$(AM_V_at)-rm -f libgnu.a
|
||||
$(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libgnu.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f glthread/lock.$(OBJEXT)
|
||||
-rm -f glthread/threadlib.$(OBJEXT)
|
||||
-rm -f glthread/*.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floor.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floorf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsusage.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-droptemp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timegm.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floor.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floorf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsusage.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gai_strerror.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idpriv-droptemp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timegm.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -1695,22 +1833,25 @@ clean-libtool:
|
|||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
|
|
@ -1725,57 +1866,12 @@ $(RECURSIVE_TARGETS):
|
|||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
|
|
@ -1791,12 +1887,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1808,15 +1899,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1825,11 +1912,29 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1892,7 +1997,8 @@ installdirs: installdirs-recursive
|
|||
installdirs-am:
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-exec: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
|
|
@ -1934,7 +2040,84 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
|||
clean-noinstLTLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR) glthread/$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/asnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/asprintf.Po
|
||||
-rm -f ./$(DEPDIR)/base64.Po
|
||||
-rm -f ./$(DEPDIR)/basename-lgpl.Po
|
||||
-rm -f ./$(DEPDIR)/basename.Po
|
||||
-rm -f ./$(DEPDIR)/btowc.Po
|
||||
-rm -f ./$(DEPDIR)/dirname-lgpl.Po
|
||||
-rm -f ./$(DEPDIR)/dirname.Po
|
||||
-rm -f ./$(DEPDIR)/error.Po
|
||||
-rm -f ./$(DEPDIR)/exitfail.Po
|
||||
-rm -f ./$(DEPDIR)/fd-hook.Po
|
||||
-rm -f ./$(DEPDIR)/float.Po
|
||||
-rm -f ./$(DEPDIR)/floor.Po
|
||||
-rm -f ./$(DEPDIR)/floorf.Po
|
||||
-rm -f ./$(DEPDIR)/fsusage.Po
|
||||
-rm -f ./$(DEPDIR)/full-read.Po
|
||||
-rm -f ./$(DEPDIR)/full-write.Po
|
||||
-rm -f ./$(DEPDIR)/gai_strerror.Po
|
||||
-rm -f ./$(DEPDIR)/getaddrinfo.Po
|
||||
-rm -f ./$(DEPDIR)/gethostname.Po
|
||||
-rm -f ./$(DEPDIR)/getloadavg.Po
|
||||
-rm -f ./$(DEPDIR)/getopt.Po
|
||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
||||
-rm -f ./$(DEPDIR)/idpriv-droptemp.Po
|
||||
-rm -f ./$(DEPDIR)/inet_ntop.Po
|
||||
-rm -f ./$(DEPDIR)/itold.Po
|
||||
-rm -f ./$(DEPDIR)/localcharset.Po
|
||||
-rm -f ./$(DEPDIR)/localeconv.Po
|
||||
-rm -f ./$(DEPDIR)/malloc.Po
|
||||
-rm -f ./$(DEPDIR)/malloca.Po
|
||||
-rm -f ./$(DEPDIR)/math.Po
|
||||
-rm -f ./$(DEPDIR)/mbrtowc.Po
|
||||
-rm -f ./$(DEPDIR)/mbsinit.Po
|
||||
-rm -f ./$(DEPDIR)/mbtowc.Po
|
||||
-rm -f ./$(DEPDIR)/memchr.Po
|
||||
-rm -f ./$(DEPDIR)/mktime.Po
|
||||
-rm -f ./$(DEPDIR)/mountlist.Po
|
||||
-rm -f ./$(DEPDIR)/msvc-inval.Po
|
||||
-rm -f ./$(DEPDIR)/msvc-nothrow.Po
|
||||
-rm -f ./$(DEPDIR)/nl_langinfo.Po
|
||||
-rm -f ./$(DEPDIR)/printf-args.Po
|
||||
-rm -f ./$(DEPDIR)/printf-parse.Po
|
||||
-rm -f ./$(DEPDIR)/read.Po
|
||||
-rm -f ./$(DEPDIR)/regcomp.Po
|
||||
-rm -f ./$(DEPDIR)/regex.Po
|
||||
-rm -f ./$(DEPDIR)/regex_internal.Po
|
||||
-rm -f ./$(DEPDIR)/regexec.Po
|
||||
-rm -f ./$(DEPDIR)/safe-read.Po
|
||||
-rm -f ./$(DEPDIR)/setenv.Po
|
||||
-rm -f ./$(DEPDIR)/sha1.Po
|
||||
-rm -f ./$(DEPDIR)/snprintf.Po
|
||||
-rm -f ./$(DEPDIR)/sockets.Po
|
||||
-rm -f ./$(DEPDIR)/strcasecmp.Po
|
||||
-rm -f ./$(DEPDIR)/strcasestr.Po
|
||||
-rm -f ./$(DEPDIR)/strerror-override.Po
|
||||
-rm -f ./$(DEPDIR)/strerror.Po
|
||||
-rm -f ./$(DEPDIR)/stripslash.Po
|
||||
-rm -f ./$(DEPDIR)/strncasecmp.Po
|
||||
-rm -f ./$(DEPDIR)/strndup.Po
|
||||
-rm -f ./$(DEPDIR)/strnlen.Po
|
||||
-rm -f ./$(DEPDIR)/strsep.Po
|
||||
-rm -f ./$(DEPDIR)/strstr.Po
|
||||
-rm -f ./$(DEPDIR)/sys_socket.Po
|
||||
-rm -f ./$(DEPDIR)/time_r.Po
|
||||
-rm -f ./$(DEPDIR)/timegm.Po
|
||||
-rm -f ./$(DEPDIR)/unistd.Po
|
||||
-rm -f ./$(DEPDIR)/unsetenv.Po
|
||||
-rm -f ./$(DEPDIR)/vasnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/vasprintf.Po
|
||||
-rm -f ./$(DEPDIR)/vsnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/wcrtomb.Po
|
||||
-rm -f ./$(DEPDIR)/wctype-h.Po
|
||||
-rm -f ./$(DEPDIR)/xalloc-die.Po
|
||||
-rm -f ./$(DEPDIR)/xmalloc.Po
|
||||
-rm -f ./$(DEPDIR)/xsize.Po
|
||||
-rm -f ./$(DEPDIR)/xstrndup.Po
|
||||
-rm -f glthread/$(DEPDIR)/lock.Po
|
||||
-rm -f glthread/$(DEPDIR)/threadlib.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -1980,7 +2163,84 @@ install-ps-am:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR) glthread/$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/asnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/asprintf.Po
|
||||
-rm -f ./$(DEPDIR)/base64.Po
|
||||
-rm -f ./$(DEPDIR)/basename-lgpl.Po
|
||||
-rm -f ./$(DEPDIR)/basename.Po
|
||||
-rm -f ./$(DEPDIR)/btowc.Po
|
||||
-rm -f ./$(DEPDIR)/dirname-lgpl.Po
|
||||
-rm -f ./$(DEPDIR)/dirname.Po
|
||||
-rm -f ./$(DEPDIR)/error.Po
|
||||
-rm -f ./$(DEPDIR)/exitfail.Po
|
||||
-rm -f ./$(DEPDIR)/fd-hook.Po
|
||||
-rm -f ./$(DEPDIR)/float.Po
|
||||
-rm -f ./$(DEPDIR)/floor.Po
|
||||
-rm -f ./$(DEPDIR)/floorf.Po
|
||||
-rm -f ./$(DEPDIR)/fsusage.Po
|
||||
-rm -f ./$(DEPDIR)/full-read.Po
|
||||
-rm -f ./$(DEPDIR)/full-write.Po
|
||||
-rm -f ./$(DEPDIR)/gai_strerror.Po
|
||||
-rm -f ./$(DEPDIR)/getaddrinfo.Po
|
||||
-rm -f ./$(DEPDIR)/gethostname.Po
|
||||
-rm -f ./$(DEPDIR)/getloadavg.Po
|
||||
-rm -f ./$(DEPDIR)/getopt.Po
|
||||
-rm -f ./$(DEPDIR)/getopt1.Po
|
||||
-rm -f ./$(DEPDIR)/idpriv-droptemp.Po
|
||||
-rm -f ./$(DEPDIR)/inet_ntop.Po
|
||||
-rm -f ./$(DEPDIR)/itold.Po
|
||||
-rm -f ./$(DEPDIR)/localcharset.Po
|
||||
-rm -f ./$(DEPDIR)/localeconv.Po
|
||||
-rm -f ./$(DEPDIR)/malloc.Po
|
||||
-rm -f ./$(DEPDIR)/malloca.Po
|
||||
-rm -f ./$(DEPDIR)/math.Po
|
||||
-rm -f ./$(DEPDIR)/mbrtowc.Po
|
||||
-rm -f ./$(DEPDIR)/mbsinit.Po
|
||||
-rm -f ./$(DEPDIR)/mbtowc.Po
|
||||
-rm -f ./$(DEPDIR)/memchr.Po
|
||||
-rm -f ./$(DEPDIR)/mktime.Po
|
||||
-rm -f ./$(DEPDIR)/mountlist.Po
|
||||
-rm -f ./$(DEPDIR)/msvc-inval.Po
|
||||
-rm -f ./$(DEPDIR)/msvc-nothrow.Po
|
||||
-rm -f ./$(DEPDIR)/nl_langinfo.Po
|
||||
-rm -f ./$(DEPDIR)/printf-args.Po
|
||||
-rm -f ./$(DEPDIR)/printf-parse.Po
|
||||
-rm -f ./$(DEPDIR)/read.Po
|
||||
-rm -f ./$(DEPDIR)/regcomp.Po
|
||||
-rm -f ./$(DEPDIR)/regex.Po
|
||||
-rm -f ./$(DEPDIR)/regex_internal.Po
|
||||
-rm -f ./$(DEPDIR)/regexec.Po
|
||||
-rm -f ./$(DEPDIR)/safe-read.Po
|
||||
-rm -f ./$(DEPDIR)/setenv.Po
|
||||
-rm -f ./$(DEPDIR)/sha1.Po
|
||||
-rm -f ./$(DEPDIR)/snprintf.Po
|
||||
-rm -f ./$(DEPDIR)/sockets.Po
|
||||
-rm -f ./$(DEPDIR)/strcasecmp.Po
|
||||
-rm -f ./$(DEPDIR)/strcasestr.Po
|
||||
-rm -f ./$(DEPDIR)/strerror-override.Po
|
||||
-rm -f ./$(DEPDIR)/strerror.Po
|
||||
-rm -f ./$(DEPDIR)/stripslash.Po
|
||||
-rm -f ./$(DEPDIR)/strncasecmp.Po
|
||||
-rm -f ./$(DEPDIR)/strndup.Po
|
||||
-rm -f ./$(DEPDIR)/strnlen.Po
|
||||
-rm -f ./$(DEPDIR)/strsep.Po
|
||||
-rm -f ./$(DEPDIR)/strstr.Po
|
||||
-rm -f ./$(DEPDIR)/sys_socket.Po
|
||||
-rm -f ./$(DEPDIR)/time_r.Po
|
||||
-rm -f ./$(DEPDIR)/timegm.Po
|
||||
-rm -f ./$(DEPDIR)/unistd.Po
|
||||
-rm -f ./$(DEPDIR)/unsetenv.Po
|
||||
-rm -f ./$(DEPDIR)/vasnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/vasprintf.Po
|
||||
-rm -f ./$(DEPDIR)/vsnprintf.Po
|
||||
-rm -f ./$(DEPDIR)/wcrtomb.Po
|
||||
-rm -f ./$(DEPDIR)/wctype-h.Po
|
||||
-rm -f ./$(DEPDIR)/xalloc-die.Po
|
||||
-rm -f ./$(DEPDIR)/xmalloc.Po
|
||||
-rm -f ./$(DEPDIR)/xsize.Po
|
||||
-rm -f ./$(DEPDIR)/xstrndup.Po
|
||||
-rm -f glthread/$(DEPDIR)/lock.Po
|
||||
-rm -f glthread/$(DEPDIR)/threadlib.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -1999,25 +2259,26 @@ ps-am:
|
|||
|
||||
uninstall-am: uninstall-local
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
|
||||
ctags-recursive install install-am install-strip \
|
||||
tags-recursive
|
||||
.MAKE: $(am__recursive_targets) all check install install-am \
|
||||
install-exec install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am all-local check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
|
||||
ctags ctags-recursive distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-exec-local install-html \
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
|
||||
am--depfiles check check-am clean clean-generic clean-libtool \
|
||||
clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-exec-local install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \
|
||||
tags-recursive uninstall uninstall-am uninstall-local
|
||||
tags-am uninstall uninstall-am uninstall-local
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# We need the following in order to create <alloca.h> when the system
|
||||
|
|
|
|||
378
lib/Makefile.in
378
lib/Makefile.in
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -16,23 +15,61 @@
|
|||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -52,7 +89,6 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
@USE_PARSE_INI_TRUE@am__append_1 = parse_ini.c extra_opts.c
|
||||
subdir = lib
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -155,11 +191,16 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
am__v_AR_1 =
|
||||
libmonitoringplug_a_AR = $(AR) $(ARFLAGS)
|
||||
libmonitoringplug_a_LIBADD =
|
||||
am__libmonitoringplug_a_SOURCES_DIST = utils_base.c utils_disk.c \
|
||||
|
|
@ -170,28 +211,58 @@ am_libmonitoringplug_a_OBJECTS = utils_base.$(OBJEXT) \
|
|||
utils_disk.$(OBJEXT) utils_tcp.$(OBJEXT) utils_cmd.$(OBJEXT) \
|
||||
$(am__objects_1)
|
||||
libmonitoringplug_a_OBJECTS = $(am_libmonitoringplug_a_OBJECTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/extra_opts.Po \
|
||||
./$(DEPDIR)/parse_ini.Po ./$(DEPDIR)/utils_base.Po \
|
||||
./$(DEPDIR)/utils_cmd.Po ./$(DEPDIR)/utils_disk.Po \
|
||||
./$(DEPDIR)/utils_tcp.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libmonitoringplug_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libmonitoringplug_a_SOURCES_DIST)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
|
|
@ -199,12 +270,35 @@ am__can_run_installinfo = \
|
|||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
distdir distdir-am
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/build-aux/depcomp \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
|
|
@ -236,6 +330,7 @@ ACLOCAL = @ACLOCAL@
|
|||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1361,6 +1456,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1394,14 +1490,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1415,10 +1510,11 @@ $(am__aclocal_m4_deps):
|
|||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
libmonitoringplug.a: $(libmonitoringplug_a_OBJECTS) $(libmonitoringplug_a_DEPENDENCIES) $(EXTRA_libmonitoringplug_a_DEPENDENCIES)
|
||||
-rm -f libmonitoringplug.a
|
||||
$(libmonitoringplug_a_AR) libmonitoringplug.a $(libmonitoringplug_a_OBJECTS) $(libmonitoringplug_a_LIBADD)
|
||||
$(RANLIB) libmonitoringplug.a
|
||||
$(AM_V_at)-rm -f libmonitoringplug.a
|
||||
$(AM_V_AR)$(libmonitoringplug_a_AR) libmonitoringplug.a $(libmonitoringplug_a_OBJECTS) $(libmonitoringplug_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libmonitoringplug.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
|
@ -1426,33 +1522,39 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extra_opts.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_ini.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_base.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_cmd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_disk.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_tcp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extra_opts.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_ini.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_base.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_cmd.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_disk.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_tcp.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -1461,22 +1563,25 @@ clean-libtool:
|
|||
-rm -rf .libs _libs
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
|
|
@ -1491,57 +1596,12 @@ $(RECURSIVE_TARGETS):
|
|||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
|
|
@ -1557,12 +1617,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1574,15 +1629,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1591,11 +1642,29 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1691,7 +1760,12 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
|||
mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/extra_opts.Po
|
||||
-rm -f ./$(DEPDIR)/parse_ini.Po
|
||||
-rm -f ./$(DEPDIR)/utils_base.Po
|
||||
-rm -f ./$(DEPDIR)/utils_cmd.Po
|
||||
-rm -f ./$(DEPDIR)/utils_disk.Po
|
||||
-rm -f ./$(DEPDIR)/utils_tcp.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -1737,7 +1811,12 @@ install-ps-am:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/extra_opts.Po
|
||||
-rm -f ./$(DEPDIR)/parse_ini.Po
|
||||
-rm -f ./$(DEPDIR)/utils_base.Po
|
||||
-rm -f ./$(DEPDIR)/utils_cmd.Po
|
||||
-rm -f ./$(DEPDIR)/utils_disk.Po
|
||||
-rm -f ./$(DEPDIR)/utils_tcp.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -1756,12 +1835,11 @@ ps-am:
|
|||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-strip tags-recursive
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am check check-am clean clean-generic clean-libtool \
|
||||
clean-noinstLIBRARIES ctags ctags-recursive distclean \
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--depfiles check check-am clean clean-generic clean-libtool \
|
||||
clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
|
|
@ -1771,8 +1849,10 @@ uninstall-am:
|
|||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
test test-debug:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -16,23 +15,61 @@
|
|||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -55,7 +92,6 @@ EXTRA_PROGRAMS = test_utils$(EXEEXT) test_disk$(EXEEXT) \
|
|||
test_ini1$(EXEEXT) test_ini3$(EXEEXT) test_opts1$(EXEEXT) \
|
||||
test_opts2$(EXEEXT) test_opts3$(EXEEXT)
|
||||
subdir = lib/tests
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -158,6 +194,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
|
|
@ -168,6 +205,10 @@ test_base64_OBJECTS = test_base64.$(OBJEXT)
|
|||
test_base64_LDADD = $(LDADD)
|
||||
test_base64_DEPENDENCIES = $(top_srcdir)/lib/libmonitoringplug.a \
|
||||
$(top_srcdir)/gl/libgnu.a
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
test_cmd_SOURCES = test_cmd.c
|
||||
test_cmd_OBJECTS = test_cmd.$(OBJEXT)
|
||||
test_cmd_LDADD = $(LDADD)
|
||||
|
|
@ -213,19 +254,46 @@ test_utils_OBJECTS = test_utils.$(OBJEXT)
|
|||
test_utils_LDADD = $(LDADD)
|
||||
test_utils_DEPENDENCIES = $(top_srcdir)/lib/libmonitoringplug.a \
|
||||
$(top_srcdir)/gl/libgnu.a
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/test_base64.Po \
|
||||
./$(DEPDIR)/test_cmd.Po ./$(DEPDIR)/test_disk.Po \
|
||||
./$(DEPDIR)/test_ini1.Po ./$(DEPDIR)/test_ini3.Po \
|
||||
./$(DEPDIR)/test_opts1.Po ./$(DEPDIR)/test_opts2.Po \
|
||||
./$(DEPDIR)/test_opts3.Po ./$(DEPDIR)/test_tcp.Po \
|
||||
./$(DEPDIR)/test_utils.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
DIST_SOURCES = test_base64.c test_cmd.c test_disk.c test_ini1.c \
|
||||
test_ini3.c test_opts1.c test_opts2.c test_opts3.c test_tcp.c \
|
||||
test_utils.c
|
||||
|
|
@ -234,16 +302,239 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = { \
|
||||
$(am__tty_colors_dummy); \
|
||||
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||
am__color_tests=no; \
|
||||
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||
am__color_tests=yes; \
|
||||
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||
am__color_tests=yes; \
|
||||
fi; \
|
||||
if test $$am__color_tests = yes; then \
|
||||
red='[0;31m'; \
|
||||
grn='[0;32m'; \
|
||||
lgn='[1;32m'; \
|
||||
blu='[1;34m'; \
|
||||
mgn='[0;35m'; \
|
||||
brg='[1m'; \
|
||||
std='[m'; \
|
||||
fi; \
|
||||
}
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, print the name of the tests that are to be re-run
|
||||
# upon "make recheck".
|
||||
am__list_recheck_tests = $(AWK) '{ \
|
||||
recheck = 1; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
{ \
|
||||
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||
{ \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
}; \
|
||||
if (recheck) \
|
||||
print $$0; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, create the global log from their .trs and .log files.
|
||||
am__create_global_log = $(AWK) ' \
|
||||
function fatal(msg) \
|
||||
{ \
|
||||
print "fatal: making $@: " msg | "cat >&2"; \
|
||||
exit 1; \
|
||||
} \
|
||||
function rst_section(header) \
|
||||
{ \
|
||||
print header; \
|
||||
len = length(header); \
|
||||
for (i = 1; i <= len; i = i + 1) \
|
||||
printf "="; \
|
||||
printf "\n\n"; \
|
||||
} \
|
||||
{ \
|
||||
copy_in_global_log = 1; \
|
||||
global_test_result = "RUN"; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".trs"); \
|
||||
if (line ~ /$(am__global_test_result_rx)/) \
|
||||
{ \
|
||||
sub("$(am__global_test_result_rx)", "", line); \
|
||||
sub("[ ]*$$", "", line); \
|
||||
global_test_result = line; \
|
||||
} \
|
||||
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||
copy_in_global_log = 0; \
|
||||
}; \
|
||||
if (copy_in_global_log) \
|
||||
{ \
|
||||
rst_section(global_test_result ": " $$0); \
|
||||
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".log"); \
|
||||
print line; \
|
||||
}; \
|
||||
printf "\n"; \
|
||||
}; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# Restructured Text title.
|
||||
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
am__check_pre = \
|
||||
$(am__sh_e_setup); \
|
||||
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||
$(am__tty_colors); \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
case "$@" in \
|
||||
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||
*) am__odir=.;; \
|
||||
esac; \
|
||||
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||
if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
am__enable_hard_errors=yes; \
|
||||
fi; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||
am__expect_failure=yes;; \
|
||||
*) \
|
||||
am__expect_failure=no;; \
|
||||
esac; \
|
||||
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||
# A shell command to get the names of the tests scripts with any registered
|
||||
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||
# the '.log' extension removed). The result is saved in the shell variable
|
||||
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||
am__set_TESTS_bases = \
|
||||
bases='$(TEST_LOGS)'; \
|
||||
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||
bases=`echo $$bases`
|
||||
AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
|
||||
RECHECK_LOGS = $(TEST_LOGS)
|
||||
AM_RECURSIVE_TARGETS = check recheck
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
TEST_EXTENSIONS = @EXEEXT@ .test
|
||||
am__test_logs1 = $(TESTS:=.log)
|
||||
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||
TEST_LOGS = $(am__test_logs2:.test.log=.log)
|
||||
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
|
||||
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
|
||||
$(TEST_LOG_FLAGS)
|
||||
am__set_b = \
|
||||
case '$@' in \
|
||||
*/*) \
|
||||
case '$*' in \
|
||||
*/*) b='$*';; \
|
||||
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||
esac;; \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/build-aux/depcomp \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs \
|
||||
$(top_srcdir)/build-aux/test-driver README
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkglibexecdir = @pkglibexecdir@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1369,6 +1660,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1400,7 +1692,7 @@ SOURCES = test_utils.c test_disk.c test_tcp.c test_cmd.c test_base64.c test_ini1
|
|||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
|
|
@ -1413,14 +1705,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/tests/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/tests/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1449,36 +1740,46 @@ clean-noinstPROGRAMS:
|
|||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
test_base64$(EXEEXT): $(test_base64_OBJECTS) $(test_base64_DEPENDENCIES) $(EXTRA_test_base64_DEPENDENCIES)
|
||||
@rm -f test_base64$(EXEEXT)
|
||||
$(LINK) $(test_base64_OBJECTS) $(test_base64_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_base64_OBJECTS) $(test_base64_LDADD) $(LIBS)
|
||||
|
||||
test_cmd$(EXEEXT): $(test_cmd_OBJECTS) $(test_cmd_DEPENDENCIES) $(EXTRA_test_cmd_DEPENDENCIES)
|
||||
@rm -f test_cmd$(EXEEXT)
|
||||
$(LINK) $(test_cmd_OBJECTS) $(test_cmd_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_cmd_OBJECTS) $(test_cmd_LDADD) $(LIBS)
|
||||
|
||||
test_disk$(EXEEXT): $(test_disk_OBJECTS) $(test_disk_DEPENDENCIES) $(EXTRA_test_disk_DEPENDENCIES)
|
||||
@rm -f test_disk$(EXEEXT)
|
||||
$(LINK) $(test_disk_OBJECTS) $(test_disk_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_disk_OBJECTS) $(test_disk_LDADD) $(LIBS)
|
||||
|
||||
test_ini1$(EXEEXT): $(test_ini1_OBJECTS) $(test_ini1_DEPENDENCIES) $(EXTRA_test_ini1_DEPENDENCIES)
|
||||
@rm -f test_ini1$(EXEEXT)
|
||||
$(LINK) $(test_ini1_OBJECTS) $(test_ini1_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_ini1_OBJECTS) $(test_ini1_LDADD) $(LIBS)
|
||||
|
||||
test_ini3$(EXEEXT): $(test_ini3_OBJECTS) $(test_ini3_DEPENDENCIES) $(EXTRA_test_ini3_DEPENDENCIES)
|
||||
@rm -f test_ini3$(EXEEXT)
|
||||
$(LINK) $(test_ini3_OBJECTS) $(test_ini3_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_ini3_OBJECTS) $(test_ini3_LDADD) $(LIBS)
|
||||
|
||||
test_opts1$(EXEEXT): $(test_opts1_OBJECTS) $(test_opts1_DEPENDENCIES) $(EXTRA_test_opts1_DEPENDENCIES)
|
||||
@rm -f test_opts1$(EXEEXT)
|
||||
$(LINK) $(test_opts1_OBJECTS) $(test_opts1_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_opts1_OBJECTS) $(test_opts1_LDADD) $(LIBS)
|
||||
|
||||
test_opts2$(EXEEXT): $(test_opts2_OBJECTS) $(test_opts2_DEPENDENCIES) $(EXTRA_test_opts2_DEPENDENCIES)
|
||||
@rm -f test_opts2$(EXEEXT)
|
||||
$(LINK) $(test_opts2_OBJECTS) $(test_opts2_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_opts2_OBJECTS) $(test_opts2_LDADD) $(LIBS)
|
||||
|
||||
test_opts3$(EXEEXT): $(test_opts3_OBJECTS) $(test_opts3_DEPENDENCIES) $(EXTRA_test_opts3_DEPENDENCIES)
|
||||
@rm -f test_opts3$(EXEEXT)
|
||||
$(LINK) $(test_opts3_OBJECTS) $(test_opts3_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_opts3_OBJECTS) $(test_opts3_LDADD) $(LIBS)
|
||||
|
||||
test_tcp$(EXEEXT): $(test_tcp_OBJECTS) $(test_tcp_DEPENDENCIES) $(EXTRA_test_tcp_DEPENDENCIES)
|
||||
@rm -f test_tcp$(EXEEXT)
|
||||
$(LINK) $(test_tcp_OBJECTS) $(test_tcp_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_tcp_OBJECTS) $(test_tcp_LDADD) $(LIBS)
|
||||
|
||||
test_utils$(EXEEXT): $(test_utils_OBJECTS) $(test_utils_DEPENDENCIES) $(EXTRA_test_utils_DEPENDENCIES)
|
||||
@rm -f test_utils$(EXEEXT)
|
||||
$(LINK) $(test_utils_OBJECTS) $(test_utils_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(test_utils_OBJECTS) $(test_utils_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
|
@ -1486,37 +1787,43 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_base64.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cmd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_disk.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ini1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ini3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tcp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_base64.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cmd.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_disk.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ini1.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ini3.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts1.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts2.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_opts3.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tcp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -1524,26 +1831,15 @@ mostlyclean-libtool:
|
|||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1555,15 +1851,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1572,104 +1864,185 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
$(am__tty_colors); \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=XPASS; \
|
||||
;; \
|
||||
*) \
|
||||
col=$$grn; res=PASS; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
col=$$lgn; res=XFAIL; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=FAIL; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
col=$$blu; res=SKIP; \
|
||||
fi; \
|
||||
echo "$${col}$$res$${std}: $$tst"; \
|
||||
done; \
|
||||
if test "$$all" -eq 1; then \
|
||||
tests="test"; \
|
||||
All=""; \
|
||||
else \
|
||||
tests="tests"; \
|
||||
All="All "; \
|
||||
fi; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="$$All$$all $$tests passed"; \
|
||||
else \
|
||||
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
|
||||
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all $$tests failed"; \
|
||||
else \
|
||||
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
|
||||
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
if test "$$skip" -eq 1; then \
|
||||
skipped="($$skip test was not run)"; \
|
||||
else \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
fi; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
fi; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
echo "$${col}$$banner$${std}"; \
|
||||
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
|
||||
test -z "$$report" || echo "$${col}$$report$${std}"; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
# Recover from deleted '.trs' file; this should ensure that
|
||||
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||
# to avoid problems with "make -n".
|
||||
.log.trs:
|
||||
rm -f $< $@
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
redo_bases=`for i in $$bases; do \
|
||||
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||
done`; \
|
||||
if test -n "$$redo_bases"; then \
|
||||
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
elif test -n "$$redo_logs"; then \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
st=0; \
|
||||
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||
for i in $$redo_bases; do \
|
||||
test -f $$i.trs && test -r $$i.trs \
|
||||
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||
test -f $$i.log && test -r $$i.log \
|
||||
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||
done; \
|
||||
test $$st -eq 0 || exit 1; \
|
||||
fi
|
||||
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||
ws='[ ]'; \
|
||||
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||
test -n "$$results" || results=/dev/null; \
|
||||
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||
success=true; \
|
||||
else \
|
||||
success=false; \
|
||||
fi; \
|
||||
br='==================='; br=$$br$$br$$br$$br; \
|
||||
result_count () \
|
||||
{ \
|
||||
if test x"$$1" = x"--maybe-color"; then \
|
||||
maybe_colorize=yes; \
|
||||
elif test x"$$1" = x"--no-color"; then \
|
||||
maybe_colorize=no; \
|
||||
else \
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||
fi; \
|
||||
shift; \
|
||||
desc=$$1 count=$$2; \
|
||||
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||
color_start=$$3 color_end=$$std; \
|
||||
else \
|
||||
color_start= color_end=; \
|
||||
fi; \
|
||||
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||
}; \
|
||||
create_testsuite_report () \
|
||||
{ \
|
||||
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for b in $$bases; do echo $$b; done \
|
||||
| $(am__create_global_log); \
|
||||
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
if $$success; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||
fi; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
|
||||
check-TESTS: $(check_PROGRAMS)
|
||||
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
|
||||
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
|
||||
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
|
||||
exit $$?;
|
||||
recheck: all $(check_PROGRAMS)
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||
am__force_recheck=am--force-recheck \
|
||||
TEST_LOGS="$$log_list"; \
|
||||
exit $$?
|
||||
.test.log:
|
||||
@p='$<'; \
|
||||
$(am__set_b); \
|
||||
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
|
||||
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1725,6 +2098,9 @@ install-strip:
|
|||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
|
||||
|
|
@ -1741,7 +2117,16 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
|||
clean-noinstPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/test_base64.Po
|
||||
-rm -f ./$(DEPDIR)/test_cmd.Po
|
||||
-rm -f ./$(DEPDIR)/test_disk.Po
|
||||
-rm -f ./$(DEPDIR)/test_ini1.Po
|
||||
-rm -f ./$(DEPDIR)/test_ini3.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts1.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts2.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts3.Po
|
||||
-rm -f ./$(DEPDIR)/test_tcp.Po
|
||||
-rm -f ./$(DEPDIR)/test_utils.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -1787,7 +2172,16 @@ install-ps-am:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/test_base64.Po
|
||||
-rm -f ./$(DEPDIR)/test_cmd.Po
|
||||
-rm -f ./$(DEPDIR)/test_disk.Po
|
||||
-rm -f ./$(DEPDIR)/test_ini1.Po
|
||||
-rm -f ./$(DEPDIR)/test_ini3.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts1.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts2.Po
|
||||
-rm -f ./$(DEPDIR)/test_opts3.Po
|
||||
-rm -f ./$(DEPDIR)/test_tcp.Po
|
||||
-rm -f ./$(DEPDIR)/test_utils.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -1808,19 +2202,22 @@ uninstall-am:
|
|||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
clean-noinstPROGRAMS ctags distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
|
||||
check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am recheck tags tags-am uninstall \
|
||||
uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
test: ${noinst_PROGRAMS}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ range
|
|||
temp_range->end = 0;
|
||||
temp_range->end_infinity = TRUE;
|
||||
temp_range->alert_on = OUTSIDE;
|
||||
temp_range->text = strdup(str);
|
||||
|
||||
if (str[0] == '@') {
|
||||
temp_range->alert_on = INSIDE;
|
||||
|
|
@ -706,4 +707,3 @@ void np_state_write_string(time_t data_time, char *data_string) {
|
|||
|
||||
np_free(temp_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ typedef struct range_struct {
|
|||
double end;
|
||||
int end_infinity;
|
||||
int alert_on; /* OUTSIDE (default) or INSIDE */
|
||||
char* text; /* original unparsed text input */
|
||||
} range;
|
||||
|
||||
typedef struct thresholds_struct {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ struct parameter_list
|
|||
uintmax_t total, available, available_to_root, used,
|
||||
inodes_free, inodes_free_to_root, inodes_used, inodes_total;
|
||||
double dfree_pct, dused_pct;
|
||||
double dused_units, dfree_units, dtotal_units;
|
||||
uint64_t dused_units, dfree_units, dtotal_units;
|
||||
double dused_inodes_percent, dfree_inodes_percent;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ PKG="NGOSplugin"
|
|||
NAME="monitoring-plugins"
|
||||
DESC="Network Monitoring Plugins for Nagios and compatible"
|
||||
ARCH="unknown"
|
||||
VERSION="2.3.1,REV=2021.04.10.16.16"
|
||||
VERSION="2.3.2,REV=2022.10.19.14.57"
|
||||
CATEGORY="application"
|
||||
VENDOR="Monitoring Plugins Development Team"
|
||||
EMAIL="devel@monitoring-plugins.org"
|
||||
PSTAMP="nag20210410161613"
|
||||
PSTAMP="nag20221019145705"
|
||||
BASEDIR="/"
|
||||
CLASSES="none"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ $pkgtrans = "/usr/bin/pkgtrans";
|
|||
$prototype = "prototype";
|
||||
$pkginfo = "pkginfo";
|
||||
$preinstall = "preinstall";
|
||||
$egrep = "/usr/bin/egrep";
|
||||
$egrep = "/usr/bin/grep -E";
|
||||
|
||||
# Sanity check
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ TESTS = @PLUGIN_TEST@
|
|||
test:
|
||||
perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
||||
test-debug:
|
||||
NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
||||
setuid_root_mode = ug=rx,u+s
|
||||
|
||||
# /* Author Coreutils team - see ACKNOWLEDGEMENTS */
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -15,23 +14,61 @@
|
|||
|
||||
@SET_MAKE@
|
||||
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -53,7 +90,6 @@ noinst_PROGRAMS = check_dhcp$(EXEEXT) check_icmp$(EXEEXT) \
|
|||
@EXTRAS_ROOT@ $(am__empty)
|
||||
EXTRA_PROGRAMS = pst3$(EXEEXT)
|
||||
subdir = plugins-root
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -156,6 +192,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
|
|
@ -167,27 +204,54 @@ am__DEPENDENCIES_1 =
|
|||
am__DEPENDENCIES_2 = ../plugins/netutils.o $(BASEOBJS) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
check_icmp_SOURCES = check_icmp.c
|
||||
check_icmp_OBJECTS = check_icmp.$(OBJEXT)
|
||||
pst3_SOURCES = pst3.c
|
||||
pst3_OBJECTS = pst3-pst3.$(OBJEXT)
|
||||
pst3_LDADD = $(LDADD)
|
||||
pst3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(pst3_CFLAGS) $(CFLAGS) $(pst3_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
pst3_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(pst3_CFLAGS) $(CFLAGS) \
|
||||
$(pst3_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/check_dhcp.Po \
|
||||
./$(DEPDIR)/check_icmp.Po ./$(DEPDIR)/pst3-pst3.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = check_dhcp.c check_icmp.c pst3.c
|
||||
DIST_SOURCES = check_dhcp.c check_icmp.c pst3.c
|
||||
am__can_run_installinfo = \
|
||||
|
|
@ -195,10 +259,232 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = { \
|
||||
$(am__tty_colors_dummy); \
|
||||
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||
am__color_tests=no; \
|
||||
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||
am__color_tests=yes; \
|
||||
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||
am__color_tests=yes; \
|
||||
fi; \
|
||||
if test $$am__color_tests = yes; then \
|
||||
red='[0;31m'; \
|
||||
grn='[0;32m'; \
|
||||
lgn='[1;32m'; \
|
||||
blu='[1;34m'; \
|
||||
mgn='[0;35m'; \
|
||||
brg='[1m'; \
|
||||
std='[m'; \
|
||||
fi; \
|
||||
}
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, print the name of the tests that are to be re-run
|
||||
# upon "make recheck".
|
||||
am__list_recheck_tests = $(AWK) '{ \
|
||||
recheck = 1; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
{ \
|
||||
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||
{ \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
}; \
|
||||
if (recheck) \
|
||||
print $$0; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, create the global log from their .trs and .log files.
|
||||
am__create_global_log = $(AWK) ' \
|
||||
function fatal(msg) \
|
||||
{ \
|
||||
print "fatal: making $@: " msg | "cat >&2"; \
|
||||
exit 1; \
|
||||
} \
|
||||
function rst_section(header) \
|
||||
{ \
|
||||
print header; \
|
||||
len = length(header); \
|
||||
for (i = 1; i <= len; i = i + 1) \
|
||||
printf "="; \
|
||||
printf "\n\n"; \
|
||||
} \
|
||||
{ \
|
||||
copy_in_global_log = 1; \
|
||||
global_test_result = "RUN"; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".trs"); \
|
||||
if (line ~ /$(am__global_test_result_rx)/) \
|
||||
{ \
|
||||
sub("$(am__global_test_result_rx)", "", line); \
|
||||
sub("[ ]*$$", "", line); \
|
||||
global_test_result = line; \
|
||||
} \
|
||||
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||
copy_in_global_log = 0; \
|
||||
}; \
|
||||
if (copy_in_global_log) \
|
||||
{ \
|
||||
rst_section(global_test_result ": " $$0); \
|
||||
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".log"); \
|
||||
print line; \
|
||||
}; \
|
||||
printf "\n"; \
|
||||
}; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# Restructured Text title.
|
||||
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
am__check_pre = \
|
||||
$(am__sh_e_setup); \
|
||||
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||
$(am__tty_colors); \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
case "$@" in \
|
||||
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||
*) am__odir=.;; \
|
||||
esac; \
|
||||
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||
if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
am__enable_hard_errors=yes; \
|
||||
fi; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||
am__expect_failure=yes;; \
|
||||
*) \
|
||||
am__expect_failure=no;; \
|
||||
esac; \
|
||||
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||
# A shell command to get the names of the tests scripts with any registered
|
||||
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||
# the '.log' extension removed). The result is saved in the shell variable
|
||||
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||
am__set_TESTS_bases = \
|
||||
bases='$(TEST_LOGS)'; \
|
||||
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||
bases=`echo $$bases`
|
||||
AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
|
||||
RECHECK_LOGS = $(TEST_LOGS)
|
||||
AM_RECURSIVE_TARGETS = check recheck
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
TEST_EXTENSIONS = @EXEEXT@ .test
|
||||
am__test_logs1 = $(TESTS:=.log)
|
||||
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||
TEST_LOGS = $(am__test_logs2:.test.log=.log)
|
||||
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
|
||||
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
|
||||
$(TEST_LOG_FLAGS)
|
||||
am__set_b = \
|
||||
case '$@' in \
|
||||
*/*) \
|
||||
case '$*' in \
|
||||
*/*) b='$*';; \
|
||||
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||
esac;; \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/build-aux/depcomp \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs \
|
||||
$(top_srcdir)/build-aux/test-driver
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t $(srcdir)
|
||||
pkglibexecdir = @pkglibexecdir@
|
||||
|
|
@ -206,6 +492,7 @@ ACLOCAL = @ACLOCAL@
|
|||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1331,6 +1618,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1381,7 +1669,7 @@ check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS)
|
|||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
|
|
@ -1394,14 +1682,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-root/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu plugins-root/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1421,15 +1708,18 @@ clean-noinstPROGRAMS:
|
|||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
check_dhcp$(EXEEXT): $(check_dhcp_OBJECTS) $(check_dhcp_DEPENDENCIES) $(EXTRA_check_dhcp_DEPENDENCIES)
|
||||
@rm -f check_dhcp$(EXEEXT)
|
||||
$(LINK) $(check_dhcp_OBJECTS) $(check_dhcp_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(check_dhcp_OBJECTS) $(check_dhcp_LDADD) $(LIBS)
|
||||
|
||||
check_icmp$(EXEEXT): $(check_icmp_OBJECTS) $(check_icmp_DEPENDENCIES) $(EXTRA_check_icmp_DEPENDENCIES)
|
||||
@rm -f check_icmp$(EXEEXT)
|
||||
$(LINK) $(check_icmp_OBJECTS) $(check_icmp_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(check_icmp_OBJECTS) $(check_icmp_LDADD) $(LIBS)
|
||||
|
||||
pst3$(EXEEXT): $(pst3_OBJECTS) $(pst3_DEPENDENCIES) $(EXTRA_pst3_DEPENDENCIES)
|
||||
@rm -f pst3$(EXEEXT)
|
||||
$(pst3_LINK) $(pst3_OBJECTS) $(pst3_LDADD) $(LIBS)
|
||||
$(AM_V_CCLD)$(pst3_LINK) $(pst3_OBJECTS) $(pst3_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
|
@ -1437,44 +1727,50 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dhcp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_icmp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pst3-pst3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dhcp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_icmp.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pst3-pst3.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
pst3-pst3.o: pst3.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -MT pst3-pst3.o -MD -MP -MF $(DEPDIR)/pst3-pst3.Tpo -c -o pst3-pst3.o `test -f 'pst3.c' || echo '$(srcdir)/'`pst3.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pst3-pst3.Tpo $(DEPDIR)/pst3-pst3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pst3.c' object='pst3-pst3.o' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -MT pst3-pst3.o -MD -MP -MF $(DEPDIR)/pst3-pst3.Tpo -c -o pst3-pst3.o `test -f 'pst3.c' || echo '$(srcdir)/'`pst3.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pst3-pst3.Tpo $(DEPDIR)/pst3-pst3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pst3.c' object='pst3-pst3.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -c -o pst3-pst3.o `test -f 'pst3.c' || echo '$(srcdir)/'`pst3.c
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -c -o pst3-pst3.o `test -f 'pst3.c' || echo '$(srcdir)/'`pst3.c
|
||||
|
||||
pst3-pst3.obj: pst3.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -MT pst3-pst3.obj -MD -MP -MF $(DEPDIR)/pst3-pst3.Tpo -c -o pst3-pst3.obj `if test -f 'pst3.c'; then $(CYGPATH_W) 'pst3.c'; else $(CYGPATH_W) '$(srcdir)/pst3.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pst3-pst3.Tpo $(DEPDIR)/pst3-pst3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pst3.c' object='pst3-pst3.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -MT pst3-pst3.obj -MD -MP -MF $(DEPDIR)/pst3-pst3.Tpo -c -o pst3-pst3.obj `if test -f 'pst3.c'; then $(CYGPATH_W) 'pst3.c'; else $(CYGPATH_W) '$(srcdir)/pst3.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pst3-pst3.Tpo $(DEPDIR)/pst3-pst3.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pst3.c' object='pst3-pst3.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -c -o pst3-pst3.obj `if test -f 'pst3.c'; then $(CYGPATH_W) 'pst3.c'; else $(CYGPATH_W) '$(srcdir)/pst3.c'; fi`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pst3_CPPFLAGS) $(CPPFLAGS) $(pst3_CFLAGS) $(CFLAGS) -c -o pst3-pst3.obj `if test -f 'pst3.c'; then $(CYGPATH_W) 'pst3.c'; else $(CYGPATH_W) '$(srcdir)/pst3.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -1482,26 +1778,15 @@ mostlyclean-libtool:
|
|||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1513,15 +1798,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1530,104 +1811,185 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
$(am__tty_colors); \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=XPASS; \
|
||||
;; \
|
||||
*) \
|
||||
col=$$grn; res=PASS; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
col=$$lgn; res=XFAIL; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=FAIL; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
col=$$blu; res=SKIP; \
|
||||
fi; \
|
||||
echo "$${col}$$res$${std}: $$tst"; \
|
||||
done; \
|
||||
if test "$$all" -eq 1; then \
|
||||
tests="test"; \
|
||||
All=""; \
|
||||
else \
|
||||
tests="tests"; \
|
||||
All="All "; \
|
||||
fi; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="$$All$$all $$tests passed"; \
|
||||
else \
|
||||
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
|
||||
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all $$tests failed"; \
|
||||
else \
|
||||
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
|
||||
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
if test "$$skip" -eq 1; then \
|
||||
skipped="($$skip test was not run)"; \
|
||||
else \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
fi; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
fi; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
echo "$${col}$$banner$${std}"; \
|
||||
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
|
||||
test -z "$$report" || echo "$${col}$$report$${std}"; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
# Recover from deleted '.trs' file; this should ensure that
|
||||
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||
# to avoid problems with "make -n".
|
||||
.log.trs:
|
||||
rm -f $< $@
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
redo_bases=`for i in $$bases; do \
|
||||
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||
done`; \
|
||||
if test -n "$$redo_bases"; then \
|
||||
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
elif test -n "$$redo_logs"; then \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
st=0; \
|
||||
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||
for i in $$redo_bases; do \
|
||||
test -f $$i.trs && test -r $$i.trs \
|
||||
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||
test -f $$i.log && test -r $$i.log \
|
||||
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||
done; \
|
||||
test $$st -eq 0 || exit 1; \
|
||||
fi
|
||||
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||
ws='[ ]'; \
|
||||
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||
test -n "$$results" || results=/dev/null; \
|
||||
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||
success=true; \
|
||||
else \
|
||||
success=false; \
|
||||
fi; \
|
||||
br='==================='; br=$$br$$br$$br$$br; \
|
||||
result_count () \
|
||||
{ \
|
||||
if test x"$$1" = x"--maybe-color"; then \
|
||||
maybe_colorize=yes; \
|
||||
elif test x"$$1" = x"--no-color"; then \
|
||||
maybe_colorize=no; \
|
||||
else \
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||
fi; \
|
||||
shift; \
|
||||
desc=$$1 count=$$2; \
|
||||
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||
color_start=$$3 color_end=$$std; \
|
||||
else \
|
||||
color_start= color_end=; \
|
||||
fi; \
|
||||
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||
}; \
|
||||
create_testsuite_report () \
|
||||
{ \
|
||||
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for b in $$bases; do echo $$b; done \
|
||||
| $(am__create_global_log); \
|
||||
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
if $$success; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||
fi; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
|
||||
check-TESTS:
|
||||
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
|
||||
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
|
||||
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
|
||||
exit $$?;
|
||||
recheck: all
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||
am__force_recheck=am--force-recheck \
|
||||
TEST_LOGS="$$log_list"; \
|
||||
exit $$?
|
||||
.test.log:
|
||||
@p='$<'; \
|
||||
$(am__set_b); \
|
||||
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
|
||||
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1682,6 +2044,9 @@ install-strip:
|
|||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
|
||||
|
|
@ -1698,7 +2063,9 @@ clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
|
|||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/check_dhcp.Po
|
||||
-rm -f ./$(DEPDIR)/check_icmp.Po
|
||||
-rm -f ./$(DEPDIR)/pst3-pst3.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -1744,7 +2111,9 @@ install-ps-am:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/check_dhcp.Po
|
||||
-rm -f ./$(DEPDIR)/check_icmp.Po
|
||||
-rm -f ./$(DEPDIR)/pst3-pst3.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -1765,19 +2134,22 @@ uninstall-am:
|
|||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
|
||||
ctags distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-exec-local install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \
|
||||
check-am clean clean-generic clean-libtool clean-local \
|
||||
clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-local \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
|
||||
uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
@RELEASE_PRESENT_FALSE@NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@RELEASE_PRESENT_FALSE@ @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
|
|
@ -1787,6 +2159,9 @@ uninstall-am:
|
|||
test:
|
||||
perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
||||
test-debug:
|
||||
NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
|
||||
|
||||
install-root: $(noinst_PROGRAMS)
|
||||
@$(INSTALL_SUID)
|
||||
|
||||
|
|
|
|||
|
|
@ -50,19 +50,11 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#if HAVE_SYS_SOCKIO_H
|
||||
#include <sys/sockio.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <ctype.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
@ -71,8 +63,6 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/icmp6.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <signal.h>
|
||||
#include <float.h>
|
||||
|
||||
|
||||
/** sometimes undefined system macros (quite a few, actually) **/
|
||||
|
|
@ -207,7 +197,7 @@ static int add_target(char *);
|
|||
static int add_target_ip(char *, struct sockaddr_storage *);
|
||||
static int handle_random_icmp(unsigned char *, struct sockaddr_storage *);
|
||||
static void parse_address(struct sockaddr_storage *, char *, int);
|
||||
static unsigned short icmp_checksum(unsigned short *, int);
|
||||
static unsigned short icmp_checksum(uint16_t *, size_t);
|
||||
static void finish(int);
|
||||
static void crash(const char *, ...);
|
||||
|
||||
|
|
@ -223,7 +213,7 @@ static int mode, protocols, sockets, debug = 0, timeout = 10;
|
|||
static unsigned short icmp_data_size = DEFAULT_PING_DATA_SIZE;
|
||||
static unsigned short icmp_pkt_size = DEFAULT_PING_DATA_SIZE + ICMP_MINLEN;
|
||||
|
||||
static unsigned int icmp_sent = 0, icmp_recv = 0, icmp_lost = 0;
|
||||
static unsigned int icmp_sent = 0, icmp_recv = 0, icmp_lost = 0, ttl = 0;
|
||||
#define icmp_pkts_en_route (icmp_sent - (icmp_recv + icmp_lost))
|
||||
static unsigned short targets_down = 0, targets = 0, packets = 0;
|
||||
#define targets_alive (targets - targets_down)
|
||||
|
|
@ -233,7 +223,6 @@ static pid_t pid;
|
|||
static struct timezone tz;
|
||||
static struct timeval prog_start;
|
||||
static unsigned long long max_completion_time = 0;
|
||||
static unsigned char ttl = 0; /* outgoing ttl */
|
||||
static unsigned int warn_down = 1, crit_down = 1; /* host down threshold values */
|
||||
static int min_hosts_alive = -1;
|
||||
float pkt_backoff_factor = 1.5;
|
||||
|
|
@ -410,6 +399,7 @@ main(int argc, char **argv)
|
|||
#ifdef SO_TIMESTAMP
|
||||
int on = 1;
|
||||
#endif
|
||||
char *source_ip = NULL;
|
||||
char * opts_str = "vhVw:c:n:p:t:H:s:i:b:I:l:m:64";
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
|
@ -464,7 +454,6 @@ main(int argc, char **argv)
|
|||
/* Parse protocol arguments first */
|
||||
for(i = 1; i < argc; i++) {
|
||||
while((arg = getopt(argc, argv, opts_str)) != EOF) {
|
||||
unsigned short size;
|
||||
switch(arg) {
|
||||
case '4':
|
||||
if (address_family != -1)
|
||||
|
|
@ -487,10 +476,10 @@ main(int argc, char **argv)
|
|||
/* Reset argument scanning */
|
||||
optind = 1;
|
||||
|
||||
unsigned short size;
|
||||
/* parse the arguments */
|
||||
for(i = 1; i < argc; i++) {
|
||||
while((arg = getopt(argc, argv, opts_str)) != EOF) {
|
||||
unsigned short size;
|
||||
switch(arg) {
|
||||
case 'v':
|
||||
debug++;
|
||||
|
|
@ -502,7 +491,7 @@ main(int argc, char **argv)
|
|||
icmp_data_size = size;
|
||||
icmp_pkt_size = size + ICMP_MINLEN;
|
||||
} else
|
||||
usage_va("ICMP data length must be between: %d and %d",
|
||||
usage_va("ICMP data length must be between: %lu and %lu",
|
||||
sizeof(struct icmp) + sizeof(struct icmp_ping_data),
|
||||
MAX_PING_DATA - 1);
|
||||
break;
|
||||
|
|
@ -530,7 +519,7 @@ main(int argc, char **argv)
|
|||
add_target(optarg);
|
||||
break;
|
||||
case 'l':
|
||||
ttl = (unsigned char)strtoul(optarg, NULL, 0);
|
||||
ttl = (int)strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
case 'm':
|
||||
min_hosts_alive = (int)strtoul(optarg, NULL, 0);
|
||||
|
|
@ -542,7 +531,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
case 's': /* specify source IP address */
|
||||
set_source_ip(optarg);
|
||||
source_ip = optarg;
|
||||
break;
|
||||
case 'V': /* version */
|
||||
print_revision (progname, NP_VERSION);
|
||||
|
|
@ -597,6 +586,8 @@ main(int argc, char **argv)
|
|||
sockets |= HAVE_ICMP;
|
||||
else icmp_sockerrno = errno;
|
||||
|
||||
if( source_ip )
|
||||
set_source_ip(source_ip);
|
||||
|
||||
#ifdef SO_TIMESTAMP
|
||||
if(setsockopt(icmp_sock, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on)))
|
||||
|
|
@ -717,7 +708,7 @@ main(int argc, char **argv)
|
|||
static void
|
||||
run_checks()
|
||||
{
|
||||
u_int i, t, result;
|
||||
u_int i, t;
|
||||
u_int final_wait, time_passed;
|
||||
|
||||
/* this loop might actually violate the pkt_interval or target_interval
|
||||
|
|
@ -735,9 +726,9 @@ run_checks()
|
|||
|
||||
/* we're still in the game, so send next packet */
|
||||
(void)send_icmp_ping(icmp_sock, table[t]);
|
||||
result = wait_for_reply(icmp_sock, target_interval);
|
||||
wait_for_reply(icmp_sock, target_interval);
|
||||
}
|
||||
result = wait_for_reply(icmp_sock, pkt_interval * targets);
|
||||
wait_for_reply(icmp_sock, pkt_interval * targets);
|
||||
}
|
||||
|
||||
if(icmp_pkts_en_route && targets_alive) {
|
||||
|
|
@ -757,7 +748,7 @@ run_checks()
|
|||
* haven't yet */
|
||||
if(debug) printf("Waiting for %u micro-seconds (%0.3f msecs)\n",
|
||||
final_wait, (float)final_wait / 1000);
|
||||
result = wait_for_reply(icmp_sock, final_wait);
|
||||
wait_for_reply(icmp_sock, final_wait);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -776,7 +767,7 @@ static int
|
|||
wait_for_reply(int sock, u_int t)
|
||||
{
|
||||
int n, hlen;
|
||||
static unsigned char buf[4096];
|
||||
static unsigned char buf[65536];
|
||||
struct sockaddr_storage resp_addr;
|
||||
union ip_hdr *ip;
|
||||
union icmp_packet packet;
|
||||
|
|
@ -913,15 +904,33 @@ wait_for_reply(int sock, u_int t)
|
|||
if(debug) {
|
||||
char address[INET6_ADDRSTRLEN];
|
||||
parse_address(&resp_addr, address, sizeof(address));
|
||||
printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n",
|
||||
(float)tdiff / 1000, address,
|
||||
ttl, ip->ip.ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000);
|
||||
|
||||
switch(address_family) {
|
||||
case AF_INET: {
|
||||
printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n",
|
||||
(float)tdiff / 1000,
|
||||
address,
|
||||
ttl,
|
||||
ip->ip.ip_ttl,
|
||||
(float)host->rtmax / 1000,
|
||||
(float)host->rtmin / 1000);
|
||||
break;
|
||||
};
|
||||
case AF_INET6: {
|
||||
printf("%0.3f ms rtt from %s, outgoing ttl: %u, max: %0.3f, min: %0.3f\n",
|
||||
(float)tdiff / 1000,
|
||||
address,
|
||||
ttl,
|
||||
(float)host->rtmax / 1000,
|
||||
(float)host->rtmin / 1000);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/* if we're in hostcheck mode, exit with limited printouts */
|
||||
if(mode == MODE_HOSTCHECK) {
|
||||
printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|"
|
||||
"pkt=%u;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
|
||||
"pkt=%u;;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
|
||||
host->name, icmp_recv, (float)tdiff / 1000,
|
||||
icmp_recv, packets, (float)tdiff / 1000,
|
||||
(float)warn.rta / 1000, (float)crit.rta / 1000);
|
||||
|
|
@ -938,6 +947,7 @@ static int
|
|||
send_icmp_ping(int sock, struct rta_host *host)
|
||||
{
|
||||
long int len;
|
||||
size_t addrlen;
|
||||
struct icmp_ping_data data;
|
||||
struct msghdr hdr;
|
||||
struct iovec iov;
|
||||
|
|
@ -969,6 +979,7 @@ send_icmp_ping(int sock, struct rta_host *host)
|
|||
|
||||
if (address_family == AF_INET) {
|
||||
struct icmp *icp = (struct icmp*)buf;
|
||||
addrlen = sizeof(struct sockaddr_in);
|
||||
|
||||
memcpy(&icp->icmp_data, &data, sizeof(data));
|
||||
|
||||
|
|
@ -977,7 +988,7 @@ send_icmp_ping(int sock, struct rta_host *host)
|
|||
icp->icmp_cksum = 0;
|
||||
icp->icmp_id = htons(pid);
|
||||
icp->icmp_seq = htons(host->id++);
|
||||
icp->icmp_cksum = icmp_checksum((unsigned short*)buf, icmp_pkt_size);
|
||||
icp->icmp_cksum = icmp_checksum((uint16_t*)buf, (size_t)icmp_pkt_size);
|
||||
|
||||
if (debug > 2)
|
||||
printf("Sending ICMP echo-request of len %lu, id %u, seq %u, cksum 0x%X to host %s\n",
|
||||
|
|
@ -985,7 +996,10 @@ send_icmp_ping(int sock, struct rta_host *host)
|
|||
}
|
||||
else {
|
||||
struct icmp6_hdr *icp6 = (struct icmp6_hdr*)buf;
|
||||
addrlen = sizeof(struct sockaddr_in6);
|
||||
|
||||
memcpy(&icp6->icmp6_dataun.icmp6_un_data8[4], &data, sizeof(data));
|
||||
|
||||
icp6->icmp6_type = ICMP6_ECHO_REQUEST;
|
||||
icp6->icmp6_code = 0;
|
||||
icp6->icmp6_cksum = 0;
|
||||
|
|
@ -1006,7 +1020,7 @@ send_icmp_ping(int sock, struct rta_host *host)
|
|||
|
||||
memset(&hdr, 0, sizeof(hdr));
|
||||
hdr.msg_name = (struct sockaddr *)&host->saddr_in;
|
||||
hdr.msg_namelen = sizeof(struct sockaddr_storage);
|
||||
hdr.msg_namelen = addrlen;
|
||||
hdr.msg_iov = &iov;
|
||||
hdr.msg_iovlen = 1;
|
||||
|
||||
|
|
@ -1293,7 +1307,7 @@ add_target_ip(char *arg, struct sockaddr_storage *in)
|
|||
if(!host) {
|
||||
char straddr[INET6_ADDRSTRLEN];
|
||||
parse_address((struct sockaddr_storage*)&in, straddr, sizeof(straddr));
|
||||
crash("add_target_ip(%s, %s): malloc(%d) failed",
|
||||
crash("add_target_ip(%s, %s): malloc(%lu) failed",
|
||||
arg, straddr, sizeof(struct rta_host));
|
||||
}
|
||||
memset(host, 0, sizeof(struct rta_host));
|
||||
|
|
@ -1514,18 +1528,19 @@ get_threshold(char *str, threshold *th)
|
|||
}
|
||||
|
||||
unsigned short
|
||||
icmp_checksum(unsigned short *p, int n)
|
||||
icmp_checksum(uint16_t *p, size_t n)
|
||||
{
|
||||
unsigned short cksum;
|
||||
long sum = 0;
|
||||
|
||||
while(n > 2) {
|
||||
sum += *p++;
|
||||
n -= sizeof(unsigned short);
|
||||
/* sizeof(uint16_t) == 2 */
|
||||
while(n >= 2) {
|
||||
sum += *(p++);
|
||||
n -= 2;
|
||||
}
|
||||
|
||||
/* mop up the occasional odd byte */
|
||||
if(n == 1) sum += (unsigned char)*p;
|
||||
if(n == 1) sum += *((uint8_t *)p -1);
|
||||
|
||||
sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */
|
||||
sum += (sum >> 16); /* add carry */
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ if ($allow_sudo eq "yes" or $> == 0) {
|
|||
my $sudo = $> == 0 ? '' : 'sudo';
|
||||
|
||||
my $successOutput = '/OK: Received \d+ DHCPOFFER\(s\), \d+ of 1 requested servers responded, max lease time = \d+ sec\./';
|
||||
my $failureOutput = '/CRITICAL: No DHCPOFFERs were received/';
|
||||
my $failureOutput = '/CRITICAL: (No DHCPOFFERs were received|Received \d+ DHCPOFFER\(s\), 0 of 1 requested servers responded, max lease time = \d+ sec\.)/';
|
||||
my $invalidOutput = '/Invalid hostname/';
|
||||
|
||||
my $host_responsive = getTestParameter( "NP_HOST_DHCP_RESPONSIVE",
|
||||
|
|
@ -36,7 +36,12 @@ my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
|
|||
|
||||
# try to determince interface
|
||||
my $interface = '';
|
||||
if(`ifconfig -a 2>/dev/null` =~ m/^(e\w*\d+)/mx and $1 ne 'eth0') {
|
||||
|
||||
# find interface used for default route
|
||||
if (-x '/usr/sbin/ip' and `/usr/sbin/ip route get 1.1.1.1 2>/dev/null` =~ m/\sdev\s(\S+)/) {
|
||||
$interface = "-i $1";
|
||||
}
|
||||
elsif (`ifconfig -a 2>/dev/null` =~ m/^(e\w*\d+)/mx and $1 ne 'eth0') {
|
||||
$interface = ' -i '.$1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ my $allow_sudo = getTestParameter( "NP_ALLOW_SUDO",
|
|||
"no" );
|
||||
|
||||
if ($allow_sudo eq "yes" or $> == 0) {
|
||||
plan tests => 16;
|
||||
plan tests => 20;
|
||||
} else {
|
||||
plan skip_all => "Need sudo to test check_icmp";
|
||||
}
|
||||
|
|
@ -83,3 +83,14 @@ $res = NPTest->testCmd(
|
|||
is( $res->return_code, 2, "One of two host nonresponsive - two required" );
|
||||
like( $res->output, $failureOutput, "Output OK" );
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"$sudo ./check_icmp -H $host_responsive -s 127.0.15.15 -w 10000ms,100% -c 10000ms,100% -n 1 -m 2"
|
||||
);
|
||||
is( $res->return_code, 0, "IPv4 source_ip accepted" );
|
||||
like( $res->output, $successOutput, "Output OK" );
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"$sudo ./check_icmp -H $host_responsive -b 65507"
|
||||
);
|
||||
is( $res->return_code, 0, "Try max paket size" );
|
||||
like( $res->output, $successOutput, "Output OK - Didn't overflow" );
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -15,23 +14,61 @@
|
|||
|
||||
@SET_MAKE@
|
||||
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -50,8 +87,6 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = plugins-scripts
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/utils.pm.in $(srcdir)/utils.sh.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -154,6 +189,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = utils.pm utils.sh
|
||||
|
|
@ -187,6 +223,18 @@ am__uninstall_files_from_dir = { \
|
|||
}
|
||||
am__installdirs = "$(DESTDIR)$(libexecdir)"
|
||||
SCRIPTS = $(libexec_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
|
|
@ -194,8 +242,186 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__tty_colors_dummy = \
|
||||
mgn= red= grn= lgn= blu= brg= std=; \
|
||||
am__color_tests=no
|
||||
am__tty_colors = { \
|
||||
$(am__tty_colors_dummy); \
|
||||
if test "X$(AM_COLOR_TESTS)" = Xno; then \
|
||||
am__color_tests=no; \
|
||||
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
|
||||
am__color_tests=yes; \
|
||||
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
|
||||
am__color_tests=yes; \
|
||||
fi; \
|
||||
if test $$am__color_tests = yes; then \
|
||||
red='[0;31m'; \
|
||||
grn='[0;32m'; \
|
||||
lgn='[1;32m'; \
|
||||
blu='[1;34m'; \
|
||||
mgn='[0;35m'; \
|
||||
brg='[1m'; \
|
||||
std='[m'; \
|
||||
fi; \
|
||||
}
|
||||
am__recheck_rx = ^[ ]*:recheck:[ ]*
|
||||
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
|
||||
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, print the name of the tests that are to be re-run
|
||||
# upon "make recheck".
|
||||
am__list_recheck_tests = $(AWK) '{ \
|
||||
recheck = 1; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
{ \
|
||||
if ((getline line2 < ($$0 ".log")) < 0) \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
|
||||
{ \
|
||||
recheck = 0; \
|
||||
break; \
|
||||
} \
|
||||
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
}; \
|
||||
if (recheck) \
|
||||
print $$0; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# A command that, given a newline-separated list of test names on the
|
||||
# standard input, create the global log from their .trs and .log files.
|
||||
am__create_global_log = $(AWK) ' \
|
||||
function fatal(msg) \
|
||||
{ \
|
||||
print "fatal: making $@: " msg | "cat >&2"; \
|
||||
exit 1; \
|
||||
} \
|
||||
function rst_section(header) \
|
||||
{ \
|
||||
print header; \
|
||||
len = length(header); \
|
||||
for (i = 1; i <= len; i = i + 1) \
|
||||
printf "="; \
|
||||
printf "\n\n"; \
|
||||
} \
|
||||
{ \
|
||||
copy_in_global_log = 1; \
|
||||
global_test_result = "RUN"; \
|
||||
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".trs"); \
|
||||
if (line ~ /$(am__global_test_result_rx)/) \
|
||||
{ \
|
||||
sub("$(am__global_test_result_rx)", "", line); \
|
||||
sub("[ ]*$$", "", line); \
|
||||
global_test_result = line; \
|
||||
} \
|
||||
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
|
||||
copy_in_global_log = 0; \
|
||||
}; \
|
||||
if (copy_in_global_log) \
|
||||
{ \
|
||||
rst_section(global_test_result ": " $$0); \
|
||||
while ((rc = (getline line < ($$0 ".log"))) != 0) \
|
||||
{ \
|
||||
if (rc < 0) \
|
||||
fatal("failed to read from " $$0 ".log"); \
|
||||
print line; \
|
||||
}; \
|
||||
printf "\n"; \
|
||||
}; \
|
||||
close ($$0 ".trs"); \
|
||||
close ($$0 ".log"); \
|
||||
}'
|
||||
# Restructured Text title.
|
||||
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
am__check_pre = \
|
||||
$(am__sh_e_setup); \
|
||||
$(am__vpath_adj_setup) $(am__vpath_adj) \
|
||||
$(am__tty_colors); \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
case "$@" in \
|
||||
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
|
||||
*) am__odir=.;; \
|
||||
esac; \
|
||||
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|
||||
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
|
||||
if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
am__enable_hard_errors=yes; \
|
||||
fi; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
|
||||
am__expect_failure=yes;; \
|
||||
*) \
|
||||
am__expect_failure=no;; \
|
||||
esac; \
|
||||
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
|
||||
# A shell command to get the names of the tests scripts with any registered
|
||||
# extension removed (i.e., equivalently, the names of the test logs, with
|
||||
# the '.log' extension removed). The result is saved in the shell variable
|
||||
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
|
||||
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
|
||||
# since that might cause problem with VPATH rewrites for suffix-less tests.
|
||||
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
|
||||
am__set_TESTS_bases = \
|
||||
bases='$(TEST_LOGS)'; \
|
||||
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
|
||||
bases=`echo $$bases`
|
||||
AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
|
||||
RECHECK_LOGS = $(TEST_LOGS)
|
||||
AM_RECURSIVE_TARGETS = check recheck
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
TEST_EXTENSIONS = @EXEEXT@ .test
|
||||
am__test_logs1 = $(TESTS:=.log)
|
||||
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
|
||||
TEST_LOGS = $(am__test_logs2:.test.log=.log)
|
||||
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
|
||||
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
|
||||
$(TEST_LOG_FLAGS)
|
||||
am__set_b = \
|
||||
case '$@' in \
|
||||
*/*) \
|
||||
case '$*' in \
|
||||
*/*) b='$*';; \
|
||||
*) b=`echo '$@' | sed 's/\.log$$//'`; \
|
||||
esac;; \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/utils.pm.in \
|
||||
$(srcdir)/utils.sh.in $(top_srcdir)/build-aux/mkinstalldirs \
|
||||
$(top_srcdir)/build-aux/test-driver
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
VPATH = $(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
|
||||
pkglibexecdir = @pkglibexecdir@
|
||||
|
|
@ -203,6 +429,7 @@ ACLOCAL = @ACLOCAL@
|
|||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1328,6 +1555,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1363,7 +1591,7 @@ CLEANFILES = $(libexec_SCRIPTS)
|
|||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .pl .sh
|
||||
.SUFFIXES: .pl .sh .log .test .test$(EXEEXT) .trs
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
|
|
@ -1376,14 +1604,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins-scripts/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu plugins-scripts/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1439,107 +1666,173 @@ mostlyclean-libtool:
|
|||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
tags TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
$(am__tty_colors); \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=XPASS; \
|
||||
;; \
|
||||
*) \
|
||||
col=$$grn; res=PASS; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
col=$$lgn; res=XFAIL; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=FAIL; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
col=$$blu; res=SKIP; \
|
||||
fi; \
|
||||
echo "$${col}$$res$${std}: $$tst"; \
|
||||
# Recover from deleted '.trs' file; this should ensure that
|
||||
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
|
||||
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
|
||||
# to avoid problems with "make -n".
|
||||
.log.trs:
|
||||
rm -f $< $@
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
|
||||
# Leading 'am--fnord' is there to ensure the list of targets does not
|
||||
# expand to empty, as could happen e.g. with make check TESTS=''.
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
redo_bases=`for i in $$bases; do \
|
||||
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
|
||||
done`; \
|
||||
if test -n "$$redo_bases"; then \
|
||||
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
|
||||
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$$am__remaking_logs"; then \
|
||||
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
|
||||
"recursion detected" >&2; \
|
||||
elif test -n "$$redo_logs"; then \
|
||||
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
|
||||
fi; \
|
||||
if $(am__make_dryrun); then :; else \
|
||||
st=0; \
|
||||
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
|
||||
for i in $$redo_bases; do \
|
||||
test -f $$i.trs && test -r $$i.trs \
|
||||
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
|
||||
test -f $$i.log && test -r $$i.log \
|
||||
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
|
||||
done; \
|
||||
if test "$$all" -eq 1; then \
|
||||
tests="test"; \
|
||||
All=""; \
|
||||
else \
|
||||
tests="tests"; \
|
||||
All="All "; \
|
||||
fi; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="$$All$$all $$tests passed"; \
|
||||
test $$st -eq 0 || exit 1; \
|
||||
fi
|
||||
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
|
||||
ws='[ ]'; \
|
||||
results=`for b in $$bases; do echo $$b.trs; done`; \
|
||||
test -n "$$results" || results=/dev/null; \
|
||||
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
|
||||
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
|
||||
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
|
||||
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
|
||||
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
|
||||
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
|
||||
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
|
||||
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
|
||||
success=true; \
|
||||
else \
|
||||
success=false; \
|
||||
fi; \
|
||||
br='==================='; br=$$br$$br$$br$$br; \
|
||||
result_count () \
|
||||
{ \
|
||||
if test x"$$1" = x"--maybe-color"; then \
|
||||
maybe_colorize=yes; \
|
||||
elif test x"$$1" = x"--no-color"; then \
|
||||
maybe_colorize=no; \
|
||||
else \
|
||||
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
|
||||
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all $$tests failed"; \
|
||||
shift; \
|
||||
desc=$$1 count=$$2; \
|
||||
if test $$maybe_colorize = yes && test $$count -gt 0; then \
|
||||
color_start=$$3 color_end=$$std; \
|
||||
else \
|
||||
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
|
||||
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
|
||||
color_start= color_end=; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
if test "$$skip" -eq 1; then \
|
||||
skipped="($$skip test was not run)"; \
|
||||
else \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
fi; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
fi; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
echo "$${col}$$banner$${std}"; \
|
||||
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
|
||||
test -z "$$report" || echo "$${col}$$report$${std}"; \
|
||||
echo "$${col}$$dashes$${std}"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
echo "$${color_start}# $$desc $$count$${color_end}"; \
|
||||
}; \
|
||||
create_testsuite_report () \
|
||||
{ \
|
||||
result_count $$1 "TOTAL:" $$all "$$brg"; \
|
||||
result_count $$1 "PASS: " $$pass "$$grn"; \
|
||||
result_count $$1 "SKIP: " $$skip "$$blu"; \
|
||||
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
|
||||
result_count $$1 "FAIL: " $$fail "$$red"; \
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for b in $$bases; do echo $$b; done \
|
||||
| $(am__create_global_log); \
|
||||
} >$(TEST_SUITE_LOG).tmp || exit 1; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
if $$success; then \
|
||||
col="$$grn"; \
|
||||
else \
|
||||
col="$$red"; \
|
||||
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
|
||||
fi; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
|
||||
echo "$${col}$$br$${std}"; \
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
check-TESTS:
|
||||
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
|
||||
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
|
||||
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
|
||||
exit $$?;
|
||||
recheck: all
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
|
||||
am__force_recheck=am--force-recheck \
|
||||
TEST_LOGS="$$log_list"; \
|
||||
exit $$?
|
||||
.test.log:
|
||||
@p='$<'; \
|
||||
$(am__set_b); \
|
||||
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
|
||||
@am__EXEEXT_TRUE@ @p='$<'; \
|
||||
@am__EXEEXT_TRUE@ $(am__set_b); \
|
||||
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1597,6 +1890,9 @@ install-strip:
|
|||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
|
@ -1677,17 +1973,19 @@ uninstall-am: uninstall-libexecSCRIPTS
|
|||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
|
||||
clean-libtool clean-local distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-libexecSCRIPTS install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
clean-libtool clean-local cscopelist-am ctags-am distclean \
|
||||
distclean-generic distclean-libtool distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-libexecSCRIPTS install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-libexecSCRIPTS
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
|
||||
uninstall uninstall-am uninstall-libexecSCRIPTS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
@RELEASE_PRESENT_FALSE@NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
|
||||
@RELEASE_PRESENT_FALSE@ @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
|
||||
|
|
|
|||
21
plugins-scripts/check_disk_smb.pl
Executable file → Normal file
21
plugins-scripts/check_disk_smb.pl
Executable file → Normal file
|
|
@ -22,7 +22,7 @@ require 5.004;
|
|||
use POSIX qw(setsid);
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose);
|
||||
use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $opt_C $opt_t $verbose);
|
||||
use vars qw($PROGNAME);
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin";
|
||||
|
|
@ -43,6 +43,7 @@ $ENV{'ENV'}='';
|
|||
Getopt::Long::Configure('bundling');
|
||||
GetOptions
|
||||
("v" => \$verbose, "verbose" => \$verbose,
|
||||
"t=i" => \$opt_t, "timeout=i" => \$opt_t,
|
||||
"P=s" => \$opt_P, "port=s" => \$opt_P,
|
||||
"V" => \$opt_V, "version" => \$opt_V,
|
||||
"h" => \$opt_h, "help" => \$opt_h,
|
||||
|
|
@ -53,7 +54,8 @@ GetOptions
|
|||
"s=s" => \$opt_s, "share=s" => \$opt_s,
|
||||
"W=s" => \$opt_W, "workgroup=s" => \$opt_W,
|
||||
"H=s" => \$opt_H, "hostname=s" => \$opt_H,
|
||||
"a=s" => \$opt_a, "address=s" => \$opt_a);
|
||||
"a=s" => \$opt_a, "address=s" => \$opt_a,
|
||||
"C=s" => \$opt_C, "configfile=s" => \$opt_C);
|
||||
|
||||
if ($opt_V) {
|
||||
print_revision($PROGNAME,'@NP_VERSION@'); #'
|
||||
|
|
@ -91,6 +93,12 @@ my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
|
|||
my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/);
|
||||
($crit) || usage("Invalid critical threshold: $opt_c\n");
|
||||
|
||||
($opt_C) || ($opt_C = shift @ARGV) || ($opt_C = "");
|
||||
my $configfile = $opt_C if ($opt_C);
|
||||
usage("Unable to read config file $configfile\n") if ($configfile) && (! -r $configfile);
|
||||
|
||||
if ($opt_t && $opt_t =~ /^([0-9]+)$/) { $TIMEOUT = $1; }
|
||||
|
||||
# Execute the given command line and return anything it writes to STDOUT and/or
|
||||
# STDERR. (This might be useful for other plugins, too, so it should possibly
|
||||
# be moved to utils.pm.)
|
||||
|
|
@ -193,6 +201,7 @@ my @cmd = (
|
|||
defined($workgroup) ? ("-W", $workgroup) : (),
|
||||
defined($address) ? ("-I", $address) : (),
|
||||
defined($opt_P) ? ("-p", $opt_P) : (),
|
||||
defined($configfile) ? ("-s", $configfile) : (),
|
||||
"-c", "du"
|
||||
);
|
||||
|
||||
|
|
@ -292,7 +301,8 @@ exit $ERRORS{$state};
|
|||
|
||||
sub print_usage () {
|
||||
print "Usage: $PROGNAME -H <host> -s <share> -u <user> -p <password>
|
||||
-w <warn> -c <crit> [-W <workgroup>] [-P <port>] [-a <IP>]\n";
|
||||
-w <warn> -c <crit> [-W <workgroup>] [-P <port>] [-a <IP>] [-t timeout]
|
||||
[-C <configfile>]\n";
|
||||
}
|
||||
|
||||
sub print_help () {
|
||||
|
|
@ -318,11 +328,14 @@ Perl Check SMB Disk plugin for monitoring
|
|||
Password to log in to server. (Defaults to an empty password)
|
||||
-w, --warning=INTEGER or INTEGER[kMG]
|
||||
Percent of used space at which a warning will be generated (Default: 85%)
|
||||
|
||||
-c, --critical=INTEGER or INTEGER[kMG]
|
||||
Percent of used space at which a critical will be generated (Defaults: 95%)
|
||||
-t, --timeout=INTEGER
|
||||
Seconds before connection times out (Default: 15)
|
||||
-P, --port=INTEGER
|
||||
Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default)
|
||||
-C, --configfile=STRING
|
||||
Path to configfile which should be used by smbclient (Defaults to smb.conf of your smb installation)
|
||||
|
||||
If thresholds are followed by either a k, M, or G then check to see if that
|
||||
much disk space is available (kilobytes, Megabytes, Gigabytes)
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ sub print_help () {
|
|||
print "\n";
|
||||
print " -i | --ignore-missing : return OK if the file does not exist\n";
|
||||
print " <secs> File must be no more than this many seconds old (default: warn 240 secs, crit 600)\n";
|
||||
print " <size> File must be at least this many bytes long (default: crit 0 bytes)\n\n";
|
||||
print " <size> File must be at least this many bytes long (default: file size is ignored (0 bytes))\n\n";
|
||||
print " Both <secs> and <size> can specify a range using the standard plugin syntax\n";
|
||||
print " If any of the warning and critical arguments are in range syntax (not just bare numbers)\n";
|
||||
print " then all warning and critical arguments will be interpreted as ranges.\n";
|
||||
|
|
|
|||
|
|
@ -124,10 +124,10 @@ if (!defined($session)) {
|
|||
## map ifdescr to ifindex - should look at being able to cache this value
|
||||
|
||||
if (defined $ifdescr || defined $iftype) {
|
||||
# escape "/" in ifdescr - very common in the Cisco world
|
||||
if (defined $iftype) {
|
||||
$status=fetch_ifindex($snmpIfType, $iftype);
|
||||
} else {
|
||||
# escape "/" in ifdescr - very common in the Cisco world
|
||||
$ifdescr =~ s/\//\\\//g;
|
||||
$status=fetch_ifindex($snmpIfDescr, $ifdescr); # if using on device with large number of interfaces
|
||||
# recommend use of SNMP v2 (get-bulk)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ $ENV{'ENV'}='';
|
|||
# -----------------------------------------------------------------[ Global ]--
|
||||
|
||||
$PROGNAME = "check_ircd";
|
||||
my $NICK="ircd$$";
|
||||
# nickname shouldn't be longer than 9 chars, this might happen with large PIDs
|
||||
# To prevent this, we cut of the part over 10000
|
||||
my $NICK="ircd" . $$ % 10000;
|
||||
my $USER_INFO="monitor localhost localhost : ";
|
||||
|
||||
# -------------------------------------------------------------[ connection ]--
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Log file pattern detector plugin for monitoring
|
||||
# Written by Ethan Galstad (nagios@nagios.org)
|
||||
# Last Modified: 07-31-1999
|
||||
# Written originally by Ethan Galstad (nagios@nagios.org)
|
||||
#
|
||||
# Usage: ./check_log <log_file> <old_log_file> <pattern>
|
||||
#
|
||||
|
|
@ -44,6 +43,10 @@
|
|||
# check the same <log_file> for pattern matches. This is necessary
|
||||
# because of the way the script operates.
|
||||
#
|
||||
# 4. This plugin does NOT have an understanding of logrotation or similar
|
||||
# mechanisms. Therefore bad timing could lead to missing events
|
||||
#
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# Check for login failures in the syslog...
|
||||
|
|
@ -60,20 +63,25 @@
|
|||
|
||||
PATH="@TRUSTED_PATH@"
|
||||
export PATH
|
||||
PROGNAME=`basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
PROGNAME=$(basename "$0")
|
||||
PROGPATH=$(echo "$0" | sed -e 's,[\\/][^\\/][^\\/]*$,,')
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
. "$PROGPATH"/utils.sh
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: $PROGNAME -F logfile -O oldlog -q query"
|
||||
echo "Usage: $PROGNAME --help"
|
||||
echo "Usage: $PROGNAME --version"
|
||||
echo ""
|
||||
echo "Other parameters:"
|
||||
echo " -a|--all : Print all matching lines"
|
||||
echo " -p|--perl-regex : Use perl style regular expressions in the query"
|
||||
echo " -e|--extended-regex : Use extended style regular expressions in the query (not necessary for GNU grep)"
|
||||
}
|
||||
|
||||
print_help() {
|
||||
print_revision $PROGNAME $REVISION
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
echo ""
|
||||
print_usage
|
||||
echo ""
|
||||
|
|
@ -87,7 +95,7 @@ print_help() {
|
|||
|
||||
if [ $# -lt 1 ]; then
|
||||
print_usage
|
||||
exit $STATE_UNKNOWN
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
|
||||
# Grab the command line arguments
|
||||
|
|
@ -100,79 +108,123 @@ while test -n "$1"; do
|
|||
case "$1" in
|
||||
--help)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-h)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
--version)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-V)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
--filename)
|
||||
logfile=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
-F)
|
||||
logfile=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
--oldlog)
|
||||
oldlog=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
-O)
|
||||
oldlog=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
--query)
|
||||
query=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
-q)
|
||||
query=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
-x)
|
||||
exitstatus=$2
|
||||
shift
|
||||
shift 2
|
||||
;;
|
||||
--exitstatus)
|
||||
exitstatus=$2
|
||||
shift 2
|
||||
;;
|
||||
--extended-regex)
|
||||
ERE=1
|
||||
shift
|
||||
;;
|
||||
-e)
|
||||
ERE=1
|
||||
shift
|
||||
;;
|
||||
--perl-regex)
|
||||
PRE=1
|
||||
shift
|
||||
;;
|
||||
-p)
|
||||
PRE=1
|
||||
shift
|
||||
;;
|
||||
--all)
|
||||
ALL=1
|
||||
shift
|
||||
;;
|
||||
-a)
|
||||
ALL=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $1"
|
||||
print_usage
|
||||
exit $STATE_UNKNOWN
|
||||
exit "$STATE_UNKNOWN"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Parameter sanity check
|
||||
if [ $ERE ] && [ $PRE ] ; then
|
||||
echo "Can not use extended and perl regex at the same time"
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
|
||||
GREP="grep"
|
||||
|
||||
if [ $ERE ]; then
|
||||
GREP="grep -E"
|
||||
fi
|
||||
|
||||
if [ $PRE ]; then
|
||||
GREP="grep -P"
|
||||
fi
|
||||
|
||||
# If the source log file doesn't exist, exit
|
||||
|
||||
if [ ! -e $logfile ]; then
|
||||
if [ ! -e "$logfile" ]; then
|
||||
echo "Log check error: Log file $logfile does not exist!"
|
||||
exit $STATE_UNKNOWN
|
||||
elif [ ! -r $logfile ] ; then
|
||||
exit "$STATE_UNKNOWN"
|
||||
elif [ ! -r "$logfile" ] ; then
|
||||
echo "Log check error: Log file $logfile is not readable!"
|
||||
exit $STATE_UNKNOWN
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
# If no oldlog was given this can not work properly, abort then
|
||||
if [ -z "$oldlog" ]; then
|
||||
echo "Oldlog parameter is needed"
|
||||
exit $STATE_UNKNOWN
|
||||
fi
|
||||
|
||||
# If the old log file doesn't exist, this must be the first time
|
||||
# we're running this test, so copy the original log file over to
|
||||
# the old diff file and exit
|
||||
|
||||
if [ ! -e $oldlog ]; then
|
||||
cat $logfile > $oldlog
|
||||
if [ ! -e "$oldlog" ]; then
|
||||
cat "$logfile" > "$oldlog"
|
||||
echo "Log check data initialized..."
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
fi
|
||||
|
||||
# The old log file exists, so compare it to the original log now
|
||||
|
|
@ -180,31 +232,42 @@ fi
|
|||
# The temporary file that the script should use while
|
||||
# processing the log file.
|
||||
if [ -x /bin/mktemp ]; then
|
||||
tempdiff=`/bin/mktemp /tmp/check_log.XXXXXXXXXX`
|
||||
|
||||
tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX)
|
||||
else
|
||||
tempdiff=`/bin/date '+%H%M%S'`
|
||||
tempdiff=$(/bin/date '+%H%M%S')
|
||||
tempdiff="/tmp/check_log.${tempdiff}"
|
||||
touch $tempdiff
|
||||
chmod 600 $tempdiff
|
||||
touch "$tempdiff"
|
||||
chmod 600 "$tempdiff"
|
||||
fi
|
||||
|
||||
diff $logfile $oldlog | grep -v "^>" > $tempdiff
|
||||
diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
|
||||
|
||||
# Count the number of matching log entries we have
|
||||
count=`grep -c "$query" $tempdiff`
|
||||
|
||||
# Get the last matching entry in the diff file
|
||||
lastentry=`grep "$query" $tempdiff | tail -1`
|
||||
if [ $ALL ]; then
|
||||
# Get the last matching entry in the diff file
|
||||
entry=$($GREP "$query" "$tempdiff")
|
||||
|
||||
rm -f $tempdiff
|
||||
cat $logfile > $oldlog
|
||||
# Count the number of matching log entries we have
|
||||
count=$(echo "$entry" | wc -l)
|
||||
|
||||
else
|
||||
# Count the number of matching log entries we have
|
||||
count=$($GREP -c "$query" "$tempdiff")
|
||||
|
||||
# Get the last matching entry in the diff file
|
||||
entry=$($GREP "$query" "$tempdiff" | tail -1)
|
||||
fi
|
||||
|
||||
rm -f "$tempdiff"
|
||||
cat "$logfile" > "$oldlog"
|
||||
|
||||
if [ "$count" = "0" ]; then # no matches, exit with no error
|
||||
echo "Log check ok - 0 pattern matches found"
|
||||
exitstatus=$STATE_OK
|
||||
else # Print total matche count and the last entry we found
|
||||
echo "($count) $lastentry"
|
||||
else # Print total match count and the last entry we found
|
||||
echo "($count) $entry"
|
||||
exitstatus=$STATE_CRITICAL
|
||||
fi
|
||||
|
||||
exit $exitstatus
|
||||
exit "$exitstatus"
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
use POSIX;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t $opt_s
|
||||
$opt_M $mailq $status $state $msg $msg_q $msg_p $opt_W $opt_C $mailq @lines
|
||||
%srcdomains %dstdomains);
|
||||
use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t $opt_s $opt_d
|
||||
$opt_M $mailq $status $state $msg $msg_q $msg_p $opt_W $opt_C $mailq $mailq_args
|
||||
@lines %srcdomains %dstdomains);
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin";
|
||||
use utils qw(%ERRORS &print_revision &support &usage );
|
||||
|
|
@ -48,6 +48,8 @@ $PROGNAME = "check_mailq";
|
|||
$mailq = 'sendmail'; # default
|
||||
$msg_q = 0 ;
|
||||
$msg_p = 0 ;
|
||||
# If appended, must start with a space
|
||||
$mailq_args = '' ;
|
||||
$state = $ERRORS{'UNKNOWN'};
|
||||
|
||||
Getopt::Long::Configure('bundling');
|
||||
|
|
@ -68,6 +70,10 @@ if ($opt_s) {
|
|||
$sudo = "";
|
||||
}
|
||||
|
||||
if ($opt_d) {
|
||||
$mailq_args = $mailq_args . ' -C ' . $opt_d;
|
||||
}
|
||||
|
||||
$SIG{'ALRM'} = sub {
|
||||
print ("ERROR: timed out waiting for $utils::PATH_TO_MAILQ \n");
|
||||
exit $ERRORS{"WARNING"};
|
||||
|
|
@ -309,8 +315,8 @@ elsif ( $mailq eq "postfix" ) {
|
|||
|
||||
## open mailq
|
||||
if ( defined $utils::PATH_TO_MAILQ && -x $utils::PATH_TO_MAILQ ) {
|
||||
if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ | " ) ) {
|
||||
print "ERROR: could not open $utils::PATH_TO_MAILQ \n";
|
||||
if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ$mailq_args | " ) ) {
|
||||
print "ERROR: could not open $utils::PATH_TO_MAILQ$mailq_args \n";
|
||||
exit $ERRORS{'UNKNOWN'};
|
||||
}
|
||||
}elsif( defined $utils::PATH_TO_MAILQ){
|
||||
|
|
@ -330,7 +336,7 @@ elsif ( $mailq eq "postfix" ) {
|
|||
close MAILQ;
|
||||
|
||||
if ( $? ) {
|
||||
print "CRITICAL: Error code ".($?>>8)." returned from $utils::PATH_TO_MAILQ",$/;
|
||||
print "CRITICAL: Error code ".($?>>8)." returned from $utils::PATH_TO_MAILQ$mailq_args",$/;
|
||||
exit $ERRORS{CRITICAL};
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +349,7 @@ elsif ( $mailq eq "postfix" ) {
|
|||
}elsif ($lines[0]=~/Mail queue is empty/) {
|
||||
$msg_q = 0;
|
||||
}else{
|
||||
print "Couldn't match $utils::PATH_TO_MAILQ output\n";
|
||||
print "Couldn't match $utils::PATH_TO_MAILQ$mailq_args output\n";
|
||||
exit $ERRORS{'UNKNOWN'};
|
||||
}
|
||||
|
||||
|
|
@ -533,7 +539,7 @@ elsif ( $mailq eq "nullmailer" ) {
|
|||
while (<MAILQ>) {
|
||||
#2006-06-22 16:00:00 282 bytes
|
||||
|
||||
if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-2][0-9]\:[0-2][0-9]\s{2}[0-9]+\sbytes$/) {
|
||||
if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-5][0-9]\:[0-5][0-9]\s+[0-9]+\sbytes/) {
|
||||
$msg_q++ ;
|
||||
}
|
||||
}
|
||||
|
|
@ -561,16 +567,17 @@ exit $state;
|
|||
|
||||
sub process_arguments(){
|
||||
GetOptions
|
||||
("V" => \$opt_V, "version" => \$opt_V,
|
||||
"v" => \$opt_v, "verbose" => \$opt_v,
|
||||
"h" => \$opt_h, "help" => \$opt_h,
|
||||
("V" => \$opt_V, "version" => \$opt_V,
|
||||
"v" => \$opt_v, "verbose" => \$opt_v,
|
||||
"h" => \$opt_h, "help" => \$opt_h,
|
||||
"M:s" => \$opt_M, "mailserver:s" => \$opt_M, # mailserver (default sendmail)
|
||||
"w=i" => \$opt_w, "warning=i" => \$opt_w, # warning if above this number
|
||||
"c=i" => \$opt_c, "critical=i" => \$opt_c, # critical if above this number
|
||||
"c=i" => \$opt_c, "critical=i" => \$opt_c, # critical if above this number
|
||||
"W=i" => \$opt_W, "warning-domain=i" => \$opt_W, # Warning if above this number
|
||||
"C=i" => \$opt_C, "critical-domain=i" => \$opt_C, # Critical if above this number
|
||||
"t=i" => \$opt_t, "timeout=i" => \$opt_t,
|
||||
"s" => \$opt_s, "sudo" => \$opt_s,
|
||||
"W=i" => \$opt_W, # warning if above this number
|
||||
"C=i" => \$opt_C, # critical if above this number
|
||||
"d:s" => \$opt_d, "configdir:s" => \$opt_d,
|
||||
);
|
||||
|
||||
if ($opt_V) {
|
||||
|
|
@ -651,7 +658,7 @@ sub process_arguments(){
|
|||
}
|
||||
|
||||
sub print_usage () {
|
||||
print "Usage: $PROGNAME -w <warn> -c <crit> [-W <warn>] [-C <crit>] [-M <MTA>] [-t <timeout>] [-s] [-v]\n";
|
||||
print "Usage: $PROGNAME -w <warn> -c <crit> [-W <warn>] [-C <crit>] [-M <MTA>] [-t <timeout>] [-s] [-d <CONFIGDIR>] [-v]\n";
|
||||
}
|
||||
|
||||
sub print_help () {
|
||||
|
|
@ -664,14 +671,15 @@ sub print_help () {
|
|||
print " Feedback/patches to support non-sendmail mailqueue welcome\n\n";
|
||||
print "-w (--warning) = Min. number of messages in queue to generate warning\n";
|
||||
print "-c (--critical) = Min. number of messages in queue to generate critical alert ( w < c )\n";
|
||||
print "-W = Min. number of messages for same domain in queue to generate warning\n";
|
||||
print "-C = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n";
|
||||
print "-W (--warning-domain) = Min. number of messages for same domain in queue to generate warning\n";
|
||||
print "-C (--critical-domain) = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n";
|
||||
print "-t (--timeout) = Plugin timeout in seconds (default = $utils::TIMEOUT)\n";
|
||||
print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)\n";
|
||||
print "-s (--sudo) = Use sudo to call the mailq command\n";
|
||||
print "-d (--configdir) = Config file or directory\n";
|
||||
print "-h (--help)\n";
|
||||
print "-V (--version)\n";
|
||||
print "-v (--verbose) = debugging output\n";
|
||||
print "-v (--verbose) = debugging output\n";
|
||||
print "\n\n";
|
||||
print "Note: -w and -c are required arguments. -W and -C are optional.\n";
|
||||
print " -W and -C are applied to domains listed on the queues - both FROM and TO. (sendmail)\n";
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
PATH="@TRUSTED_PATH@"
|
||||
export PATH
|
||||
PROGNAME=`basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
PROGNAME=$(basename "$0")
|
||||
PROGPATH=$(echo "$0" | sed -e 's,[\\/][^\\/][^\\/]*$,,')
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
. "$PROGPATH"/utils.sh
|
||||
|
||||
|
||||
print_usage() {
|
||||
|
|
@ -29,7 +29,7 @@ print_usage() {
|
|||
}
|
||||
|
||||
print_help() {
|
||||
print_revision $PROGNAME $REVISION
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
echo ""
|
||||
print_usage
|
||||
echo ""
|
||||
|
|
@ -87,47 +87,47 @@ esac
|
|||
case "$cmd" in
|
||||
--help)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-h)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
--version)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-V)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Hunt down a reasonable ORACLE_HOME
|
||||
if [ -z "$ORACLE_HOME" ] ; then
|
||||
# Adjust to taste
|
||||
for oratab in /var/opt/oracle/oratab /etc/oratab
|
||||
do
|
||||
[ ! -f $oratab ] && continue
|
||||
ORACLE_HOME=`IFS=:
|
||||
while read SID ORACLE_HOME junk;
|
||||
do
|
||||
if [ "$SID" = "$2" -o "$SID" = "*" ] ; then
|
||||
echo $ORACLE_HOME;
|
||||
exit;
|
||||
fi;
|
||||
done < $oratab`
|
||||
[ -n "$ORACLE_HOME" ] && break
|
||||
done
|
||||
# Adjust to taste
|
||||
for oratab in /var/opt/oracle/oratab /etc/oratab
|
||||
do
|
||||
[ ! -f $oratab ] && continue
|
||||
ORACLE_HOME=`IFS=:
|
||||
while read -r SID ORACLE_HOME junk;
|
||||
do
|
||||
if [ "$SID" = "$2" ] || [ "$SID" = "*" ] ; then
|
||||
echo "$ORACLE_HOME";
|
||||
exit;
|
||||
fi;
|
||||
done < $oratab`
|
||||
[ -n "$ORACLE_HOME" ] && break
|
||||
done
|
||||
fi
|
||||
# Last resort
|
||||
[ -z "$ORACLE_HOME" -a -d $PROGPATH/oracle ] && ORACLE_HOME=$PROGPATH/oracle
|
||||
[ -z "$ORACLE_HOME" ] && [ -d "$PROGPATH"/oracle ] && ORACLE_HOME=$PROGPATH/oracle
|
||||
|
||||
if [ "$cmd" != "--db" ]; then
|
||||
if [ -z "$ORACLE_HOME" -o ! -d "$ORACLE_HOME" ] ; then
|
||||
echo "Cannot determine ORACLE_HOME for sid $2"
|
||||
exit $STATE_UNKNOWN
|
||||
fi
|
||||
if [ -z "$ORACLE_HOME" ] || [ ! -d "$ORACLE_HOME" ] ; then
|
||||
echo "Cannot determine ORACLE_HOME for sid $2"
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
fi
|
||||
PATH=$PATH:$ORACLE_HOME/bin
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
|
||||
|
|
@ -135,81 +135,81 @@ export ORACLE_HOME PATH LD_LIBRARY_PATH
|
|||
|
||||
case "$cmd" in
|
||||
--tns)
|
||||
tnschk=` tnsping $2`
|
||||
tnschk2=` echo $tnschk | grep -c OK`
|
||||
if [ ${tnschk2} -eq 1 ] ; then
|
||||
tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
|
||||
echo "OK - reply time ${tnschk3} from $2"
|
||||
exit $STATE_OK
|
||||
tnschk=$(tnsping "$2")
|
||||
tnschk2=$(echo "$tnschk" | grep -c OK)
|
||||
if [ "${tnschk2}" -eq 1 ] ; then
|
||||
tnschk3=${tnschk##*(}; tnschk3=${tnschk3%)*}
|
||||
echo "OK - reply time ${tnschk3} from $2"
|
||||
exit "$STATE_OK"
|
||||
else
|
||||
echo "No TNS Listener on $2"
|
||||
exit $STATE_CRITICAL
|
||||
echo "No TNS Listener on $2"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
;;
|
||||
--oranames)
|
||||
namesctl status $2 | awk '
|
||||
namesctl status "$2" | awk '
|
||||
/Server has been running for:/ {
|
||||
msg = "OK: Up"
|
||||
for (i = 6; i <= NF; i++) {
|
||||
msg = msg " " $i
|
||||
}
|
||||
status = '$STATE_OK'
|
||||
msg = "OK: Up"
|
||||
for (i = 6; i <= NF; i++) {
|
||||
msg = msg " " $i
|
||||
}
|
||||
status = '"$STATE_OK"'
|
||||
}
|
||||
/error/ {
|
||||
msg = "CRITICAL: " $0
|
||||
status = '$STATE_CRITICAL'
|
||||
msg = "CRITICAL: " $0
|
||||
status = '"$STATE_CRITICAL"'
|
||||
}
|
||||
END {
|
||||
print msg
|
||||
exit status
|
||||
print msg
|
||||
exit status
|
||||
}'
|
||||
;;
|
||||
--db)
|
||||
pmonchk=`ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$"`
|
||||
if [ ${pmonchk} -ge 1 ] ; then
|
||||
echo "${2} OK - ${pmonchk} PMON process(es) running"
|
||||
exit $STATE_OK
|
||||
pmonchk=$(pgrep -f "(asm|ora)_pmon_${2}$")
|
||||
if [ "${pmonchk}" -ge 1 ] ; then
|
||||
echo "${2} OK - ${pmonchk} PMON process(es) running"
|
||||
exit "$STATE_OK"
|
||||
#if [ -f $ORACLE_HOME/dbs/sga*${2}* ] ; then
|
||||
#if [ ${pmonchk} -eq 1 ] ; then
|
||||
#if [ ${pmonchk} -eq 1 ] ; then
|
||||
#utime=`ls -la $ORACLE_HOME/dbs/sga*$2* | cut -c 43-55`
|
||||
#echo "${2} OK - running since ${utime}"
|
||||
#exit $STATE_OK
|
||||
#fi
|
||||
#echo "${2} OK - running since ${utime}"
|
||||
#exit $STATE_OK
|
||||
#fi
|
||||
else
|
||||
echo "${2} Database is DOWN"
|
||||
exit $STATE_CRITICAL
|
||||
echo "${2} Database is DOWN"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
;;
|
||||
--login)
|
||||
loginchk=`sqlplus dummy/user@$2 < /dev/null`
|
||||
loginchk2=` echo $loginchk | grep -c ORA-01017`
|
||||
if [ ${loginchk2} -eq 1 ] ; then
|
||||
echo "OK - dummy login connected"
|
||||
exit $STATE_OK
|
||||
loginchk=$(sqlplus dummy/user@"$2" < /dev/null)
|
||||
loginchk2=$(echo "$loginchk" | grep -c ORA-01017)
|
||||
if [ "${loginchk2}" -eq 1 ] ; then
|
||||
echo "OK - dummy login connected"
|
||||
exit "$STATE_OK"
|
||||
else
|
||||
loginchk3=` echo "$loginchk" | grep "ORA-" | head -1`
|
||||
echo "CRITICAL - $loginchk3"
|
||||
exit $STATE_CRITICAL
|
||||
loginchk3=$(echo "$loginchk" | grep "ORA-" | head -1)
|
||||
echo "CRITICAL - $loginchk3"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
;;
|
||||
--connect)
|
||||
connectchk=`sqlplus $2 < /dev/null`
|
||||
connectchk2=` echo $connectchk | grep -c ORA-`
|
||||
if [ ${connectchk2} -eq 0 ] ; then
|
||||
echo "OK - login successful"
|
||||
exit $STATE_OK
|
||||
connectchk=$(sqlplus "$2" < /dev/null)
|
||||
connectchk2=$(echo "$connectchk" | grep -c ORA-)
|
||||
if [ "${connectchk2}" -eq 0 ] ; then
|
||||
echo "OK - login successful"
|
||||
exit "$STATE_OK"
|
||||
else
|
||||
connectchk3=` echo "$connectchk" | grep "ORA-" | head -1`
|
||||
echo "CRITICAL - $connectchk3"
|
||||
exit $STATE_CRITICAL
|
||||
connectchk3=$(echo "$connectchk" | grep "ORA-" | head -1)
|
||||
echo "CRITICAL - $connectchk3"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
;;
|
||||
--cache)
|
||||
if [ ${5} -gt ${6} ] ; then
|
||||
echo "UNKNOWN - Warning level is less then Crit"
|
||||
exit $STATE_UNKNOWN
|
||||
if [ "${5}" -gt "${6}" ] ; then
|
||||
echo "UNKNOWN - Warning level is less then Crit"
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
result=`sqlplus -s ${3}/${4}@${2} << EOF
|
||||
result=`sqlplus -s "${3}"/"${4}"@"${2}" << EOF
|
||||
set pagesize 0
|
||||
set numf '9999999.99'
|
||||
select (1-(pr.value/(dbg.value+cg.value)))*100
|
||||
|
|
@ -219,48 +219,48 @@ and dbg.name='db block gets'
|
|||
and cg.name='consistent gets';
|
||||
EOF`
|
||||
|
||||
if [ -n "`echo $result | grep ORA-`" ] ; then
|
||||
error=` echo "$result" | grep "ORA-" | head -1`
|
||||
echo "CRITICAL - $error"
|
||||
exit $STATE_CRITICAL
|
||||
if echo "$result" | grep -q 'ORA-' ; then
|
||||
error=$(echo "$result" | grep "ORA-" | head -1)
|
||||
echo "CRITICAL - $error"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
|
||||
buf_hr=`echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}'`
|
||||
buf_hrx=`echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}'`
|
||||
result=`sqlplus -s ${3}/${4}@${2} << EOF
|
||||
buf_hr=$(echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}')
|
||||
buf_hrx=$(echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}')
|
||||
result=`sqlplus -s "${3}"/"${4}"@"${2}" << EOF
|
||||
set pagesize 0
|
||||
set numf '9999999.99'
|
||||
select sum(lc.pins)/(sum(lc.pins)+sum(lc.reloads))*100
|
||||
from v\\$librarycache lc;
|
||||
EOF`
|
||||
|
||||
if [ -n "`echo $result | grep ORA-`" ] ; then
|
||||
error=` echo "$result" | grep "ORA-" | head -1`
|
||||
echo "CRITICAL - $error"
|
||||
exit $STATE_CRITICAL
|
||||
|
||||
if echo "$result" | grep -q 'ORA-' ; then
|
||||
error=$(echo "$result" | grep "ORA-" | head -1)
|
||||
echo "CRITICAL - $error"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
|
||||
lib_hr=`echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}'`
|
||||
lib_hrx=`echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}'`
|
||||
lib_hr=$(echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}')
|
||||
lib_hrx=$(echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}')
|
||||
|
||||
if [ $buf_hr -le ${5} -o $lib_hr -le ${5} ] ; then
|
||||
echo "${2} CRITICAL - Cache Hit Rates: $lib_hrx% Lib -- $buf_hrx% Buff|lib=$lib_hrx%;${6};${5};0;100 buffer=$buf_hrx%;${6};${5};0;100"
|
||||
exit $STATE_CRITICAL
|
||||
if [ "$buf_hr" -le "${5}" ] || [ "$lib_hr" -le "${5}" ] ; then
|
||||
echo "${2} CRITICAL - Cache Hit Rates: $lib_hrx% Lib -- $buf_hrx% Buff|lib=$lib_hrx%;${6};${5};0;100 buffer=$buf_hrx%;${6};${5};0;100"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
if [ $buf_hr -le ${6} -o $lib_hr -le ${6} ] ; then
|
||||
echo "${2} WARNING - Cache Hit Rates: $lib_hrx% Lib -- $buf_hrx% Buff|lib=$lib_hrx%;${6};${5};0;100 buffer=$buf_hrx%;${6};${5};0;100"
|
||||
exit $STATE_WARNING
|
||||
if [ "$buf_hr" -le "${6}" ] || [ "$lib_hr" -le "${6}" ] ; then
|
||||
echo "${2} WARNING - Cache Hit Rates: $lib_hrx% Lib -- $buf_hrx% Buff|lib=$lib_hrx%;${6};${5};0;100 buffer=$buf_hrx%;${6};${5};0;100"
|
||||
exit "$STATE_WARNING"
|
||||
fi
|
||||
echo "${2} OK - Cache Hit Rates: $lib_hrx% Lib -- $buf_hrx% Buff|lib=$lib_hrx%;${6};${5};0;100 buffer=$buf_hrx%;${6};${5};0;100"
|
||||
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
--tablespace)
|
||||
if [ ${6} -lt ${7} ] ; then
|
||||
echo "UNKNOWN - Warning level is more then Crit"
|
||||
exit $STATE_UNKNOWN
|
||||
if [ "${6}" -lt "${7}" ] ; then
|
||||
echo "UNKNOWN - Warning level is more then Crit"
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
result=`sqlplus -s ${3}/${4}@${2} << EOF
|
||||
result=`sqlplus -s "${3}"/"${4}"@"${2}" << EOF
|
||||
set pagesize 0
|
||||
set numf '9999999.99'
|
||||
select NVL(b.free,0.0),a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc
|
||||
|
|
@ -273,32 +273,32 @@ from dba_free_space group by tablespace_name) B
|
|||
ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}';
|
||||
EOF`
|
||||
|
||||
if [ -n "`echo $result | grep ORA-`" ] ; then
|
||||
error=` echo "$result" | grep "ORA-" | head -1`
|
||||
echo "CRITICAL - $error"
|
||||
exit $STATE_CRITICAL
|
||||
if echo "$result" | grep -q 'ORA-' ; then
|
||||
error=$(echo "$result" | grep "ORA-" | head -1)
|
||||
echo "CRITICAL - $error"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
|
||||
ts_free=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($1)}'`
|
||||
ts_total=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($2)}'`
|
||||
ts_pct=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($3)}'`
|
||||
ts_pctx=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print $3}'`
|
||||
if [ "$ts_free" -eq 0 -a "$ts_total" -eq 0 -a "$ts_pct" -eq 0 ] ; then
|
||||
ts_free=$(echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($1)}')
|
||||
ts_total=$(echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($2)}')
|
||||
ts_pct=$(echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($3)}')
|
||||
ts_pctx=$(echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print $3}')
|
||||
if [ "$ts_free" -eq 0 ] && [ "$ts_total" -eq 0 ] && [ "$ts_pct" -eq 0 ] ; then
|
||||
echo "No data returned by Oracle - tablespace $5 not found?"
|
||||
exit $STATE_UNKNOWN
|
||||
exit "$STATE_UNKNOWN"
|
||||
fi
|
||||
if [ "$ts_pct" -ge ${6} ] ; then
|
||||
echo "${2} : ${5} CRITICAL - $ts_pctx% used [ $ts_free / $ts_total MB available ]|${5}=$ts_pctx%;${7};${6};0;100"
|
||||
exit $STATE_CRITICAL
|
||||
if [ "$ts_pct" -ge "${6}" ] ; then
|
||||
echo "${2} : ${5} CRITICAL - $ts_pctx% used [ $ts_free / $ts_total MB available ]|${5}=$ts_pctx%;${7};${6};0;100"
|
||||
exit "$STATE_CRITICAL"
|
||||
fi
|
||||
if [ "$ts_pct" -ge ${7} ] ; then
|
||||
echo "${2} : ${5} WARNING - $ts_pctx% used [ $ts_free / $ts_total MB available ]|${5}=$ts_pctx%;${7};${6};0;100"
|
||||
exit $STATE_WARNING
|
||||
if [ "$ts_pct" -ge "${7}" ] ; then
|
||||
echo "${2} : ${5} WARNING - $ts_pctx% used [ $ts_free / $ts_total MB available ]|${5}=$ts_pctx%;${7};${6};0;100"
|
||||
exit "$STATE_WARNING"
|
||||
fi
|
||||
echo "${2} : ${5} OK - $ts_pctx% used [ $ts_free / $ts_total MB available ]|${5}=$ts_pctx%;${7};${6};0;100"
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
*)
|
||||
print_usage
|
||||
exit $STATE_UNKNOWN
|
||||
exit "$STATE_UNKNOWN"
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -2,57 +2,57 @@
|
|||
|
||||
PATH="@TRUSTED_PATH@"
|
||||
export PATH
|
||||
PROGNAME=`basename $0`
|
||||
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
PROGNAME=$(basename "$0")
|
||||
PROGPATH=$(echo "$0" | sed -e 's,[\\/][^\\/][^\\/]*$,,')
|
||||
REVISION="@NP_VERSION@"
|
||||
|
||||
. $PROGPATH/utils.sh
|
||||
. "$PROGPATH"/utils.sh
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: $PROGNAME" [--ignore-fault]
|
||||
}
|
||||
|
||||
print_help() {
|
||||
print_revision $PROGNAME $REVISION
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
echo ""
|
||||
print_usage
|
||||
echo ""
|
||||
echo "This plugin checks hardware status using the lm_sensors package."
|
||||
echo ""
|
||||
support
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--help)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-h)
|
||||
print_help
|
||||
exit $STATE_OK
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
--version)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
-V)
|
||||
print_revision $PROGNAME $REVISION
|
||||
exit $STATE_OK
|
||||
print_revision "$PROGNAME" "$REVISION"
|
||||
exit "$STATE_OK"
|
||||
;;
|
||||
*)
|
||||
sensordata=`sensors 2>&1`
|
||||
sensordata=$(sensors 2>&1)
|
||||
status=$?
|
||||
if test ${status} -eq 127; then
|
||||
text="SENSORS UNKNOWN - command not found (did you install lmsensors?)"
|
||||
exit=$STATE_UNKNOWN
|
||||
elif test ${status} -ne 0; then
|
||||
elif test "${status}" -ne 0; then
|
||||
text="WARNING - sensors returned state $status"
|
||||
exit=$STATE_WARNING
|
||||
elif echo ${sensordata} | egrep ALARM > /dev/null; then
|
||||
elif echo "${sensordata}" | grep -E ALARM > /dev/null; then
|
||||
text="SENSOR CRITICAL - Sensor alarm detected!"
|
||||
exit=$STATE_CRITICAL
|
||||
elif echo ${sensordata} | egrep FAULT > /dev/null \
|
||||
elif echo "${sensordata}" | grep -E FAULT > /dev/null \
|
||||
&& test "$1" != "-i" -a "$1" != "--ignore-fault"; then
|
||||
text="SENSOR UNKNOWN - Sensor reported fault"
|
||||
exit=$STATE_UNKNOWN
|
||||
|
|
@ -63,8 +63,8 @@ case "$1" in
|
|||
|
||||
echo "$text"
|
||||
if test "$1" = "-v" -o "$1" = "--verbose"; then
|
||||
echo ${sensordata}
|
||||
echo "${sensordata}"
|
||||
fi
|
||||
exit $exit
|
||||
exit "$exit"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use POSIX;
|
|||
use strict;
|
||||
use Getopt::Long;
|
||||
use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c
|
||||
$opt_f $opt_s
|
||||
$opt_f $opt_s $opt_d
|
||||
$lower_warn_threshold $upper_warn_threshold
|
||||
$lower_crit_threshold $upper_crit_threshold
|
||||
$status $state $msg);
|
||||
|
|
@ -137,9 +137,20 @@ if ( $uptime_seconds > $upper_crit_threshold ) {
|
|||
$state_str = "OK";
|
||||
}
|
||||
|
||||
# Prepare uptime value (seconds or days)
|
||||
my $uptime_text = "";
|
||||
my $uptime_unit = "";
|
||||
if ( $opt_d ) {
|
||||
$uptime_text = floor($uptime_seconds / 60 / 60 / 24);
|
||||
$uptime_unit = "days";
|
||||
} else {
|
||||
$uptime_text = $uptime_seconds;
|
||||
$uptime_unit = "seconds";
|
||||
}
|
||||
|
||||
$msg = "$state_str: ";
|
||||
|
||||
$msg .= "uptime is $uptime_seconds seconds. ";
|
||||
$msg .= "Uptime is $uptime_text $uptime_unit. ";
|
||||
$msg .= "Exceeds $out_of_bounds_text threshold. " if $out_of_bounds_text;
|
||||
$msg .= "Running for $pretty_uptime. " if $opt_f;
|
||||
if ( $opt_s ) {
|
||||
|
|
@ -167,6 +178,7 @@ sub process_arguments(){
|
|||
"c=s" => \$opt_c, "critical=s" => \$opt_c, # critical if above this number
|
||||
"f" => \$opt_f, "for" => \$opt_f, # show "running for ..."
|
||||
"s" => \$opt_s, "since" => \$opt_s, # show "running since ..."
|
||||
"d" => \$opt_d, "days" => \$opt_d, # report uptime in days
|
||||
);
|
||||
|
||||
if ($opt_V) {
|
||||
|
|
@ -262,6 +274,7 @@ sub print_help () {
|
|||
print "-c (--critical) = Min. number of uptime to generate critical alert ( w < c )\n";
|
||||
print "-f (--for) = Show uptime in a pretty format (Running for x weeks, x days, ...)\n";
|
||||
print "-s (--since) = Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s')\n";
|
||||
print "-d (--days) = Show uptime in days\n";
|
||||
print "-h (--help)\n";
|
||||
print "-V (--version)\n";
|
||||
print "-v (--verbose) = debugging output\n";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
|
||||
use strict;
|
||||
use Test::More tests => 40;
|
||||
use Test::More tests => 42;
|
||||
use NPTest;
|
||||
|
||||
my $result;
|
||||
|
|
@ -45,30 +45,36 @@ $result = NPTest->testCmd(
|
|||
cmp_ok( $result->return_code, '==', 2, "Uptime higher than 2 seconds" );
|
||||
like ( $result->output, '/Running since \d+/', "Output for the s parameter correct" );
|
||||
|
||||
$result = NPTest->testCmd(
|
||||
"./check_uptime -d -w 1 -c 2"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 2, "Uptime higher than 2 seconds" );
|
||||
like ( $result->output, '/CRITICAL: Uptime is \d+ days/', "Output for the d parameter correct" );
|
||||
|
||||
$result = NPTest->testCmd(
|
||||
"./check_uptime -w 1 -c 2"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 2, "Uptime higher than 2 seconds" );
|
||||
like ( $result->output, '/^CRITICAL: uptime is \d+ seconds/', "Output for uptime higher than 2 seconds correct" );
|
||||
like ( $result->output, '/^CRITICAL: Uptime is \d+ seconds/', "Output for uptime higher than 2 seconds correct" );
|
||||
|
||||
$result = NPTest->testCmd(
|
||||
"./check_uptime -w 1 -c 9999w"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 1, "Uptime lower than 9999 weeks" );
|
||||
like ( $result->output, '/^WARNING: uptime is \d+ seconds/', "Output for uptime lower than 9999 weeks correct" );
|
||||
like ( $result->output, '/^WARNING: Uptime is \d+ seconds/', "Output for uptime lower than 9999 weeks correct" );
|
||||
|
||||
$result = NPTest->testCmd(
|
||||
"./check_uptime -w 9998w -c 9999w"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 0, "Uptime lower than 9998 weeks" );
|
||||
like ( $result->output, '/^OK: uptime is \d+ seconds/', "Output for uptime lower than 9998 weeks correct" );
|
||||
like ( $result->output, '/^OK: Uptime is \d+ seconds/', "Output for uptime lower than 9998 weeks correct" );
|
||||
like ( $result->output, '/\|uptime=[0-9]+s;6046790400;6047395200;/', "Checking for performance output" );
|
||||
|
||||
$result = NPTest->testCmd(
|
||||
"./check_uptime -w 111222d -c 222333d"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 0, "Uptime lower than 111222 days" );
|
||||
like ( $result->output, '/^OK: uptime is \d+ seconds/', "Output for uptime lower than 111222 days correct" );
|
||||
like ( $result->output, '/^OK: Uptime is \d+ seconds/', "Output for uptime lower than 111222 days correct" );
|
||||
like ( $result->output, '/\|uptime=[0-9]+s;9609580800;19209571200;/', "Checking for performance output" );
|
||||
|
||||
# Same as before, hopefully uptime is higher than 2 seconds so no warning
|
||||
|
|
@ -76,7 +82,7 @@ $result = NPTest->testCmd(
|
|||
"./check_uptime -w 2:111222d -c 1:222333d"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 0, "Uptime lower than 111222 days, and higher 2 seconds" );
|
||||
like ( $result->output, '/^OK: uptime is \d+ seconds/', "Output for uptime lower than 111222 days, and higher 2 seconds correct" );
|
||||
like ( $result->output, '/^OK: Uptime is \d+ seconds/', "Output for uptime lower than 111222 days, and higher 2 seconds correct" );
|
||||
like ( $result->output, '/\|uptime=[0-9]+s;9609580800;19209571200;/', "Checking for performance output" );
|
||||
|
||||
# Same as before, now the low warning should trigger
|
||||
|
|
@ -84,7 +90,7 @@ $result = NPTest->testCmd(
|
|||
"./check_uptime -w 111221d:111222d -c 1:222333d"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 1, "Uptime lower than 111221 days raises warning" );
|
||||
like ( $result->output, '/^WARNING: uptime is \d+ seconds/', "Output for uptime lower than 111221 days correct" );
|
||||
like ( $result->output, '/^WARNING: Uptime is \d+ seconds/', "Output for uptime lower than 111221 days correct" );
|
||||
like ( $result->output, '/Exceeds lower warn threshold/', "Exceeds text correct" );
|
||||
like ( $result->output, '/\|uptime=[0-9]+s;9609580800;19209571200;/', "Checking for performance output" );
|
||||
|
||||
|
|
@ -93,7 +99,7 @@ $result = NPTest->testCmd(
|
|||
"./check_uptime -w 111221d:111222d -c 111220d:222333d"
|
||||
);
|
||||
cmp_ok( $result->return_code, '==', 2, "Uptime lower than 111220 days raises critical" );
|
||||
like ( $result->output, '/^CRITICAL: uptime is \d+ seconds/', "Output for uptime lower than 111220 days correct" );
|
||||
like ( $result->output, '/^CRITICAL: Uptime is \d+ seconds/', "Output for uptime lower than 111220 days correct" );
|
||||
like ( $result->output, '/Exceeds lower crit threshold/', "Exceeds text correct" );
|
||||
like ( $result->output, '/\|uptime=[0-9]+s;9609580800;19209571200;/', "Checking for performance output" );
|
||||
|
||||
|
|
|
|||
1230
plugins/Makefile.in
1230
plugins/Makefile.in
File diff suppressed because it is too large
Load diff
|
|
@ -49,6 +49,8 @@ unsigned int commands = 0;
|
|||
unsigned int services = 0;
|
||||
int skip_stdout = 0;
|
||||
int skip_stderr = 0;
|
||||
int warn_on_stderr = 0;
|
||||
bool unknown_timeout = FALSE;
|
||||
char *remotecmd = NULL;
|
||||
char **commargv = NULL;
|
||||
int commargc = 0;
|
||||
|
|
@ -100,6 +102,13 @@ main (int argc, char **argv)
|
|||
|
||||
result = cmd_run_array (commargv, &chld_out, &chld_err, 0);
|
||||
|
||||
/* SSH returns 255 if connection attempt fails; include the first line of error output */
|
||||
if (result == 255 && unknown_timeout) {
|
||||
printf (_("SSH connection failed: %s\n"),
|
||||
chld_err.lines > 0 ? chld_err.line[0] : "(no error output)");
|
||||
return STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
for(i = 0; i < chld_out.lines; i++)
|
||||
printf("stdout: %s\n", chld_out.line[i]);
|
||||
|
|
@ -116,7 +125,10 @@ main (int argc, char **argv)
|
|||
if(chld_err.lines > skip_stderr) {
|
||||
printf (_("Remote command execution failed: %s\n"),
|
||||
chld_err.line[skip_stderr]);
|
||||
return max_state_alt(result, STATE_UNKNOWN);
|
||||
if ( warn_on_stderr )
|
||||
return max_state_alt(result, STATE_WARNING);
|
||||
else
|
||||
return max_state_alt(result, STATE_UNKNOWN);
|
||||
}
|
||||
|
||||
/* this is simple if we're not supposed to be passive.
|
||||
|
|
@ -176,6 +188,7 @@ process_arguments (int argc, char **argv)
|
|||
{"verbose", no_argument, 0, 'v'},
|
||||
{"fork", no_argument, 0, 'f'},
|
||||
{"timeout", required_argument, 0, 't'},
|
||||
{"unknown-timeout", no_argument, 0, 'U'},
|
||||
{"host", required_argument, 0, 'H'}, /* backward compatibility */
|
||||
{"hostname", required_argument, 0, 'H'},
|
||||
{"port", required_argument,0,'p'},
|
||||
|
|
@ -189,6 +202,7 @@ process_arguments (int argc, char **argv)
|
|||
{"skip", optional_argument, 0, 'S'}, /* backwards compatibility */
|
||||
{"skip-stdout", optional_argument, 0, 'S'},
|
||||
{"skip-stderr", optional_argument, 0, 'E'},
|
||||
{"warn-on-stderr", no_argument, 0, 'W'},
|
||||
{"proto1", no_argument, 0, '1'},
|
||||
{"proto2", no_argument, 0, '2'},
|
||||
{"use-ipv4", no_argument, 0, '4'},
|
||||
|
|
@ -207,7 +221,7 @@ process_arguments (int argc, char **argv)
|
|||
strcpy (argv[c], "-t");
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
|
||||
c = getopt_long (argc, argv, "Vvh1246fqt:UH:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
|
||||
&option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
|
|
@ -229,8 +243,10 @@ process_arguments (int argc, char **argv)
|
|||
else
|
||||
timeout_interval = atoi (optarg);
|
||||
break;
|
||||
case 'U':
|
||||
unknown_timeout = TRUE;
|
||||
break;
|
||||
case 'H': /* host */
|
||||
host_or_die(optarg);
|
||||
hostname = optarg;
|
||||
break;
|
||||
case 'p': /* port number */
|
||||
|
|
@ -308,6 +324,9 @@ process_arguments (int argc, char **argv)
|
|||
else
|
||||
skip_stderr = atoi (optarg);
|
||||
break;
|
||||
case 'W': /* exit with warning if there is an output on stderr */
|
||||
warn_on_stderr = 1;
|
||||
break;
|
||||
case 'o': /* Extra options for the ssh command */
|
||||
comm_append("-o");
|
||||
comm_append(optarg);
|
||||
|
|
@ -329,7 +348,6 @@ process_arguments (int argc, char **argv)
|
|||
if (c <= argc) {
|
||||
die (STATE_UNKNOWN, _("%s: You must provide a host name\n"), progname);
|
||||
}
|
||||
host_or_die(argv[c]);
|
||||
hostname = argv[c++];
|
||||
}
|
||||
|
||||
|
|
@ -415,6 +433,8 @@ print_help (void)
|
|||
printf (" %s\n", _("Ignore all or (if specified) first n lines on STDOUT [optional]"));
|
||||
printf (" %s\n", "-E, --skip-stderr[=n]");
|
||||
printf (" %s\n", _("Ignore all or (if specified) first n lines on STDERR [optional]"));
|
||||
printf (" %s\n", "-W, --warn-on-stderr]");
|
||||
printf (" %s\n", _("Exit with an warning, if there is an output on STDERR"));
|
||||
printf (" %s\n", "-f");
|
||||
printf (" %s\n", _("tells ssh to fork rather than create a tty [optional]. This will always return OK if ssh is executed"));
|
||||
printf (" %s\n","-C, --command='COMMAND STRING'");
|
||||
|
|
@ -437,6 +457,8 @@ print_help (void)
|
|||
printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]"));
|
||||
printf (UT_WARN_CRIT);
|
||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||
printf (" %s\n","-U, --unknown-timeout");
|
||||
printf (" %s\n", _("Make connection problems return UNKNOWN instead of CRITICAL"));
|
||||
printf (UT_VERBOSE);
|
||||
printf("\n");
|
||||
printf (" %s\n", _("The most common mode of use is to refer to a local identity file with"));
|
||||
|
|
@ -466,8 +488,8 @@ void
|
|||
print_usage (void)
|
||||
{
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf (" %s -H <host> -C <command> [-fqv] [-1|-2] [-4|-6]\n"
|
||||
" [-S [lines]] [-E [lines]] [-t timeout] [-i identity]\n"
|
||||
printf (" %s -H <host> -C <command> [-fqvU] [-1|-2] [-4|-6]\n"
|
||||
" [-S [lines]] [-E [lines]] [-W] [-t timeout] [-i identity]\n"
|
||||
" [-l user] [-n name] [-s servicelist] [-O outputfile]\n"
|
||||
" [-p port] [-o ssh-option] [-F configfile]\n",
|
||||
progname);
|
||||
|
|
|
|||
|
|
@ -55,18 +55,24 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#if defined(HAVE_SSL) && defined(USE_OPENSSL)
|
||||
#include <openssl/opensslv.h>
|
||||
#endif
|
||||
|
||||
#include <netdb.h>
|
||||
|
||||
#define MAKE_LIBCURL_VERSION(major, minor, patch) ((major)*0x10000 + (minor)*0x100 + (patch))
|
||||
|
||||
#define DEFAULT_BUFFER_SIZE 2048
|
||||
#define DEFAULT_SERVER_URL "/"
|
||||
#define HTTP_EXPECT "HTTP/"
|
||||
#define DEFAULT_MAX_REDIRS 15
|
||||
#define INET_ADDR_MAX_SIZE INET6_ADDRSTRLEN
|
||||
enum {
|
||||
MAX_IPV4_HOSTLENGTH = 255,
|
||||
HTTP_PORT = 80,
|
||||
HTTPS_PORT = 443,
|
||||
MAX_PORT = 65535
|
||||
MAX_PORT = 65535,
|
||||
DEFAULT_MAX_REDIRS = 15
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -187,6 +193,7 @@ int followsticky = STICKY_NONE;
|
|||
int use_ssl = FALSE;
|
||||
int use_sni = TRUE;
|
||||
int check_cert = FALSE;
|
||||
int continue_after_check_cert = FALSE;
|
||||
typedef union {
|
||||
struct curl_slist* to_info;
|
||||
struct curl_certinfo* to_certinfo;
|
||||
|
|
@ -206,6 +213,7 @@ int maximum_age = -1;
|
|||
int address_family = AF_UNSPEC;
|
||||
curlhelp_ssl_library ssl_library = CURLHELP_SSL_LIBRARY_UNKNOWN;
|
||||
int curl_http_version = CURL_HTTP_VERSION_NONE;
|
||||
int automatic_decompression = FALSE;
|
||||
|
||||
int process_arguments (int, char**);
|
||||
void handle_curl_option_return_code (CURLcode res, const char* option);
|
||||
|
|
@ -285,6 +293,20 @@ int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
|
|||
* TODO: is the last certificate always the server certificate?
|
||||
*/
|
||||
cert = X509_STORE_CTX_get_current_cert(x509_ctx);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
X509_up_ref(cert);
|
||||
#endif
|
||||
if (verbose>=2) {
|
||||
puts("* SSL verify callback with certificate:");
|
||||
X509_NAME *subject, *issuer;
|
||||
printf("* issuer:\n");
|
||||
issuer = X509_get_issuer_name( cert );
|
||||
X509_NAME_print_ex_fp(stdout, issuer, 5, XN_FLAG_MULTILINE);
|
||||
printf("* curl verify_callback:\n* subject:\n");
|
||||
subject = X509_get_subject_name( cert );
|
||||
X509_NAME_print_ex_fp(stdout, subject, 5, XN_FLAG_MULTILINE);
|
||||
puts("");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -350,6 +372,46 @@ handle_curl_option_return_code (CURLcode res, const char* option)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
lookup_host (const char *host, char *buf, size_t buflen)
|
||||
{
|
||||
struct addrinfo hints, *res, *result;
|
||||
int errcode;
|
||||
void *ptr;
|
||||
|
||||
memset (&hints, 0, sizeof (hints));
|
||||
hints.ai_family = address_family;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_flags |= AI_CANONNAME;
|
||||
|
||||
errcode = getaddrinfo (host, NULL, &hints, &result);
|
||||
if (errcode != 0)
|
||||
return errcode;
|
||||
|
||||
res = result;
|
||||
|
||||
while (res) {
|
||||
inet_ntop (res->ai_family, res->ai_addr->sa_data, buf, buflen);
|
||||
switch (res->ai_family) {
|
||||
case AF_INET:
|
||||
ptr = &((struct sockaddr_in *) res->ai_addr)->sin_addr;
|
||||
break;
|
||||
case AF_INET6:
|
||||
ptr = &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr;
|
||||
break;
|
||||
}
|
||||
inet_ntop (res->ai_family, ptr, buf, buflen);
|
||||
if (verbose >= 1)
|
||||
printf ("* getaddrinfo IPv%d address: %s\n",
|
||||
res->ai_family == PF_INET6 ? 6 : 4, buf);
|
||||
res = res->ai_next;
|
||||
}
|
||||
|
||||
freeaddrinfo(result);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
check_http (void)
|
||||
{
|
||||
|
|
@ -357,6 +419,9 @@ check_http (void)
|
|||
int page_len = 0;
|
||||
int i;
|
||||
char *force_host_header = NULL;
|
||||
struct curl_slist *host = NULL;
|
||||
char addrstr[100];
|
||||
char dnscache[DEFAULT_BUFFER_SIZE];
|
||||
|
||||
/* initialize curl */
|
||||
if (curl_global_init (CURL_GLOBAL_DEFAULT) != CURLE_OK)
|
||||
|
|
@ -371,6 +436,13 @@ check_http (void)
|
|||
/* print everything on stdout like check_http would do */
|
||||
handle_curl_option_return_code (curl_easy_setopt(curl, CURLOPT_STDERR, stdout), "CURLOPT_STDERR");
|
||||
|
||||
if (automatic_decompression)
|
||||
#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 21, 6)
|
||||
handle_curl_option_return_code (curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, ""), "CURLOPT_ACCEPT_ENCODING");
|
||||
#else
|
||||
handle_curl_option_return_code (curl_easy_setopt(curl, CURLOPT_ENCODING, ""), "CURLOPT_ENCODING");
|
||||
#endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 21, 6) */
|
||||
|
||||
/* initialize buffer for body of the answer */
|
||||
if (curlhelp_initwritebuffer(&body_buf) < 0)
|
||||
die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for body\n");
|
||||
|
|
@ -392,9 +464,12 @@ check_http (void)
|
|||
|
||||
// fill dns resolve cache to make curl connect to the given server_address instead of the host_name, only required for ssl, because we use the host_name later on to make SNI happy
|
||||
if(use_ssl && host_name != NULL) {
|
||||
struct curl_slist *host = NULL;
|
||||
char dnscache[DEFAULT_BUFFER_SIZE];
|
||||
snprintf (dnscache, DEFAULT_BUFFER_SIZE, "%s:%d:%s", host_name, server_port, server_address);
|
||||
if ( (res=lookup_host (server_address, addrstr, 100)) != 0) {
|
||||
snprintf (msg, DEFAULT_BUFFER_SIZE, _("Unable to lookup IP address for '%s': getaddrinfo returned %d - %s"),
|
||||
server_address, res, gai_strerror (res));
|
||||
die (STATE_CRITICAL, "HTTP CRITICAL - %s\n", msg);
|
||||
}
|
||||
snprintf (dnscache, DEFAULT_BUFFER_SIZE, "%s:%d:%s", host_name, server_port, addrstr);
|
||||
host = curl_slist_append(NULL, dnscache);
|
||||
curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
|
||||
if (verbose>=1)
|
||||
|
|
@ -680,7 +755,9 @@ check_http (void)
|
|||
* and we actually have OpenSSL in the monitoring tools
|
||||
*/
|
||||
result = np_net_ssl_check_certificate(cert, days_till_exp_warn, days_till_exp_crit);
|
||||
return result;
|
||||
if (continue_after_check_cert == FALSE) {
|
||||
return result;
|
||||
}
|
||||
#else /* USE_OPENSSL */
|
||||
die (STATE_CRITICAL, "HTTP CRITICAL - Cannot retrieve certificates - OpenSSL callback used and not linked against OpenSSL\n");
|
||||
#endif /* USE_OPENSSL */
|
||||
|
|
@ -720,13 +797,17 @@ GOT_FIRST_CERT:
|
|||
}
|
||||
BIO_free (cert_BIO);
|
||||
result = np_net_ssl_check_certificate(cert, days_till_exp_warn, days_till_exp_crit);
|
||||
return result;
|
||||
if (continue_after_check_cert == FALSE) {
|
||||
return result;
|
||||
}
|
||||
#else /* USE_OPENSSL */
|
||||
/* We assume we don't have OpenSSL and np_net_ssl_check_certificate at our disposal,
|
||||
* so we use the libcurl CURLINFO data
|
||||
*/
|
||||
result = net_noopenssl_check_certificate(&cert_ptr, days_till_exp_warn, days_till_exp_crit);
|
||||
return result;
|
||||
if (continue_after_check_cert == FALSE) {
|
||||
return result;
|
||||
}
|
||||
#endif /* USE_OPENSSL */
|
||||
} else {
|
||||
snprintf (msg, DEFAULT_BUFFER_SIZE, _("Cannot retrieve certificates - cURL returned %d - %s"),
|
||||
|
|
@ -959,8 +1040,8 @@ char*
|
|||
uri_string (const UriTextRangeA range, char* buf, size_t buflen)
|
||||
{
|
||||
if (!range.first) return "(null)";
|
||||
strncpy (buf, range.first, max (buflen, range.afterLast - range.first));
|
||||
buf[max (buflen, range.afterLast - range.first)] = '\0';
|
||||
strncpy (buf, range.first, max (buflen-1, range.afterLast - range.first));
|
||||
buf[max (buflen-1, range.afterLast - range.first)] = '\0';
|
||||
buf[range.afterLast - range.first] = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
|
@ -980,7 +1061,7 @@ redir (curlhelp_write_curlbuf* header_buf)
|
|||
char *new_url;
|
||||
|
||||
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
|
||||
&status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
&status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
headers, &nof_headers, 0);
|
||||
|
||||
location = get_header_value (headers, nof_headers, "location");
|
||||
|
|
@ -1080,8 +1161,8 @@ redir (curlhelp_write_curlbuf* header_buf)
|
|||
!strncmp(server_address, new_host, MAX_IPV4_HOSTLENGTH) &&
|
||||
(host_name && !strncmp(host_name, new_host, MAX_IPV4_HOSTLENGTH)) &&
|
||||
!strcmp(server_url, new_url))
|
||||
die (STATE_WARNING,
|
||||
_("HTTP WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n"),
|
||||
die (STATE_CRITICAL,
|
||||
_("HTTP CRITICAL - redirection creates an infinite loop - %s://%s:%d%s%s\n"),
|
||||
use_ssl ? "https" : "http", new_host, new_port, new_url, (display_html ? "</A>" : ""));
|
||||
|
||||
/* set new values for redirected request */
|
||||
|
|
@ -1136,8 +1217,11 @@ process_arguments (int argc, char **argv)
|
|||
enum {
|
||||
INVERT_REGEX = CHAR_MAX + 1,
|
||||
SNI_OPTION,
|
||||
MAX_REDIRS_OPTION,
|
||||
CONTINUE_AFTER_CHECK_CERT,
|
||||
CA_CERT_OPTION,
|
||||
HTTP_VERSION_OPTION
|
||||
HTTP_VERSION_OPTION,
|
||||
AUTOMATIC_DECOMPRESSION
|
||||
};
|
||||
|
||||
int option = 0;
|
||||
|
|
@ -1168,6 +1252,7 @@ process_arguments (int argc, char **argv)
|
|||
{"private-key", required_argument, 0, 'K'},
|
||||
{"ca-cert", required_argument, 0, CA_CERT_OPTION},
|
||||
{"verify-cert", no_argument, 0, 'D'},
|
||||
{"continue-after-certificate", no_argument, 0, CONTINUE_AFTER_CHECK_CERT},
|
||||
{"useragent", required_argument, 0, 'A'},
|
||||
{"header", required_argument, 0, 'k'},
|
||||
{"no-body", no_argument, 0, 'N'},
|
||||
|
|
@ -1179,7 +1264,9 @@ process_arguments (int argc, char **argv)
|
|||
{"use-ipv6", no_argument, 0, '6'},
|
||||
{"extended-perfdata", no_argument, 0, 'E'},
|
||||
{"show-body", no_argument, 0, 'B'},
|
||||
{"max-redirs", required_argument, 0, MAX_REDIRS_OPTION},
|
||||
{"http-version", required_argument, 0, HTTP_VERSION_OPTION},
|
||||
{"enable-automatic-decompression", no_argument, 0, AUTOMATIC_DECOMPRESSION},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
|
@ -1324,6 +1411,11 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
check_cert = TRUE;
|
||||
goto enable_ssl;
|
||||
#endif
|
||||
case CONTINUE_AFTER_CHECK_CERT: /* don't stop after the certificate is checked */
|
||||
#ifdef HAVE_SSL
|
||||
continue_after_check_cert = TRUE;
|
||||
break;
|
||||
#endif
|
||||
case 'J': /* use client certificate */
|
||||
#ifdef LIBCURL_FEATURE_SSL
|
||||
|
|
@ -1346,7 +1438,7 @@ process_arguments (int argc, char **argv)
|
|||
#ifdef LIBCURL_FEATURE_SSL
|
||||
case 'D': /* verify peer certificate & host */
|
||||
verify_peer_and_host = TRUE;
|
||||
goto enable_ssl;
|
||||
break;
|
||||
#endif
|
||||
case 'S': /* use SSL */
|
||||
#ifdef LIBCURL_FEATURE_SSL
|
||||
|
|
@ -1436,6 +1528,13 @@ process_arguments (int argc, char **argv)
|
|||
use_sni = TRUE;
|
||||
break;
|
||||
#endif /* LIBCURL_FEATURE_SSL */
|
||||
case MAX_REDIRS_OPTION:
|
||||
if (!is_intnonneg (optarg))
|
||||
usage2 (_("Invalid max_redirs count"), optarg);
|
||||
else {
|
||||
max_depth = atoi (optarg);
|
||||
}
|
||||
break;
|
||||
case 'f': /* onredirect */
|
||||
if (!strcmp (optarg, "ok"))
|
||||
onredirect = STATE_OK;
|
||||
|
|
@ -1571,6 +1670,9 @@ process_arguments (int argc, char **argv)
|
|||
exit (STATE_WARNING);
|
||||
}
|
||||
break;
|
||||
case AUTOMATIC_DECOMPRESSION:
|
||||
automatic_decompression = TRUE;
|
||||
break;
|
||||
case '?':
|
||||
/* print short usage statement if args not parsable */
|
||||
usage5 ();
|
||||
|
|
@ -1712,7 +1814,11 @@ print_help (void)
|
|||
#endif
|
||||
printf (" %s\n", "-C, --certificate=INTEGER[,INTEGER]");
|
||||
printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443"));
|
||||
printf (" %s\n", _("(when this option is used the URL is not checked.)"));
|
||||
printf (" %s\n", _("(when this option is used the URL is not checked by default. You can use"));
|
||||
printf (" %s\n", _(" --continue-after-certificate to override this behavior)"));
|
||||
printf (" %s\n", "--continue-after-certificate");
|
||||
printf (" %s\n", _("Allows the HTTP check to continue after performing the certificate check."));
|
||||
printf (" %s\n", _("Does nothing unless -C is used."));
|
||||
printf (" %s\n", "-J, --client-cert=FILE");
|
||||
printf (" %s\n", _("Name of file that contains the client certificate (PEM format)"));
|
||||
printf (" %s\n", _("to be used in establishing the SSL session"));
|
||||
|
|
@ -1775,12 +1881,17 @@ print_help (void)
|
|||
printf (" %s\n", _("specified IP address. stickyport also ensures port stays the same."));
|
||||
printf (" %s\n", _("follow uses the old redirection algorithm of check_http."));
|
||||
printf (" %s\n", _("curl uses CURL_FOLLOWLOCATION built into libcurl."));
|
||||
printf (" %s\n", "--max-redirs=INTEGER");
|
||||
printf (" %s", _("Maximal number of redirects (default: "));
|
||||
printf ("%d)\n", DEFAULT_MAX_REDIRS);
|
||||
printf (" %s\n", "-m, --pagesize=INTEGER<:INTEGER>");
|
||||
printf (" %s\n", _("Minimum page size required (bytes) : Maximum page size required (bytes)"));
|
||||
printf ("\n");
|
||||
printf (" %s\n", "--http-version=VERSION");
|
||||
printf (" %s\n", _("Connect via specific HTTP protocol."));
|
||||
printf (" %s\n", _("1.0 = HTTP/1.0, 1.1 = HTTP/1.1, 2.0 = HTTP/2 (HTTP/2 will fail without -S)"));
|
||||
printf (" %s\n", "--enable-automatic-decompression");
|
||||
printf (" %s\n", _("Enable automatic decompression of body (CURLOPT_ACCEPT_ENCODING)."));
|
||||
printf ("\n");
|
||||
|
||||
printf (UT_WARN_CRIT);
|
||||
|
|
@ -1995,7 +2106,7 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line)
|
|||
char *first_line_buf;
|
||||
|
||||
/* find last start of a new header */
|
||||
start = strrstr2 (buf, "\r\nHTTP");
|
||||
start = strrstr2 (buf, "\r\nHTTP/");
|
||||
if (start != NULL) {
|
||||
start += 2;
|
||||
buf = start;
|
||||
|
|
@ -2107,7 +2218,7 @@ check_document_dates (const curlhelp_write_curlbuf *header_buf, char (*msg)[DEFA
|
|||
size_t msglen;
|
||||
|
||||
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
|
||||
&status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
&status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
headers, &nof_headers, 0);
|
||||
|
||||
server_date = get_header_value (headers, nof_headers, "date");
|
||||
|
|
@ -2165,7 +2276,7 @@ get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_wri
|
|||
curlhelp_statusline status_line;
|
||||
|
||||
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
|
||||
&status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
&status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
|
||||
headers, &nof_headers, 0);
|
||||
|
||||
content_length_s = get_header_value (headers, nof_headers, "content-length");
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
* Monitoring check_disk plugin
|
||||
*
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 1999-2008 Monitoring Plugins Development Team
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
* This file contains the check_disk plugin
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
const char *progname = "check_disk";
|
||||
|
|
@ -46,7 +46,7 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#include <stdarg.h>
|
||||
#include "fsusage.h"
|
||||
#include "mountlist.h"
|
||||
#include "intprops.h" /* necessary for TYPE_MAXIMUM */
|
||||
#include "intprops.h" /* necessary for TYPE_MAXIMUM */
|
||||
#if HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
|
@ -171,9 +171,6 @@ main (int argc, char **argv)
|
|||
char *perf_ilabel;
|
||||
char *preamble;
|
||||
char *flag_header;
|
||||
double inode_space_pct;
|
||||
double warning_high_tide;
|
||||
double critical_high_tide;
|
||||
int temp_result;
|
||||
|
||||
struct mount_entry *me;
|
||||
|
|
@ -232,8 +229,10 @@ main (int argc, char **argv)
|
|||
/* Process for every path in list */
|
||||
for (path = path_select_list; path; path=path->name_next) {
|
||||
if (verbose >= 3 && path->freespace_percent->warning != NULL && path->freespace_percent->critical != NULL)
|
||||
printf("Thresholds(pct) for %s warn: %f crit %f\n",path->name, path->freespace_percent->warning->end,
|
||||
path->freespace_percent->critical->end);
|
||||
printf("Thresholds(pct) for %s warn: %f crit %f\n",
|
||||
path->name,
|
||||
path->freespace_percent->warning->end,
|
||||
path->freespace_percent->critical->end);
|
||||
|
||||
if (verbose >= 3 && path->group != NULL)
|
||||
printf("Group of %s: %s\n",path->name,path->group);
|
||||
|
|
@ -245,17 +244,17 @@ main (int argc, char **argv)
|
|||
|
||||
#ifdef __CYGWIN__
|
||||
if (strncmp(path->name, "/cygdrive/", 10) != 0 || strlen(path->name) > 11)
|
||||
continue;
|
||||
continue;
|
||||
snprintf(mountdir, sizeof(mountdir), "%s:\\", me->me_mountdir + 10);
|
||||
if (GetDriveType(mountdir) != DRIVE_FIXED)
|
||||
me->me_remote = 1;
|
||||
me->me_remote = 1;
|
||||
#endif
|
||||
/* Filters */
|
||||
|
||||
/* Remove filesystems already seen */
|
||||
if (np_seen_name(seen, me->me_mountdir)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
np_add_name(&seen, me->me_mountdir);
|
||||
|
||||
if (path->group == NULL) {
|
||||
|
|
@ -288,8 +287,17 @@ main (int argc, char **argv)
|
|||
get_stats (path, &fsp);
|
||||
|
||||
if (verbose >= 3) {
|
||||
printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%llu mult=%llu\n",
|
||||
me->me_mountdir, path->dused_pct, path->dfree_pct, path->dused_units, path->dfree_units, path->dtotal_units, path->dused_inodes_percent, path->dfree_inodes_percent, fsp.fsu_blocksize, mult);
|
||||
printf ("For %s, used_pct=%g free_pct=%g used_units=%lu free_units=%lu total_units=%lu used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%lu mult=%lu\n",
|
||||
me->me_mountdir,
|
||||
path->dused_pct,
|
||||
path->dfree_pct,
|
||||
path->dused_units,
|
||||
path->dfree_units,
|
||||
path->dtotal_units,
|
||||
path->dused_inodes_percent,
|
||||
path->dfree_inodes_percent,
|
||||
fsp.fsu_blocksize,
|
||||
mult);
|
||||
}
|
||||
|
||||
/* Threshold comparisons */
|
||||
|
|
@ -326,84 +334,78 @@ main (int argc, char **argv)
|
|||
*/
|
||||
|
||||
/* *_high_tide must be reinitialized at each run */
|
||||
warning_high_tide = UINT_MAX;
|
||||
critical_high_tide = UINT_MAX;
|
||||
uint64_t warning_high_tide = UINT64_MAX;
|
||||
|
||||
if (path->freespace_units->warning != NULL) {
|
||||
warning_high_tide = path->dtotal_units - path->freespace_units->warning->end;
|
||||
warning_high_tide = (path->dtotal_units - path->freespace_units->warning->end) * mult;
|
||||
}
|
||||
if (path->freespace_percent->warning != NULL) {
|
||||
warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*path->dtotal_units ));
|
||||
}
|
||||
if (path->freespace_units->critical != NULL) {
|
||||
critical_high_tide = path->dtotal_units - path->freespace_units->critical->end;
|
||||
}
|
||||
if (path->freespace_percent->critical != NULL) {
|
||||
critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*path->dtotal_units ));
|
||||
warning_high_tide = min( warning_high_tide, (uint64_t)((1.0 - path->freespace_percent->warning->end/100) * (path->dtotal_units * mult)) );
|
||||
}
|
||||
|
||||
/* Nb: *_high_tide are unset when == UINT_MAX */
|
||||
uint64_t critical_high_tide = UINT64_MAX;
|
||||
|
||||
if (path->freespace_units->critical != NULL) {
|
||||
critical_high_tide = (path->dtotal_units - path->freespace_units->critical->end) * mult;
|
||||
}
|
||||
if (path->freespace_percent->critical != NULL) {
|
||||
critical_high_tide = min( critical_high_tide, (uint64_t)((1.0 - path->freespace_percent->critical->end/100) * (path->dtotal_units * mult)) );
|
||||
}
|
||||
|
||||
/* Nb: *_high_tide are unset when == UINT64_MAX */
|
||||
xasprintf (&perf, "%s %s", perf,
|
||||
perfdata ((!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
||||
path->dused_units, units,
|
||||
(warning_high_tide != UINT_MAX ? TRUE : FALSE), warning_high_tide,
|
||||
(critical_high_tide != UINT_MAX ? TRUE : FALSE), critical_high_tide,
|
||||
TRUE, 0,
|
||||
TRUE, path->dtotal_units));
|
||||
perfdata_uint64 (
|
||||
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
||||
path->dused_units * mult, "B",
|
||||
(warning_high_tide == UINT64_MAX ? FALSE : TRUE), warning_high_tide,
|
||||
(critical_high_tide == UINT64_MAX ? FALSE : TRUE), critical_high_tide,
|
||||
TRUE, 0,
|
||||
TRUE, path->dtotal_units * mult));
|
||||
|
||||
if (display_inodes_perfdata) {
|
||||
/* *_high_tide must be reinitialized at each run */
|
||||
warning_high_tide = UINT_MAX;
|
||||
critical_high_tide = UINT_MAX;
|
||||
warning_high_tide = UINT64_MAX;
|
||||
critical_high_tide = UINT64_MAX;
|
||||
|
||||
if (path->freeinodes_percent->warning != NULL) {
|
||||
warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freeinodes_percent->warning->end/100)*path->inodes_total ));
|
||||
warning_high_tide = (uint64_t) fabs( min( (double) warning_high_tide, (double) (1.0 - path->freeinodes_percent->warning->end/100)*path->inodes_total ));
|
||||
}
|
||||
if (path->freeinodes_percent->critical != NULL) {
|
||||
critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freeinodes_percent->critical->end/100)*path->inodes_total ));
|
||||
critical_high_tide = (uint64_t) fabs( min( (double) critical_high_tide, (double) (1.0 - path->freeinodes_percent->critical->end/100)*path->inodes_total ));
|
||||
}
|
||||
|
||||
xasprintf (&perf_ilabel, "%s (inodes)", (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir);
|
||||
/* Nb: *_high_tide are unset when == UINT_MAX */
|
||||
/* Nb: *_high_tide are unset when == UINT64_MAX */
|
||||
xasprintf (&perf, "%s %s", perf,
|
||||
perfdata (perf_ilabel,
|
||||
path->inodes_used, "",
|
||||
(warning_high_tide != UINT_MAX ? TRUE : FALSE), warning_high_tide,
|
||||
(critical_high_tide != UINT_MAX ? TRUE : FALSE), critical_high_tide,
|
||||
TRUE, 0,
|
||||
TRUE, path->inodes_total));
|
||||
perfdata_uint64 (perf_ilabel,
|
||||
path->inodes_used, "",
|
||||
(warning_high_tide != UINT64_MAX ? TRUE : FALSE), warning_high_tide,
|
||||
(critical_high_tide != UINT64_MAX ? TRUE : FALSE), critical_high_tide,
|
||||
TRUE, 0,
|
||||
TRUE, path->inodes_total));
|
||||
}
|
||||
|
||||
if (disk_result==STATE_OK && erronly && !verbose)
|
||||
continue;
|
||||
|
||||
if(disk_result && verbose >= 1) {
|
||||
xasprintf(&flag_header, " %s [", state_text (disk_result));
|
||||
} else {
|
||||
xasprintf(&flag_header, "");
|
||||
}
|
||||
xasprintf (&output, "%s%s %s %.0f %s (%.0f%%",
|
||||
output, flag_header,
|
||||
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
||||
path->dfree_units,
|
||||
units,
|
||||
path->dfree_pct);
|
||||
if (path->dused_inodes_percent < 0) {
|
||||
xasprintf(&output, "%s inode=-)%s;", output, (disk_result ? "]" : ""));
|
||||
} else {
|
||||
xasprintf(&output, "%s inode=%.0f%%)%s;", output, path->dfree_inodes_percent, ((disk_result && verbose >= 1) ? "]" : ""));
|
||||
}
|
||||
if(disk_result && verbose >= 1) {
|
||||
xasprintf(&flag_header, " %s [", state_text (disk_result));
|
||||
} else {
|
||||
xasprintf(&flag_header, "");
|
||||
}
|
||||
xasprintf (&output, "%s%s %s %llu%s (%.0f%%",
|
||||
output, flag_header,
|
||||
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
|
||||
path->dfree_units,
|
||||
units,
|
||||
path->dfree_pct);
|
||||
if (path->dused_inodes_percent < 0) {
|
||||
xasprintf(&output, "%s inode=-)%s;", output, (disk_result ? "]" : ""));
|
||||
} else {
|
||||
xasprintf(&output, "%s inode=%.0f%%)%s;", output, path->dfree_inodes_percent, ((disk_result && verbose >= 1) ? "]" : ""));
|
||||
}
|
||||
free(flag_header);
|
||||
/* TODO: Need to do a similar debug line
|
||||
xasprintf (&details, _("%s\n\
|
||||
%.0f of %.0f %s (%.0f%% inode=%.0f%%) free on %s (type %s mounted on %s) warn:%lu crit:%lu warn%%:%.0f%% crit%%:%.0f%%"),
|
||||
details, dfree_units, dtotal_units, units, dfree_pct, inode_space_pct,
|
||||
me->me_devname, me->me_type, me->me_mountdir,
|
||||
(unsigned long)w_df, (unsigned long)c_df, w_dfp, c_dfp);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (verbose >= 2)
|
||||
|
|
@ -557,14 +559,14 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'W': /* warning inode threshold */
|
||||
case 'W': /* warning inode threshold */
|
||||
if (*optarg == '@') {
|
||||
warn_freeinodes_percent = optarg;
|
||||
} else {
|
||||
xasprintf(&warn_freeinodes_percent, "@%s", optarg);
|
||||
}
|
||||
break;
|
||||
case 'K': /* critical inode threshold */
|
||||
case 'K': /* critical inode threshold */
|
||||
if (*optarg == '@') {
|
||||
crit_freeinodes_percent = optarg;
|
||||
} else {
|
||||
|
|
@ -574,21 +576,24 @@ process_arguments (int argc, char **argv)
|
|||
case 'u':
|
||||
if (units)
|
||||
free(units);
|
||||
if (! strcmp (optarg, "bytes")) {
|
||||
if (! strcasecmp (optarg, "bytes")) {
|
||||
mult = (uintmax_t)1;
|
||||
units = strdup ("B");
|
||||
} else if (! strcmp (optarg, "kB")) {
|
||||
} else if ( (! strcmp (optarg, "kB")) || (!strcmp(optarg, "KiB")) ) {
|
||||
mult = (uintmax_t)1024;
|
||||
units = strdup ("kB");
|
||||
} else if (! strcmp (optarg, "MB")) {
|
||||
units = strdup ("kiB");
|
||||
} else if ( (! strcmp (optarg, "MB")) || (!strcmp(optarg, "MiB")) ) {
|
||||
mult = (uintmax_t)1024 * 1024;
|
||||
units = strdup ("MB");
|
||||
} else if (! strcmp (optarg, "GB")) {
|
||||
units = strdup ("MiB");
|
||||
} else if ( (! strcmp (optarg, "GB")) || (!strcmp(optarg, "GiB")) ) {
|
||||
mult = (uintmax_t)1024 * 1024 * 1024;
|
||||
units = strdup ("GB");
|
||||
} else if (! strcmp (optarg, "TB")) {
|
||||
units = strdup ("GiB");
|
||||
} else if ( (! strcmp (optarg, "TB")) || (!strcmp(optarg, "TiB")) ) {
|
||||
mult = (uintmax_t)1024 * 1024 * 1024 * 1024;
|
||||
units = strdup ("TB");
|
||||
units = strdup ("TiB");
|
||||
} else if ( (! strcmp (optarg, "PB")) || (!strcmp(optarg, "PiB")) ) {
|
||||
mult = (uintmax_t)1024 * 1024 * 1024 * 1024 * 1024;
|
||||
units = strdup ("PiB");
|
||||
} else {
|
||||
die (STATE_UNKNOWN, _("unit type %s not known\n"), optarg);
|
||||
}
|
||||
|
|
@ -599,13 +604,13 @@ process_arguments (int argc, char **argv)
|
|||
mult = 1024;
|
||||
if (units)
|
||||
free(units);
|
||||
units = strdup ("kB");
|
||||
units = strdup ("kiB");
|
||||
break;
|
||||
case 'm': /* display mountpoint */
|
||||
mult = 1024 * 1024;
|
||||
if (units)
|
||||
free(units);
|
||||
units = strdup ("MB");
|
||||
units = strdup ("MiB");
|
||||
break;
|
||||
case 'L':
|
||||
stat_remote_fs = 1;
|
||||
|
|
@ -675,6 +680,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
case 'I':
|
||||
cflags |= REG_ICASE;
|
||||
// Intentional fallthrough
|
||||
case 'i':
|
||||
if (!path_selected)
|
||||
die (STATE_UNKNOWN, "DISK %s: %s\n", _("UNKNOWN"), _("Paths need to be selected before using -i/-I. Use -A to select all paths explicitly"));
|
||||
|
|
@ -714,8 +720,10 @@ process_arguments (int argc, char **argv)
|
|||
|
||||
case 'A':
|
||||
optarg = strdup(".*");
|
||||
// Intentional fallthrough
|
||||
case 'R':
|
||||
cflags |= REG_ICASE;
|
||||
// Intentional fallthrough
|
||||
case 'r':
|
||||
if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent ||
|
||||
crit_freespace_percent || warn_usedspace_units || crit_usedspace_units ||
|
||||
|
|
@ -812,7 +820,7 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
if (units == NULL) {
|
||||
units = strdup ("MB");
|
||||
units = strdup ("MiB");
|
||||
mult = (uintmax_t)1024 * 1024;
|
||||
}
|
||||
|
||||
|
|
@ -848,51 +856,6 @@ set_all_thresholds (struct parameter_list *path)
|
|||
set_thresholds(&path->freeinodes_percent, warn_freeinodes_percent, crit_freeinodes_percent);
|
||||
}
|
||||
|
||||
/* TODO: Remove?
|
||||
|
||||
int
|
||||
validate_arguments (uintmax_t w, uintmax_t c, double wp, double cp, double iwp, double icp, char *mypath)
|
||||
{
|
||||
if (w < 0 && c < 0 && wp < 0.0 && cp < 0.0) {
|
||||
printf (_("INPUT ERROR: No thresholds specified"));
|
||||
print_path (mypath);
|
||||
return ERROR;
|
||||
}
|
||||
else if ((wp >= 0.0 || cp >= 0.0) &&
|
||||
(wp < 0.0 || cp < 0.0 || wp > 100.0 || cp > 100.0 || cp > wp)) {
|
||||
printf (_("\
|
||||
INPUT ERROR: C_DFP (%f) should be less than W_DFP (%.1f) and both should be between zero and 100 percent, inclusive"),
|
||||
cp, wp);
|
||||
print_path (mypath);
|
||||
return ERROR;
|
||||
}
|
||||
else if ((iwp >= 0.0 || icp >= 0.0) &&
|
||||
(iwp < 0.0 || icp < 0.0 || iwp > 100.0 || icp > 100.0 || icp > iwp)) {
|
||||
printf (_("\
|
||||
INPUT ERROR: C_IDFP (%f) should be less than W_IDFP (%.1f) and both should be between zero and 100 percent, inclusive"),
|
||||
icp, iwp);
|
||||
print_path (mypath);
|
||||
return ERROR;
|
||||
}
|
||||
else if ((w > 0 || c > 0) && (w == 0 || c == 0 || c > w)) {
|
||||
printf (_("\
|
||||
INPUT ERROR: C_DF (%lu) should be less than W_DF (%lu) and both should be greater than zero"),
|
||||
(unsigned long)c, (unsigned long)w);
|
||||
print_path (mypath);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
@ -947,7 +910,7 @@ print_help (void)
|
|||
printf (" %s\n", _("Only check local filesystems against thresholds. Yet call stat on remote filesystems"));
|
||||
printf (" %s\n", _("to test if they are accessible (e.g. to detect Stale NFS Handles)"));
|
||||
printf (" %s\n", "-M, --mountpoint");
|
||||
printf (" %s\n", _("Display the mountpoint instead of the partition"));
|
||||
printf (" %s\n", _("Display the (block) device instead of the mount point"));
|
||||
printf (" %s\n", "-m, --megabytes");
|
||||
printf (" %s\n", _("Same as '--units MB'"));
|
||||
printf (" %s\n", "-A, --all");
|
||||
|
|
@ -1026,20 +989,26 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) {
|
|||
if (p_list->group && ! (strcmp(p_list->group, p->group))) {
|
||||
stat_path(p_list);
|
||||
get_fs_usage (p_list->best_match->me_mountdir, p_list->best_match->me_devname, &tmpfsp);
|
||||
get_path_stats(p_list, &tmpfsp);
|
||||
get_path_stats(p_list, &tmpfsp);
|
||||
if (verbose >= 3)
|
||||
printf("Group %s: adding %llu blocks sized %llu, (%s) used_units=%g free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
|
||||
p_list->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, p_list->best_match->me_mountdir, p_list->dused_units, p_list->dfree_units,
|
||||
p_list->dtotal_units, mult);
|
||||
printf("Group %s: adding %lu blocks sized %lu, (%s) used_units=%lu free_units=%lu total_units=%lu mult=%lu\n",
|
||||
p_list->group,
|
||||
tmpfsp.fsu_blocks,
|
||||
tmpfsp.fsu_blocksize,
|
||||
p_list->best_match->me_mountdir,
|
||||
p_list->dused_units,
|
||||
p_list->dfree_units,
|
||||
p_list->dtotal_units,
|
||||
mult);
|
||||
|
||||
/* prevent counting the first FS of a group twice since its parameter_list entry
|
||||
/* prevent counting the first FS of a group twice since its parameter_list entry
|
||||
* is used to carry the information of all file systems of the entire group */
|
||||
if (! first) {
|
||||
p->total += p_list->total;
|
||||
p->available += p_list->available;
|
||||
p->available_to_root += p_list->available_to_root;
|
||||
p->used += p_list->used;
|
||||
|
||||
|
||||
p->dused_units += p_list->dused_units;
|
||||
p->dfree_units += p_list->dfree_units;
|
||||
p->dtotal_units += p_list->dtotal_units;
|
||||
|
|
@ -1050,28 +1019,29 @@ get_stats (struct parameter_list *p, struct fs_usage *fsp) {
|
|||
}
|
||||
first = 0;
|
||||
}
|
||||
if (verbose >= 3)
|
||||
printf("Group %s now has: used_units=%g free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
|
||||
p->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, p->best_match->me_mountdir, p->dused_units,
|
||||
p->dfree_units, p->dtotal_units, mult);
|
||||
if (verbose >= 3)
|
||||
printf("Group %s now has: used_units=%lu free_units=%lu total_units=%lu fsu_blocksize=%lu mult=%lu\n",
|
||||
p->group,
|
||||
p->dused_units,
|
||||
p->dfree_units,
|
||||
p->dtotal_units,
|
||||
tmpfsp.fsu_blocksize,
|
||||
mult);
|
||||
}
|
||||
/* modify devname and mountdir for output */
|
||||
p->best_match->me_mountdir = p->best_match->me_devname = p->group;
|
||||
}
|
||||
/* finally calculate percentages for either plain FS or summed up group */
|
||||
p->dused_pct = calculate_percent( p->used, p->used + p->available ); /* used + available can never be > uintmax */
|
||||
p->dused_pct = calculate_percent( p->used, p->used + p->available ); /* used + available can never be > uintmax */
|
||||
p->dfree_pct = 100 - p->dused_pct;
|
||||
p->dused_inodes_percent = calculate_percent(p->inodes_total - p->inodes_free, p->inodes_total);
|
||||
p->dfree_inodes_percent = 100 - p->dused_inodes_percent;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
|
||||
/* 2007-12-08 - Workaround for Gnulib reporting insanely high available
|
||||
* space on BSD (the actual value should be negative but fsp->fsu_bavail
|
||||
* is unsigned) */
|
||||
p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
|
||||
p->available = fsp->fsu_bavail;
|
||||
p->available_to_root = fsp->fsu_bfree;
|
||||
p->used = fsp->fsu_blocks - fsp->fsu_bfree;
|
||||
if (freespace_ignore_reserved) {
|
||||
|
|
@ -1081,7 +1051,7 @@ get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
|
|||
/* default behaviour : take all the blocks into account */
|
||||
p->total = fsp->fsu_blocks;
|
||||
}
|
||||
|
||||
|
||||
p->dused_units = p->used*fsp->fsu_blocksize/mult;
|
||||
p->dfree_units = p->available*fsp->fsu_blocksize/mult;
|
||||
p->dtotal_units = p->total*fsp->fsu_blocksize/mult;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
|
||||
int process_arguments (int, char **);
|
||||
int validate_arguments (void);
|
||||
int error_scan (char *);
|
||||
int error_scan (char *, int *);
|
||||
int ip_match_cidr(const char *, const char *);
|
||||
unsigned long ip2long(const char *);
|
||||
void print_help (void);
|
||||
|
|
@ -54,6 +54,7 @@ char ptr_server[ADDRESS_LENGTH] = "";
|
|||
int verbose = FALSE;
|
||||
char **expected_address = NULL;
|
||||
int expected_address_cnt = 0;
|
||||
int expect_nxdomain = FALSE;
|
||||
|
||||
int expect_authority = FALSE;
|
||||
int all_match = FALSE;
|
||||
|
|
@ -87,6 +88,7 @@ main (int argc, char **argv)
|
|||
int parse_address = FALSE; /* This flag scans for Address: but only after Name: */
|
||||
output chld_out, chld_err;
|
||||
size_t i;
|
||||
int is_nxdomain = FALSE;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
|
|
@ -186,7 +188,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
result = error_scan (chld_out.line[i]);
|
||||
result = error_scan (chld_out.line[i], &is_nxdomain);
|
||||
if (result != STATE_OK) {
|
||||
msg = strchr (chld_out.line[i], ':');
|
||||
if(msg) msg++;
|
||||
|
|
@ -199,8 +201,8 @@ main (int argc, char **argv)
|
|||
if (verbose)
|
||||
puts(chld_err.line[i]);
|
||||
|
||||
if (error_scan (chld_err.line[i]) != STATE_OK) {
|
||||
result = max_state (result, error_scan (chld_err.line[i]));
|
||||
if (error_scan (chld_err.line[i], &is_nxdomain) != STATE_OK) {
|
||||
result = max_state (result, error_scan (chld_err.line[i], &is_nxdomain));
|
||||
msg = strchr(input_buffer, ':');
|
||||
if(msg)
|
||||
msg++;
|
||||
|
|
@ -209,6 +211,10 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (is_nxdomain && !expect_nxdomain) {
|
||||
die (STATE_CRITICAL, _("Domain '%s' was not found by the server\n"), query_address);
|
||||
}
|
||||
|
||||
if (addresses) {
|
||||
int i,slen;
|
||||
char *adrp;
|
||||
|
|
@ -260,6 +266,16 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (expect_nxdomain) {
|
||||
if (!is_nxdomain) {
|
||||
result = STATE_CRITICAL;
|
||||
xasprintf(&msg, _("Domain '%s' was found by the server: '%s'\n"), query_address, address);
|
||||
} else {
|
||||
if (address != NULL) free(address);
|
||||
address = "NXDOMAIN";
|
||||
}
|
||||
}
|
||||
|
||||
/* check if authoritative */
|
||||
if (result == STATE_OK && expect_authority && non_authoritative) {
|
||||
result = STATE_CRITICAL;
|
||||
|
|
@ -339,9 +355,15 @@ ip2long(const char* src) {
|
|||
}
|
||||
|
||||
int
|
||||
error_scan (char *input_buffer)
|
||||
error_scan (char *input_buffer, int *is_nxdomain)
|
||||
{
|
||||
|
||||
const int nxdomain = strstr (input_buffer, "Non-existent") ||
|
||||
strstr (input_buffer, "** server can't find") ||
|
||||
strstr (input_buffer, "** Can't find") ||
|
||||
strstr (input_buffer, "NXDOMAIN");
|
||||
if (nxdomain) *is_nxdomain = TRUE;
|
||||
|
||||
/* the DNS lookup timed out */
|
||||
if (strstr (input_buffer, _("Note: nslookup is deprecated and may be removed from future releases.")) ||
|
||||
strstr (input_buffer, _("Consider using the `dig' or `host' programs instead. Run nslookup with")) ||
|
||||
|
|
@ -360,7 +382,7 @@ error_scan (char *input_buffer)
|
|||
|
||||
/* Connection was refused */
|
||||
else if (strstr (input_buffer, "Connection refused") ||
|
||||
strstr (input_buffer, "Couldn't find server") ||
|
||||
strstr (input_buffer, "Couldn't find server") ||
|
||||
strstr (input_buffer, "Refused") ||
|
||||
(strstr (input_buffer, "** server can't find") &&
|
||||
strstr (input_buffer, ": REFUSED")))
|
||||
|
|
@ -374,13 +396,6 @@ error_scan (char *input_buffer)
|
|||
else if (strstr (input_buffer, "No information"))
|
||||
die (STATE_CRITICAL, _("No information returned by DNS server at %s\n"), dns_server);
|
||||
|
||||
/* Host or domain name does not exist */
|
||||
else if (strstr (input_buffer, "Non-existent") ||
|
||||
strstr (input_buffer, "** server can't find") ||
|
||||
strstr (input_buffer, "** Can't find") ||
|
||||
strstr (input_buffer,"NXDOMAIN"))
|
||||
die (STATE_CRITICAL, _("Domain %s was not found by the server\n"), query_address);
|
||||
|
||||
/* Network is unreachable */
|
||||
else if (strstr (input_buffer, "Network is unreachable"))
|
||||
die (STATE_CRITICAL, _("Network is unreachable\n"));
|
||||
|
|
@ -417,6 +432,7 @@ process_arguments (int argc, char **argv)
|
|||
{"server", required_argument, 0, 's'},
|
||||
{"reverse-server", required_argument, 0, 'r'},
|
||||
{"expected-address", required_argument, 0, 'a'},
|
||||
{"expect-nxdomain", no_argument, 0, 'n'},
|
||||
{"expect-authority", no_argument, 0, 'A'},
|
||||
{"all", no_argument, 0, 'L'},
|
||||
{"warning", required_argument, 0, 'w'},
|
||||
|
|
@ -432,7 +448,7 @@ process_arguments (int argc, char **argv)
|
|||
strcpy (argv[c], "-t");
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "hVvALt:H:s:r:a:w:c:", long_opts, &opt_index);
|
||||
c = getopt_long (argc, argv, "hVvALnt:H:s:r:a:w:c:", long_opts, &opt_index);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
break;
|
||||
|
|
@ -491,6 +507,9 @@ process_arguments (int argc, char **argv)
|
|||
expected_address_cnt++;
|
||||
}
|
||||
break;
|
||||
case 'n': /* expect NXDOMAIN */
|
||||
expect_nxdomain = TRUE;
|
||||
break;
|
||||
case 'A': /* expect authority */
|
||||
expect_authority = TRUE;
|
||||
break;
|
||||
|
|
@ -532,8 +551,15 @@ process_arguments (int argc, char **argv)
|
|||
int
|
||||
validate_arguments ()
|
||||
{
|
||||
if (query_address[0] == 0)
|
||||
if (query_address[0] == 0) {
|
||||
printf ("missing --host argument\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (expected_address_cnt > 0 && expect_nxdomain) {
|
||||
printf ("--expected-address and --expect-nxdomain cannot be combined\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
@ -566,6 +592,9 @@ print_help (void)
|
|||
printf (" %s\n", _("Optional IP-ADDRESS/CIDR you expect the DNS server to return. HOST must end"));
|
||||
printf (" %s\n", _("with a dot (.). This option can be repeated multiple times (Returns OK if any"));
|
||||
printf (" %s\n", _("value matches)."));
|
||||
printf (" -n, --expect-nxdomain\n");
|
||||
printf (" %s\n", _("Expect the DNS server to return NXDOMAIN (i.e. the domain was not found)"));
|
||||
printf (" %s\n", _("Cannot be used together with -a"));
|
||||
printf (" -A, --expect-authority\n");
|
||||
printf (" %s\n", _("Optionally expect the DNS server to be authoritative for the lookup"));
|
||||
printf (" -w, --warning=seconds\n");
|
||||
|
|
@ -586,5 +615,5 @@ void
|
|||
print_usage (void)
|
||||
{
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit] [-L]\n", progname);
|
||||
printf ("%s -H host [-s server] [-a expected-address] [-n] [-A] [-t timeout] [-w warn] [-c crit] [-L]\n", progname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#include "popen.h"
|
||||
#include "netutils.h"
|
||||
#include "utils.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
enum {
|
||||
PACKET_COUNT = 1,
|
||||
|
|
@ -65,6 +66,7 @@ double crta;
|
|||
double wrta;
|
||||
int cpl_p = FALSE;
|
||||
int wpl_p = FALSE;
|
||||
bool alive_p = FALSE;
|
||||
int crta_p = FALSE;
|
||||
int wrta_p = FALSE;
|
||||
|
||||
|
|
@ -147,9 +149,11 @@ main (int argc, char **argv)
|
|||
(void) fclose (child_stderr);
|
||||
|
||||
/* close the pipe */
|
||||
if (result = spclose (child_process))
|
||||
result = spclose (child_process);
|
||||
if (result) {
|
||||
/* need to use max_state not max */
|
||||
status = max_state (status, STATE_WARNING);
|
||||
}
|
||||
|
||||
if (result > 1 ) {
|
||||
status = max_state (status, STATE_UNKNOWN);
|
||||
|
|
@ -171,10 +175,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
textscan (char *buf)
|
||||
{
|
||||
int textscan (char *buf) {
|
||||
char *rtastr = NULL;
|
||||
char *losstr = NULL;
|
||||
char *xmtstr = NULL;
|
||||
|
|
@ -183,6 +184,20 @@ textscan (char *buf)
|
|||
double xmt;
|
||||
int status = STATE_UNKNOWN;
|
||||
|
||||
/* stops testing after the first successful reply. */
|
||||
if (alive_p && strstr(buf, "avg, 0% loss)")) {
|
||||
rtastr = strstr (buf, "ms (");
|
||||
rtastr = 1 + index(rtastr, '(');
|
||||
rta = strtod(rtastr, NULL);
|
||||
loss=strtod("0",NULL);
|
||||
die (STATE_OK,
|
||||
_("FPING %s - %s (rta=%f ms)|%s\n"),
|
||||
state_text (STATE_OK), server_name,rta,
|
||||
/* No loss since we only waited for the first reply
|
||||
perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100), */
|
||||
fperfdata ("rta", rta/1.0e3, "s", wrta_p, wrta/1.0e3, crta_p, crta/1.0e3, TRUE, 0, FALSE, 0));
|
||||
}
|
||||
|
||||
if (strstr (buf, "not found")) {
|
||||
die (STATE_CRITICAL, _("FPING UNKNOWN - %s not found\n"), server_name);
|
||||
|
||||
|
|
@ -278,6 +293,7 @@ process_arguments (int argc, char **argv)
|
|||
{"sourceif", required_argument, 0, 'I'},
|
||||
{"critical", required_argument, 0, 'c'},
|
||||
{"warning", required_argument, 0, 'w'},
|
||||
{"alive", no_argument, 0, 'a'},
|
||||
{"bytes", required_argument, 0, 'b'},
|
||||
{"number", required_argument, 0, 'n'},
|
||||
{"target-timeout", required_argument, 0, 'T'},
|
||||
|
|
@ -304,7 +320,7 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "+hVvH:S:c:w:b:n:T:i:I:46", longopts, &option);
|
||||
c = getopt_long (argc, argv, "+hVvaH:S:c:w:b:n:T:i:I:46", longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF || c == 1)
|
||||
break;
|
||||
|
|
@ -312,6 +328,9 @@ process_arguments (int argc, char **argv)
|
|||
switch (c) {
|
||||
case '?': /* print short usage statement if args not parsable */
|
||||
usage5 ();
|
||||
case 'a': /* host alive mode */
|
||||
alive_p = TRUE;
|
||||
break;
|
||||
case 'h': /* help */
|
||||
print_help ();
|
||||
exit (STATE_UNKNOWN);
|
||||
|
|
@ -446,9 +465,7 @@ get_threshold (char *arg, char *rv[2])
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
void print_help (void) {
|
||||
|
||||
print_revision (progname, NP_VERSION);
|
||||
|
||||
|
|
@ -474,6 +491,8 @@ print_help (void)
|
|||
printf (" %s\n", _("warning threshold pair"));
|
||||
printf (" %s\n", "-c, --critical=THRESHOLD");
|
||||
printf (" %s\n", _("critical threshold pair"));
|
||||
printf (" %s\n", "-a, --alive");
|
||||
printf (" %s\n", _("Return OK after first successfull reply"));
|
||||
printf (" %s\n", "-b, --bytes=INTEGER");
|
||||
printf (" %s (default: %d)\n", _("size of ICMP packet"),PACKET_SIZE);
|
||||
printf (" %s\n", "-n, --number=INTEGER");
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ print_help (void)
|
|||
printf ("%s\n", _("Notes:"));
|
||||
printf (" %s\n", _("This plugin uses the 'qstat' command, the popular game server status query tool."));
|
||||
printf (" %s\n", _("If you don't have the package installed, you will need to download it from"));
|
||||
printf (" %s\n", _("http://www.activesw.com/people/steve/qstat.html before you can use this plugin."));
|
||||
printf (" %s\n", _("https://github.com/multiplay/qstat before you can use this plugin."));
|
||||
|
||||
printf (UT_SUPPORT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void print_usage (void);
|
|||
|
||||
char *community = NULL;
|
||||
char *address = NULL;
|
||||
char *port = NULL;
|
||||
unsigned int port = 0;
|
||||
int check_paper_out = 1;
|
||||
|
||||
int
|
||||
|
|
@ -121,8 +121,12 @@ main (int argc, char **argv)
|
|||
HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
|
||||
|
||||
/* get the command to run */
|
||||
sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%hd %s", PATH_TO_SNMPGET, community,
|
||||
address, port, query_string);
|
||||
sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%u %s",
|
||||
PATH_TO_SNMPGET,
|
||||
community,
|
||||
address,
|
||||
port,
|
||||
query_string);
|
||||
|
||||
/* run the command */
|
||||
child_process = spopen (command_line);
|
||||
|
|
@ -380,11 +384,8 @@ process_arguments (int argc, char **argv)
|
|||
community = strdup (DEFAULT_COMMUNITY);
|
||||
}
|
||||
|
||||
if (port == NULL) {
|
||||
if (argv[c] != NULL )
|
||||
port = argv[c];
|
||||
else
|
||||
port = atoi (DEFAULT_PORT);
|
||||
if (port == 0) {
|
||||
port = atoi(DEFAULT_PORT);
|
||||
}
|
||||
|
||||
return validate_arguments ();
|
||||
|
|
|
|||
|
|
@ -52,11 +52,13 @@ enum {
|
|||
MAX_IPV4_HOSTLENGTH = 255,
|
||||
HTTP_PORT = 80,
|
||||
HTTPS_PORT = 443,
|
||||
MAX_PORT = 65535
|
||||
MAX_PORT = 65535,
|
||||
DEFAULT_MAX_REDIRS = 15
|
||||
};
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
int check_cert = FALSE;
|
||||
int continue_after_check_cert = FALSE;
|
||||
int ssl_version = 0;
|
||||
int days_till_exp_warn, days_till_exp_crit;
|
||||
char *randbuff;
|
||||
|
|
@ -125,7 +127,7 @@ int sd;
|
|||
int min_page_len = 0;
|
||||
int max_page_len = 0;
|
||||
int redir_depth = 0;
|
||||
int max_depth = 15;
|
||||
int max_depth = DEFAULT_MAX_REDIRS;
|
||||
char *http_method;
|
||||
char *http_method_proxy;
|
||||
char *http_post_data;
|
||||
|
|
@ -203,7 +205,9 @@ process_arguments (int argc, char **argv)
|
|||
|
||||
enum {
|
||||
INVERT_REGEX = CHAR_MAX + 1,
|
||||
SNI_OPTION
|
||||
SNI_OPTION,
|
||||
MAX_REDIRS_OPTION,
|
||||
CONTINUE_AFTER_CHECK_CERT
|
||||
};
|
||||
|
||||
int option = 0;
|
||||
|
|
@ -231,6 +235,7 @@ process_arguments (int argc, char **argv)
|
|||
{"certificate", required_argument, 0, 'C'},
|
||||
{"client-cert", required_argument, 0, 'J'},
|
||||
{"private-key", required_argument, 0, 'K'},
|
||||
{"continue-after-certificate", no_argument, 0, CONTINUE_AFTER_CHECK_CERT},
|
||||
{"useragent", required_argument, 0, 'A'},
|
||||
{"header", required_argument, 0, 'k'},
|
||||
{"no-body", no_argument, 0, 'N'},
|
||||
|
|
@ -242,6 +247,7 @@ process_arguments (int argc, char **argv)
|
|||
{"use-ipv6", no_argument, 0, '6'},
|
||||
{"extended-perfdata", no_argument, 0, 'E'},
|
||||
{"show-body", no_argument, 0, 'B'},
|
||||
{"max-redirs", required_argument, 0, MAX_REDIRS_OPTION},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
|
@ -328,6 +334,11 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
check_cert = TRUE;
|
||||
goto enable_ssl;
|
||||
#endif
|
||||
case CONTINUE_AFTER_CHECK_CERT: /* don't stop after the certificate is checked */
|
||||
#ifdef HAVE_SSL
|
||||
continue_after_check_cert = TRUE;
|
||||
break;
|
||||
#endif
|
||||
case 'J': /* use client certificate */
|
||||
#ifdef HAVE_SSL
|
||||
|
|
@ -373,6 +384,13 @@ process_arguments (int argc, char **argv)
|
|||
case SNI_OPTION:
|
||||
use_sni = TRUE;
|
||||
break;
|
||||
case MAX_REDIRS_OPTION:
|
||||
if (!is_intnonneg (optarg))
|
||||
usage2 (_("Invalid max_redirs count"), optarg);
|
||||
else {
|
||||
max_depth = atoi (optarg);
|
||||
}
|
||||
break;
|
||||
case 'f': /* onredirect */
|
||||
if (!strcmp (optarg, "stickyport"))
|
||||
onredirect = STATE_DEPENDENT, followsticky = STICKY_HOST|STICKY_PORT;
|
||||
|
|
@ -971,9 +989,11 @@ check_http (void)
|
|||
elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
|
||||
if (check_cert == TRUE) {
|
||||
result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
|
||||
if (sd) close(sd);
|
||||
np_net_ssl_cleanup();
|
||||
return result;
|
||||
if (continue_after_check_cert == FALSE) {
|
||||
if (sd) close(sd);
|
||||
np_net_ssl_cleanup();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
|
@ -1343,7 +1363,9 @@ check_http (void)
|
|||
#define HD2 URI_HTTP "://" URI_HOST "/" URI_PATH
|
||||
#define HD3 URI_HTTP "://" URI_HOST ":" URI_PORT
|
||||
#define HD4 URI_HTTP "://" URI_HOST
|
||||
#define HD5 URI_PATH
|
||||
/* relative reference redirect like //www.site.org/test https://tools.ietf.org/html/rfc3986 */
|
||||
#define HD5 "//" URI_HOST "/" URI_PATH
|
||||
#define HD6 URI_PATH
|
||||
|
||||
void
|
||||
redir (char *pos, char *status_line)
|
||||
|
|
@ -1420,9 +1442,21 @@ redir (char *pos, char *status_line)
|
|||
use_ssl = server_type_check (type);
|
||||
i = server_port_check (use_ssl);
|
||||
}
|
||||
/* URI_HTTP, URI_HOST, URI_PATH */
|
||||
else if (sscanf (pos, HD5, addr, url) == 2) {
|
||||
if(use_ssl){
|
||||
strcpy (type,"https");
|
||||
}
|
||||
else{
|
||||
strcpy (type, server_type);
|
||||
}
|
||||
xasprintf (&url, "/%s", url);
|
||||
use_ssl = server_type_check (type);
|
||||
i = server_port_check (use_ssl);
|
||||
}
|
||||
|
||||
/* URI_PATH */
|
||||
else if (sscanf (pos, HD5, url) == 1) {
|
||||
else if (sscanf (pos, HD6, url) == 1) {
|
||||
/* relative url */
|
||||
if ((url[0] != '/')) {
|
||||
if ((x = strrchr(server_url, '/')))
|
||||
|
|
@ -1453,8 +1487,8 @@ redir (char *pos, char *status_line)
|
|||
!strncmp(server_address, addr, MAX_IPV4_HOSTLENGTH) &&
|
||||
(host_name && !strncmp(host_name, addr, MAX_IPV4_HOSTLENGTH)) &&
|
||||
!strcmp(server_url, url))
|
||||
die (STATE_WARNING,
|
||||
_("HTTP WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n"),
|
||||
die (STATE_CRITICAL,
|
||||
_("HTTP CRITICAL - redirection creates an infinite loop - %s://%s:%d%s%s\n"),
|
||||
type, addr, i, url, (display_html ? "</A>" : ""));
|
||||
|
||||
strcpy (server_type, type);
|
||||
|
|
@ -1598,7 +1632,11 @@ print_help (void)
|
|||
printf (" %s\n", _("Enable SSL/TLS hostname extension support (SNI)"));
|
||||
printf (" %s\n", "-C, --certificate=INTEGER[,INTEGER]");
|
||||
printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443"));
|
||||
printf (" %s\n", _("(when this option is used the URL is not checked.)"));
|
||||
printf (" %s\n", _("(when this option is used the URL is not checked by default. You can use"));
|
||||
printf (" %s\n", _(" --continue-after-certificate to override this behavior)"));
|
||||
printf (" %s\n", "--continue-after-certificate");
|
||||
printf (" %s\n", _("Allows the HTTP check to continue after performing the certificate check."));
|
||||
printf (" %s\n", _("Does nothing unless -C is used."));
|
||||
printf (" %s\n", "-J, --client-cert=FILE");
|
||||
printf (" %s\n", _("Name of file that contains the client certificate (PEM format)"));
|
||||
printf (" %s\n", _("to be used in establishing the SSL session"));
|
||||
|
|
@ -1657,9 +1695,11 @@ print_help (void)
|
|||
printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky|stickyport>");
|
||||
printf (" %s\n", _("How to handle redirected pages. sticky is like follow but stick to the"));
|
||||
printf (" %s\n", _("specified IP address. stickyport also ensures port stays the same."));
|
||||
printf (" %s\n", "--max-redirs=INTEGER");
|
||||
printf (" %s", _("Maximal number of redirects (default: "));
|
||||
printf ("%d)\n", DEFAULT_MAX_REDIRS);
|
||||
printf (" %s\n", "-m, --pagesize=INTEGER<:INTEGER>");
|
||||
printf (" %s\n", _("Minimum page size required (bytes) : Maximum page size required (bytes)"));
|
||||
|
||||
printf (UT_WARN_CRIT);
|
||||
|
||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||
|
|
|
|||
|
|
@ -432,6 +432,9 @@ validate_arguments ()
|
|||
set_thresholds(&entries_thresholds,
|
||||
warn_entries, crit_entries);
|
||||
}
|
||||
if (ld_passwd==NULL)
|
||||
ld_passwd = getenv("LDAP_PASSWORD");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +468,7 @@ print_help (void)
|
|||
printf (" %s\n", "-D [--bind]");
|
||||
printf (" %s\n", _("ldap bind DN (if required)"));
|
||||
printf (" %s\n", "-P [--pass]");
|
||||
printf (" %s\n", _("ldap password (if required)"));
|
||||
printf (" %s\n", _("ldap password (if required, or set the password through environment variable 'LDAP_PASSWORD')"));
|
||||
printf (" %s\n", "-T [--starttls]");
|
||||
printf (" %s\n", _("use starttls mechanism introduced in protocol version 3"));
|
||||
printf (" %s\n", "-S [--ssl]");
|
||||
|
|
|
|||
|
|
@ -1,41 +1,43 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
* Monitoring check_load plugin
|
||||
*
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 1999-2007 Monitoring Plugins Development Team
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
* This file contains the check_load plugin
|
||||
*
|
||||
*
|
||||
* This plugin tests the current system load average.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
const char *progname = "check_load";
|
||||
const char *copyright = "1999-2007";
|
||||
const char *copyright = "1999-2022";
|
||||
const char *email = "devel@monitoring-plugins.org";
|
||||
|
||||
#include "common.h"
|
||||
#include "runcmd.h"
|
||||
#include "utils.h"
|
||||
#include "popen.h"
|
||||
#include "./common.h"
|
||||
#include "./runcmd.h"
|
||||
#include "./utils.h"
|
||||
#include "./popen.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_SYS_LOADAVG_H
|
||||
#include <sys/loadavg.h>
|
||||
|
|
@ -68,7 +70,7 @@ double cload[3] = { 0.0, 0.0, 0.0 };
|
|||
#define la15 la[2]
|
||||
|
||||
char *status_line;
|
||||
int take_into_account_cpus = 0;
|
||||
bool take_into_account_cpus = false;
|
||||
|
||||
static void
|
||||
get_threshold(char *arg, double *th)
|
||||
|
|
@ -101,7 +103,7 @@ get_threshold(char *arg, double *th)
|
|||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int result;
|
||||
int result = -1;
|
||||
int i;
|
||||
long numcpus;
|
||||
|
||||
|
|
@ -164,7 +166,7 @@ main (int argc, char **argv)
|
|||
sscanf (input_buffer, "%*[^l]load averages: %lf, %lf, %lf", &la1, &la5, &la15);
|
||||
}
|
||||
else {
|
||||
printf (_("could not parse load from uptime %s: %s\n"), PATH_TO_UPTIME, result);
|
||||
printf (_("could not parse load from uptime %s: %d\n"), PATH_TO_UPTIME, result);
|
||||
return STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
|
|
@ -176,13 +178,6 @@ main (int argc, char **argv)
|
|||
# endif
|
||||
#endif
|
||||
|
||||
if (take_into_account_cpus == 1) {
|
||||
if ((numcpus = GET_NUMBER_OF_CPUS()) > 0) {
|
||||
la[0] = la[0] / numcpus;
|
||||
la[1] = la[1] / numcpus;
|
||||
la[2] = la[2] / numcpus;
|
||||
}
|
||||
}
|
||||
if ((la[0] < 0.0) || (la[1] < 0.0) || (la[2] < 0.0)) {
|
||||
#ifdef HAVE_GETLOADAVG
|
||||
printf (_("Error in getloadavg()\n"));
|
||||
|
|
@ -200,18 +195,49 @@ main (int argc, char **argv)
|
|||
result = STATE_OK;
|
||||
|
||||
xasprintf(&status_line, _("load average: %.2f, %.2f, %.2f"), la1, la5, la15);
|
||||
xasprintf(&status_line, ("total %s"), status_line);
|
||||
|
||||
for(i = 0; i < 3; i++) {
|
||||
if(la[i] > cload[i]) {
|
||||
result = STATE_CRITICAL;
|
||||
break;
|
||||
}
|
||||
else if(la[i] > wload[i]) result = STATE_WARNING;
|
||||
|
||||
double scaled_la[3] = { 0.0, 0.0, 0.0 };
|
||||
bool is_using_scaled_load_values = false;
|
||||
|
||||
if (take_into_account_cpus == true && (numcpus = GET_NUMBER_OF_CPUS()) > 0) {
|
||||
is_using_scaled_load_values = true;
|
||||
|
||||
scaled_la[0] = la[0] / numcpus;
|
||||
scaled_la[1] = la[1] / numcpus;
|
||||
scaled_la[2] = la[2] / numcpus;
|
||||
|
||||
char *tmp = NULL;
|
||||
xasprintf(&tmp, _("load average: %.2f, %.2f, %.2f"), scaled_la[0], scaled_la[1], scaled_la[2]);
|
||||
xasprintf(&status_line, "scaled %s - %s", tmp, status_line);
|
||||
}
|
||||
|
||||
printf("%s - %s|", state_text(result), status_line);
|
||||
for(i = 0; i < 3; i++)
|
||||
printf("load%d=%.3f;%.3f;%.3f;0; ", nums[i], la[i], wload[i], cload[i]);
|
||||
for(i = 0; i < 3; i++) {
|
||||
if (is_using_scaled_load_values) {
|
||||
if(scaled_la[i] > cload[i]) {
|
||||
result = STATE_CRITICAL;
|
||||
break;
|
||||
}
|
||||
else if(scaled_la[i] > wload[i]) result = STATE_WARNING;
|
||||
} else {
|
||||
if(la[i] > cload[i]) {
|
||||
result = STATE_CRITICAL;
|
||||
break;
|
||||
}
|
||||
else if(la[i] > wload[i]) result = STATE_WARNING;
|
||||
}
|
||||
}
|
||||
|
||||
printf("LOAD %s - %s|", state_text(result), status_line);
|
||||
for(i = 0; i < 3; i++) {
|
||||
if (is_using_scaled_load_values) {
|
||||
printf("load%d=%.3f;;;0; ", nums[i], la[i]);
|
||||
printf("scaled_load%d=%.3f;%.3f;%.3f;0; ", nums[i], scaled_la[i], wload[i], cload[i]);
|
||||
} else {
|
||||
printf("load%d=%.3f;%.3f;%.3f;0; ", nums[i], la[i], wload[i], cload[i]);
|
||||
}
|
||||
}
|
||||
|
||||
putchar('\n');
|
||||
if (n_procs_to_show > 0) {
|
||||
|
|
@ -255,7 +281,7 @@ process_arguments (int argc, char **argv)
|
|||
get_threshold(optarg, cload);
|
||||
break;
|
||||
case 'r': /* Divide load average by number of CPUs */
|
||||
take_into_account_cpus = 1;
|
||||
take_into_account_cpus = true;
|
||||
break;
|
||||
case 'V': /* version */
|
||||
print_revision (progname, NP_VERSION);
|
||||
|
|
@ -289,7 +315,6 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
validate_arguments (void)
|
||||
{
|
||||
|
|
@ -310,7 +335,6 @@ validate_arguments (void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
|
|
@ -321,7 +345,7 @@ print_help (void)
|
|||
|
||||
printf (_("This plugin tests the current system load average."));
|
||||
|
||||
printf ("\n\n");
|
||||
printf ("\n\n");
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -329,15 +353,15 @@ print_help (void)
|
|||
printf (UT_EXTRA_OPTS);
|
||||
|
||||
printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15");
|
||||
printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
|
||||
printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn"));
|
||||
printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\""));
|
||||
printf (" %s\n", "-r, --percpu");
|
||||
printf (" %s\n", _("Divide the load averages by the number of CPUs (when possible)"));
|
||||
printf (" %s\n", "-n, --procs-to-show=NUMBER_OF_PROCS");
|
||||
printf (" %s\n", _("Number of processes to show when printing the top consuming processes."));
|
||||
printf (" %s\n", _("NUMBER_OF_PROCS=0 disables this feature. Default value is 0"));
|
||||
printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
|
||||
printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn"));
|
||||
printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\""));
|
||||
printf (" %s\n", "-r, --percpu");
|
||||
printf (" %s\n", _("Divide the load averages by the number of CPUs (when possible)"));
|
||||
printf (" %s\n", "-n, --procs-to-show=NUMBER_OF_PROCS");
|
||||
printf (" %s\n", _("Number of processes to show when printing the top consuming processes."));
|
||||
printf (" %s\n", _("NUMBER_OF_PROCS=0 disables this feature. Default value is 0"));
|
||||
|
||||
printf (UT_SUPPORT);
|
||||
}
|
||||
|
|
@ -345,8 +369,8 @@ print_help (void)
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 [-n NUMBER_OF_PROCS]\n", progname);
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 [-n NUMBER_OF_PROCS]\n", progname);
|
||||
}
|
||||
|
||||
#ifdef PS_USES_PROCPCPU
|
||||
|
|
@ -384,8 +408,8 @@ static int print_top_consuming_processes() {
|
|||
#ifdef PS_USES_PROCPCPU
|
||||
qsort(chld_out.line + 1, chld_out.lines - 1, sizeof(char*), cmpstringp);
|
||||
#endif /* PS_USES_PROCPCPU */
|
||||
int lines_to_show = chld_out.lines < (n_procs_to_show + 1)
|
||||
? chld_out.lines : n_procs_to_show + 1;
|
||||
int lines_to_show = chld_out.lines < (size_t)(n_procs_to_show + 1)
|
||||
? (int)chld_out.lines : n_procs_to_show + 1;
|
||||
for (i = 0; i < lines_to_show; i += 1) {
|
||||
printf("%s\n", chld_out.line[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ int best_offset_server(const ntp_server_results *slist, int nservers){
|
|||
* - we also "manually" handle resolving host names and connecting, because
|
||||
* we have to do it in a way that our lazy macros don't handle currently :( */
|
||||
double offset_request(const char *host, int *status){
|
||||
int i=0, j=0, ga_result=0, num_hosts=0, *socklist=NULL, respnum=0;
|
||||
int i=0, ga_result=0, num_hosts=0, *socklist=NULL, respnum=0;
|
||||
int servers_completed=0, one_read=0, servers_readable=0, best_index=-1;
|
||||
time_t now_time=0, start_ts=0;
|
||||
ntp_message *req=NULL;
|
||||
|
|
@ -488,7 +488,7 @@ double offset_request(const char *host, int *status){
|
|||
/* cleanup */
|
||||
/* FIXME: Not closing the socket to avoid re-use of the local port
|
||||
* which can cause old NTP packets to be read instead of NTP control
|
||||
* pactets in jitter_request(). THERE MUST BE ANOTHER WAY...
|
||||
* packets in jitter_request(). THERE MUST BE ANOTHER WAY...
|
||||
* for(j=0; j<num_hosts; j++){ close(socklist[j]); } */
|
||||
free(socklist);
|
||||
free(ufds);
|
||||
|
|
@ -512,7 +512,7 @@ setup_control_request(ntp_control_message *p, uint8_t opcode, uint16_t seq){
|
|||
}
|
||||
|
||||
/* XXX handle responses with the error bit set */
|
||||
double jitter_request(const char *host, int *status){
|
||||
double jitter_request(int *status){
|
||||
int conn=-1, i, npeers=0, num_candidates=0, syncsource_found=0;
|
||||
int run=0, min_peer_sel=PEER_INCLUDED, num_selected=0, num_valid=0;
|
||||
int peers_size=0, peer_offset=0;
|
||||
|
|
@ -803,7 +803,7 @@ int main(int argc, char *argv[]){
|
|||
* (for example) will result in an error
|
||||
*/
|
||||
if(do_jitter){
|
||||
jitter=jitter_request(server_address, &jitter_result);
|
||||
jitter=jitter_request(&jitter_result);
|
||||
result = max_state_alt(result, get_status(jitter, jitter_thresholds));
|
||||
/* -1 indicates that we couldn't calculate the jitter
|
||||
* Only overrides STATE_OK from the offset */
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ char *pgparams = NULL;
|
|||
double twarn = (double)DEFAULT_WARN;
|
||||
double tcrit = (double)DEFAULT_CRIT;
|
||||
char *pgquery = NULL;
|
||||
#define OPTID_QUERYNAME -1000
|
||||
char *pgqueryname = NULL;
|
||||
char *query_warning = NULL;
|
||||
char *query_critical = NULL;
|
||||
thresholds *qthresholds = NULL;
|
||||
|
|
@ -285,6 +287,7 @@ process_arguments (int argc, char **argv)
|
|||
{"database", required_argument, 0, 'd'},
|
||||
{"option", required_argument, 0, 'o'},
|
||||
{"query", required_argument, 0, 'q'},
|
||||
{"queryname", required_argument, 0, OPTID_QUERYNAME},
|
||||
{"query_critical", required_argument, 0, 'C'},
|
||||
{"query_warning", required_argument, 0, 'W'},
|
||||
{"verbose", no_argument, 0, 'v'},
|
||||
|
|
@ -368,6 +371,9 @@ process_arguments (int argc, char **argv)
|
|||
case 'q':
|
||||
pgquery = optarg;
|
||||
break;
|
||||
case OPTID_QUERYNAME:
|
||||
pgqueryname = optarg;
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
|
|
@ -529,6 +535,9 @@ print_help (void)
|
|||
|
||||
printf (" %s\n", "-q, --query=STRING");
|
||||
printf (" %s\n", _("SQL query to run. Only first column in first row will be read"));
|
||||
printf (" %s\n", "--queryname=STRING");
|
||||
printf (" %s\n", _("A name for the query, this string is used instead of the query"));
|
||||
printf (" %s\n", _("in the long output of the plugin"));
|
||||
printf (" %s\n", "-W, --query-warning=RANGE");
|
||||
printf (" %s\n", _("SQL query value to result in warning status (double)"));
|
||||
printf (" %s\n", "-C, --query-critical=RANGE");
|
||||
|
|
@ -642,7 +651,13 @@ do_query (PGconn *conn, char *query)
|
|||
: (my_status == STATE_CRITICAL)
|
||||
? _("CRITICAL")
|
||||
: _("UNKNOWN"));
|
||||
printf (_("'%s' returned %f"), query, value);
|
||||
if(pgqueryname) {
|
||||
printf (_("%s returned %f"), pgqueryname, value);
|
||||
}
|
||||
else {
|
||||
printf (_("'%s' returned %f"), query, value);
|
||||
}
|
||||
|
||||
printf ("|query=%f;%s;%s;;\n", value,
|
||||
query_warning ? query_warning : "",
|
||||
query_critical ? query_critical : "");
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#include "popen.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#define WARN_DUPLICATES "DUPLICATES FOUND! "
|
||||
#define UNKNOWN_TRIP_TIME -1.0 /* -1 seconds */
|
||||
|
||||
|
|
@ -138,7 +140,7 @@ main (int argc, char **argv)
|
|||
if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) {
|
||||
printf ("%s\n", cmd);
|
||||
die (STATE_UNKNOWN,
|
||||
_("CRITICAL - Could not interpret output from ping command\n"));
|
||||
_("CRITICAL - Could not interpret output from ping command\n"));
|
||||
}
|
||||
|
||||
if (pl >= cpl || rta >= crta || rta < 0)
|
||||
|
|
@ -163,10 +165,14 @@ main (int argc, char **argv)
|
|||
printf ("</A>");
|
||||
|
||||
/* Print performance data */
|
||||
printf("|%s", fperfdata ("rta", (double) rta, "ms",
|
||||
wrta>0?TRUE:FALSE, wrta,
|
||||
crta>0?TRUE:FALSE, crta,
|
||||
TRUE, 0, FALSE, 0));
|
||||
if (pl != 100) {
|
||||
printf("|%s", fperfdata ("rta", (double) rta, "ms",
|
||||
wrta>0?TRUE:FALSE, wrta,
|
||||
crta>0?TRUE:FALSE, crta,
|
||||
TRUE, 0, FALSE, 0));
|
||||
} else {
|
||||
printf("| rta=U;%f;%f;;", wrta, crta);
|
||||
}
|
||||
printf(" %s\n", perfdata ("pl", (long) pl, "%",
|
||||
wpl>0?TRUE:FALSE, wpl,
|
||||
cpl>0?TRUE:FALSE, cpl,
|
||||
|
|
@ -521,12 +527,13 @@ int
|
|||
error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
|
||||
{
|
||||
if (strstr (buf, "Network is unreachable") ||
|
||||
strstr (buf, "Destination Net Unreachable")
|
||||
strstr (buf, "Destination Net Unreachable") ||
|
||||
strstr (buf, "No route")
|
||||
)
|
||||
die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr);
|
||||
else if (strstr (buf, "Destination Host Unreachable"))
|
||||
else if (strstr (buf, "Destination Host Unreachable") || strstr(buf, "Address unreachable"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr);
|
||||
else if (strstr (buf, "Destination Port Unreachable"))
|
||||
else if (strstr (buf, "Destination Port Unreachable") || strstr(buf, "Port unreachable"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr);
|
||||
else if (strstr (buf, "Destination Protocol Unreachable"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr);
|
||||
|
|
@ -534,11 +541,11 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
|
|||
die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr);
|
||||
else if (strstr (buf, "Destination Host Prohibited"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr);
|
||||
else if (strstr (buf, "Packet filtered"))
|
||||
else if (strstr (buf, "Packet filtered") || strstr(buf, "Administratively prohibited"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr);
|
||||
else if (strstr (buf, "unknown host" ))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr);
|
||||
else if (strstr (buf, "Time to live exceeded"))
|
||||
else if (strstr (buf, "Time to live exceeded") || strstr(buf, "Time exceeded"))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr);
|
||||
else if (strstr (buf, "Destination unreachable: "))
|
||||
die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr);
|
||||
|
|
@ -547,7 +554,7 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
|
|||
if (warn_text == NULL)
|
||||
warn_text = strdup (_(WARN_DUPLICATES));
|
||||
else if (! strstr (warn_text, _(WARN_DUPLICATES)) &&
|
||||
xasprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
|
||||
xasprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
|
||||
die (STATE_UNKNOWN, _("Unable to realloc warn_text\n"));
|
||||
return (STATE_WARNING);
|
||||
}
|
||||
|
|
@ -567,7 +574,7 @@ print_help (void)
|
|||
|
||||
printf (_("Use ping to check connection statistics for a remote host."));
|
||||
|
||||
printf ("\n\n");
|
||||
printf ("\n\n");
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -577,29 +584,29 @@ print_help (void)
|
|||
printf (UT_IPv46);
|
||||
|
||||
printf (" %s\n", "-H, --hostname=HOST");
|
||||
printf (" %s\n", _("host to ping"));
|
||||
printf (" %s\n", "-w, --warning=THRESHOLD");
|
||||
printf (" %s\n", _("warning threshold pair"));
|
||||
printf (" %s\n", "-c, --critical=THRESHOLD");
|
||||
printf (" %s\n", _("critical threshold pair"));
|
||||
printf (" %s\n", "-p, --packets=INTEGER");
|
||||
printf (" %s ", _("number of ICMP ECHO packets to send"));
|
||||
printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS);
|
||||
printf (" %s\n", "-L, --link");
|
||||
printf (" %s\n", _("show HTML in the plugin output (obsoleted by urlize)"));
|
||||
printf (" %s\n", _("host to ping"));
|
||||
printf (" %s\n", "-w, --warning=THRESHOLD");
|
||||
printf (" %s\n", _("warning threshold pair"));
|
||||
printf (" %s\n", "-c, --critical=THRESHOLD");
|
||||
printf (" %s\n", _("critical threshold pair"));
|
||||
printf (" %s\n", "-p, --packets=INTEGER");
|
||||
printf (" %s ", _("number of ICMP ECHO packets to send"));
|
||||
printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS);
|
||||
printf (" %s\n", "-L, --link");
|
||||
printf (" %s\n", _("show HTML in the plugin output (obsoleted by urlize)"));
|
||||
|
||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||
|
||||
printf ("\n");
|
||||
printf ("\n");
|
||||
printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel"));
|
||||
printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the"));
|
||||
printf ("%s\n", _("percentage of packet loss to trigger an alarm state."));
|
||||
printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the"));
|
||||
printf ("%s\n", _("percentage of packet loss to trigger an alarm state."));
|
||||
|
||||
printf ("\n");
|
||||
printf ("\n");
|
||||
printf ("%s\n", _("This plugin uses the ping command to probe the specified host for packet loss"));
|
||||
printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output"));
|
||||
printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in"));
|
||||
printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/"));
|
||||
printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output"));
|
||||
printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in"));
|
||||
printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/"));
|
||||
|
||||
printf (UT_SUPPORT);
|
||||
}
|
||||
|
|
@ -607,7 +614,7 @@ print_help (void)
|
|||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);
|
||||
printf (" [-p packets] [-t timeout] [-4|-6]\n");
|
||||
printf (" [-p packets] [-t timeout] [-4|-6]\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,34 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
* Monitoring check_procs plugin
|
||||
*
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 2000-2008 Monitoring Plugins Development Team
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
* This file contains the check_procs plugin
|
||||
*
|
||||
*
|
||||
* Checks all processes and generates WARNING or CRITICAL states if the
|
||||
* specified metric is outside the required threshold ranges. The metric
|
||||
* defaults to number of processes. Search filters can be applied to limit
|
||||
* the processes to check.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
const char *progname = "check_procs";
|
||||
|
|
@ -50,7 +50,7 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
|
||||
int process_arguments (int, char **);
|
||||
int validate_arguments (void);
|
||||
int convert_to_seconds (char *);
|
||||
int convert_to_seconds (char *);
|
||||
void print_help (void);
|
||||
void print_usage (void);
|
||||
|
||||
|
|
@ -230,9 +230,9 @@ main (int argc, char **argv)
|
|||
procseconds = convert_to_seconds(procetime);
|
||||
|
||||
if (verbose >= 3)
|
||||
printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n",
|
||||
printf ("proc#=%d uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n",
|
||||
procs, procuid, procvsz, procrss,
|
||||
procpid, procppid, procpcpu, procstat,
|
||||
procpid, procppid, procpcpu, procstat,
|
||||
procetime, procprog, procargs);
|
||||
|
||||
/* Ignore self */
|
||||
|
|
@ -265,7 +265,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if ((options & STAT) && (strstr (statopts, procstat)))
|
||||
if ((options & STAT) && (strstr (procstat, statopts)))
|
||||
resultsum |= STAT;
|
||||
if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL))
|
||||
resultsum |= ARGS;
|
||||
|
|
@ -292,9 +292,9 @@ main (int argc, char **argv)
|
|||
|
||||
procs++;
|
||||
if (verbose >= 2) {
|
||||
printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n",
|
||||
printf ("Matched: uid=%d vsz=%d rss=%d pid=%d ppid=%d pcpu=%.2f stat=%s etime=%s prog=%s args=%s\n",
|
||||
procuid, procvsz, procrss,
|
||||
procpid, procppid, procpcpu, procstat,
|
||||
procpid, procppid, procpcpu, procstat,
|
||||
procetime, procprog, procargs);
|
||||
}
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ main (int argc, char **argv)
|
|||
result = max_state (result, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* This should not happen */
|
||||
else if (verbose) {
|
||||
printf(_("Not parseable: %s"), input_buffer);
|
||||
|
|
@ -332,7 +332,7 @@ main (int argc, char **argv)
|
|||
return STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
if ( result == STATE_UNKNOWN )
|
||||
if ( result == STATE_UNKNOWN )
|
||||
result = STATE_OK;
|
||||
|
||||
/* Needed if procs found, but none match filter */
|
||||
|
|
@ -352,9 +352,9 @@ main (int argc, char **argv)
|
|||
if (metric != METRIC_PROCS) {
|
||||
printf (_("%d crit, %d warn out of "), crit, warn);
|
||||
}
|
||||
}
|
||||
}
|
||||
printf (ngettext ("%d process", "%d processes", (unsigned long) procs), procs);
|
||||
|
||||
|
||||
if (strcmp(fmt,"") != 0) {
|
||||
printf (_(" with %s"), fmt);
|
||||
}
|
||||
|
|
@ -440,7 +440,7 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
case 'c': /* critical threshold */
|
||||
critical_range = optarg;
|
||||
break;
|
||||
break;
|
||||
case 'w': /* warning threshold */
|
||||
warning_range = optarg;
|
||||
break;
|
||||
|
|
@ -542,11 +542,11 @@ process_arguments (int argc, char **argv)
|
|||
if ( strcmp(optarg, "PROCS") == 0) {
|
||||
metric = METRIC_PROCS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( strcmp(optarg, "VSZ") == 0) {
|
||||
metric = METRIC_VSZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( strcmp(optarg, "RSS") == 0 ) {
|
||||
metric = METRIC_RSS;
|
||||
break;
|
||||
|
|
@ -559,7 +559,7 @@ process_arguments (int argc, char **argv)
|
|||
metric = METRIC_ELAPSED;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
usage4 (_("Metric must be one of PROCS, VSZ, RSS, CPU, ELAPSED!"));
|
||||
case 'k': /* linux kernel thread filter */
|
||||
kthread_filter = 1;
|
||||
|
|
@ -642,7 +642,7 @@ convert_to_seconds(char *etime) {
|
|||
seconds = 0;
|
||||
|
||||
for (ptr = etime; *ptr != '\0'; ptr++) {
|
||||
|
||||
|
||||
if (*ptr == '-') {
|
||||
hyphcnt++;
|
||||
continue;
|
||||
|
|
@ -775,7 +775,7 @@ be the total number of running processes\n\n"));
|
|||
printf (" %s\n", "check_procs -w 50000 -c 100000 --metric=VSZ");
|
||||
printf (" %s\n\n", _("Alert if VSZ of any processes over 50K or 100K"));
|
||||
printf (" %s\n", "check_procs -w 10 -c 20 --metric=CPU");
|
||||
printf (" %s\n", _("Alert if CPU of any processes over 10%% or 20%%"));
|
||||
printf (" %s\n", _("Alert if CPU of any processes over 10\% or 20\%"));
|
||||
|
||||
printf (UT_SUPPORT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ enum {
|
|||
#define SMTP_EXPECT "220"
|
||||
#define SMTP_HELO "HELO "
|
||||
#define SMTP_EHLO "EHLO "
|
||||
#define SMTP_LHLO "LHLO "
|
||||
#define SMTP_QUIT "QUIT\r\n"
|
||||
#define SMTP_STARTTLS "STARTTLS\r\n"
|
||||
#define SMTP_AUTH_LOGIN "AUTH LOGIN\r\n"
|
||||
|
|
@ -102,6 +103,7 @@ int check_critical_time = FALSE;
|
|||
int verbose = 0;
|
||||
int use_ssl = FALSE;
|
||||
short use_ehlo = FALSE;
|
||||
short use_lhlo = FALSE;
|
||||
short ssl_established = 0;
|
||||
char *localhostname = NULL;
|
||||
int sd;
|
||||
|
|
@ -152,7 +154,9 @@ main (int argc, char **argv)
|
|||
return STATE_CRITICAL;
|
||||
}
|
||||
}
|
||||
if(use_ehlo)
|
||||
if(use_lhlo)
|
||||
xasprintf (&helocmd, "%s%s%s", SMTP_LHLO, localhostname, "\r\n");
|
||||
else if(use_ehlo)
|
||||
xasprintf (&helocmd, "%s%s%s", SMTP_EHLO, localhostname, "\r\n");
|
||||
else
|
||||
xasprintf (&helocmd, "%s%s%s", SMTP_HELO, localhostname, "\r\n");
|
||||
|
|
@ -197,7 +201,7 @@ main (int argc, char **argv)
|
|||
if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) {
|
||||
printf (_("recv() failed\n"));
|
||||
return STATE_WARNING;
|
||||
} else if(use_ehlo){
|
||||
} else if(use_ehlo || use_lhlo){
|
||||
if(strstr(buffer, "250 STARTTLS") != NULL ||
|
||||
strstr(buffer, "250-STARTTLS") != NULL){
|
||||
supports_tls=TRUE;
|
||||
|
|
@ -470,6 +474,7 @@ process_arguments (int argc, char **argv)
|
|||
{"use-ipv4", no_argument, 0, '4'},
|
||||
{"use-ipv6", no_argument, 0, '6'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"lmtp", no_argument, 0, 'L'},
|
||||
{"starttls",no_argument,0,'S'},
|
||||
{"certificate",required_argument,0,'D'},
|
||||
{"ignore-quit-failure",no_argument,0,'q'},
|
||||
|
|
@ -489,7 +494,7 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:A:U:P:q",
|
||||
c = getopt_long (argc, argv, "+hVv46Lt:p:f:e:c:w:H:C:R:SD:F:A:U:P:q",
|
||||
longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
|
|
@ -616,6 +621,9 @@ process_arguments (int argc, char **argv)
|
|||
use_ssl = TRUE;
|
||||
use_ehlo = TRUE;
|
||||
break;
|
||||
case 'L':
|
||||
use_lhlo = TRUE;
|
||||
break;
|
||||
case '4':
|
||||
address_family = AF_INET;
|
||||
break;
|
||||
|
|
@ -824,6 +832,8 @@ print_help (void)
|
|||
printf (" %s\n", _("SMTP AUTH username"));
|
||||
printf (" %s\n", "-P, --authpass=STRING");
|
||||
printf (" %s\n", _("SMTP AUTH password"));
|
||||
printf (" %s\n", "-L, --lmtp");
|
||||
printf (" %s\n", _("Send LHLO instead of HELO/EHLO"));
|
||||
printf (" %s\n", "-q, --ignore-quit-failure");
|
||||
printf (" %s\n", _("Ignore failure when sending QUIT command to server"));
|
||||
|
||||
|
|
@ -850,6 +860,6 @@ print_usage (void)
|
|||
printf ("%s\n", _("Usage:"));
|
||||
printf ("%s -H host [-p port] [-4|-6] [-e expect] [-C command] [-R response] [-f from addr]\n", progname);
|
||||
printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout] [-q]\n");
|
||||
printf ("[-F fqdn] [-S] [-D warn days cert expire[,crit days cert expire]] [-v] \n");
|
||||
printf ("[-F fqdn] [-S] [-L] [-D warn days cert expire[,crit days cert expire]] [-v] \n");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ char *authproto = NULL;
|
|||
char *privproto = NULL;
|
||||
char *authpasswd = NULL;
|
||||
char *privpasswd = NULL;
|
||||
int nulloid = STATE_UNKNOWN;
|
||||
char **oids = NULL;
|
||||
size_t oids_size = 0;
|
||||
char *label;
|
||||
|
|
@ -375,7 +376,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
for (line=0, i=0; line < chld_out.lines; line++, i++) {
|
||||
for (line=0, i=0; line < chld_out.lines && i < numoids ; line++, i++) {
|
||||
if(calculate_rate)
|
||||
conv = "%.10g";
|
||||
else
|
||||
|
|
@ -468,9 +469,20 @@ main (int argc, char **argv)
|
|||
/* Process this block for numeric comparisons */
|
||||
/* Make some special values,like Timeticks numeric only if a threshold is defined */
|
||||
if (thlds[i]->warning || thlds[i]->critical || calculate_rate) {
|
||||
if (verbose > 2) {
|
||||
print_thresholds(" thresholds", thlds[i]);
|
||||
}
|
||||
ptr = strpbrk (show, "-0123456789");
|
||||
if (ptr == NULL)
|
||||
die (STATE_UNKNOWN,_("No valid data returned (%s)\n"), show);
|
||||
if (ptr == NULL){
|
||||
if (nulloid == 3)
|
||||
die (STATE_UNKNOWN,_("No valid data returned (%s)\n"), show);
|
||||
else if (nulloid == 0)
|
||||
die (STATE_OK,_("No valid data returned (%s)\n"), show);
|
||||
else if (nulloid == 1)
|
||||
die (STATE_WARNING,_("No valid data returned (%s)\n"), show);
|
||||
else if (nulloid == 2)
|
||||
die (STATE_CRITICAL,_("No valid data returned (%s)\n"), show);
|
||||
}
|
||||
while (i >= response_size) {
|
||||
response_size += OID_COUNT_STEP;
|
||||
response_value = realloc(response_value, response_size * sizeof(*response_value));
|
||||
|
|
@ -581,14 +593,16 @@ main (int argc, char **argv)
|
|||
|
||||
if (warning_thresholds) {
|
||||
strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
|
||||
strncat(perfstr, warning_thresholds, sizeof(perfstr)-strlen(perfstr)-1);
|
||||
if(thlds[i]->warning && thlds[i]->warning->text)
|
||||
strncat(perfstr, thlds[i]->warning->text, sizeof(perfstr)-strlen(perfstr)-1);
|
||||
}
|
||||
|
||||
if (critical_thresholds) {
|
||||
if (!warning_thresholds)
|
||||
strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
|
||||
strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
|
||||
strncat(perfstr, critical_thresholds, sizeof(perfstr)-strlen(perfstr)-1);
|
||||
if(thlds[i]->critical && thlds[i]->critical->text)
|
||||
strncat(perfstr, thlds[i]->critical->text, sizeof(perfstr)-strlen(perfstr)-1);
|
||||
}
|
||||
|
||||
strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1);
|
||||
|
|
@ -656,6 +670,7 @@ process_arguments (int argc, char **argv)
|
|||
{"oid", required_argument, 0, 'o'},
|
||||
{"object", required_argument, 0, 'o'},
|
||||
{"delimiter", required_argument, 0, 'd'},
|
||||
{"nulloid", required_argument, 0, 'z'},
|
||||
{"output-delimiter", required_argument, 0, 'D'},
|
||||
{"string", required_argument, 0, 's'},
|
||||
{"timeout", required_argument, 0, 't'},
|
||||
|
|
@ -700,7 +715,7 @@ process_arguments (int argc, char **argv)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
c = getopt_long (argc, argv, "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:",
|
||||
c = getopt_long (argc, argv, "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:z:",
|
||||
longopts, &option);
|
||||
|
||||
if (c == -1 || c == EOF)
|
||||
|
|
@ -811,6 +826,12 @@ process_arguments (int argc, char **argv)
|
|||
eval_method[j+1] |= CRIT_PRESENT;
|
||||
}
|
||||
break;
|
||||
case 'z': /* Null OID Return Check */
|
||||
if (!is_integer (optarg))
|
||||
usage2 (_("Exit status must be a positive integer"), optarg);
|
||||
else
|
||||
nulloid = atoi(optarg);
|
||||
break;
|
||||
case 's': /* string or substring */
|
||||
strncpy (string_value, optarg, sizeof (string_value) - 1);
|
||||
string_value[sizeof (string_value) - 1] = 0;
|
||||
|
|
@ -1161,7 +1182,7 @@ print_help (void)
|
|||
printf ("(%s \"%s\")\n", _("default is") ,DEFAULT_COMMUNITY);
|
||||
printf (" %s\n", "-U, --secname=USERNAME");
|
||||
printf (" %s\n", _("SNMPv3 username"));
|
||||
printf (" %s\n", "-A, --authpassword=PASSWORD");
|
||||
printf (" %s\n", "-A, --authpasswd=PASSWORD");
|
||||
printf (" %s\n", _("SNMPv3 authentication password"));
|
||||
printf (" %s\n", "-X, --privpasswd=PASSWORD");
|
||||
printf (" %s\n", _("SNMPv3 privacy password"));
|
||||
|
|
@ -1176,6 +1197,14 @@ print_help (void)
|
|||
printf (" %s \"%s\"\n", _("Delimiter to use when parsing returned data. Default is"), DEFAULT_DELIMITER);
|
||||
printf (" %s\n", _("Any data on the right hand side of the delimiter is considered"));
|
||||
printf (" %s\n", _("to be the data that should be used in the evaluation."));
|
||||
printf (" %s\n", "-z, --nulloid=#");
|
||||
printf (" %s\n", _("If the check returns a 0 length string or NULL value"));
|
||||
printf (" %s\n", _("This option allows you to choose what status you want it to exit"));
|
||||
printf (" %s\n", _("Excluding this option renders the default exit of 3(STATE_UNKNOWN)"));
|
||||
printf (" %s\n", _("0 = OK"));
|
||||
printf (" %s\n", _("1 = WARNING"));
|
||||
printf (" %s\n", _("2 = CRITICAL"));
|
||||
printf (" %s\n", _("3 = UNKNOWN"));
|
||||
|
||||
/* Tests Against Integers */
|
||||
printf (" %s\n", "-w, --warning=THRESHOLD(s)");
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
* Monitoring check_swap plugin
|
||||
*
|
||||
*
|
||||
* License: GPL
|
||||
* Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net)
|
||||
* Copyright (c) 2000-2007 Monitoring Plugins Development Team
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
*
|
||||
* This file contains the check_swap plugin
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
const char *progname = "check_swap";
|
||||
|
|
@ -34,6 +34,9 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
#include "common.h"
|
||||
#include "popen.h"
|
||||
#include "utils.h"
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef HAVE_DECL_SWAPCTL
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
|
|
@ -51,16 +54,19 @@ const char *email = "devel@monitoring-plugins.org";
|
|||
# define SWAP_CONVERSION 1
|
||||
#endif
|
||||
|
||||
int check_swap (int usp, float free_swap_mb, float total_swap_mb);
|
||||
typedef struct {
|
||||
int is_percentage;
|
||||
uint64_t value;
|
||||
} threshold_t;
|
||||
|
||||
int check_swap (float free_swap_mb, float total_swap_mb);
|
||||
int process_arguments (int argc, char **argv);
|
||||
int validate_arguments (void);
|
||||
void print_usage (void);
|
||||
void print_help (void);
|
||||
|
||||
int warn_percent = 0;
|
||||
int crit_percent = 0;
|
||||
float warn_size_bytes = 0;
|
||||
float crit_size_bytes = 0;
|
||||
threshold_t warn;
|
||||
threshold_t crit;
|
||||
int verbose;
|
||||
int allswaps;
|
||||
int no_swap_state = STATE_CRITICAL;
|
||||
|
|
@ -68,9 +74,10 @@ int no_swap_state = STATE_CRITICAL;
|
|||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int percent_used, percent;
|
||||
float total_swap_mb = 0, used_swap_mb = 0, free_swap_mb = 0;
|
||||
float dsktotal_mb = 0, dskused_mb = 0, dskfree_mb = 0, tmp_mb = 0;
|
||||
unsigned int percent_used, percent;
|
||||
uint64_t total_swap_mb = 0, used_swap_mb = 0, free_swap_mb = 0;
|
||||
uint64_t dsktotal_mb = 0, dskused_mb = 0, dskfree_mb = 0;
|
||||
uint64_t tmp_KB = 0;
|
||||
int result = STATE_UNKNOWN;
|
||||
char input_buffer[MAX_INPUT_BUFFER];
|
||||
#ifdef HAVE_PROC_MEMINFO
|
||||
|
|
@ -116,10 +123,15 @@ main (int argc, char **argv)
|
|||
}
|
||||
fp = fopen (PROC_MEMINFO, "r");
|
||||
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) {
|
||||
if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%*[:] %f %f %f", &dsktotal_mb, &dskused_mb, &dskfree_mb) == 3) {
|
||||
dsktotal_mb = dsktotal_mb / 1048576; /* Apply conversion */
|
||||
dskused_mb = dskused_mb / 1048576;
|
||||
dskfree_mb = dskfree_mb / 1048576;
|
||||
/*
|
||||
* The following sscanf call looks for a line looking like: "Swap: 123 123 123"
|
||||
* On which kind of system this format exists, I can not say, but I wanted to
|
||||
* document this for people who are not adapt with sscanf anymore, like me
|
||||
*/
|
||||
if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%*[:] %lu %lu %lu", &dsktotal_mb, &dskused_mb, &dskfree_mb) == 3) {
|
||||
dsktotal_mb = dsktotal_mb / (1024 * 1024); /* Apply conversion */
|
||||
dskused_mb = dskused_mb / (1024 * 1024);
|
||||
dskfree_mb = dskfree_mb / (1024 * 1024);
|
||||
total_swap_mb += dsktotal_mb;
|
||||
used_swap_mb += dskused_mb;
|
||||
free_swap_mb += dskfree_mb;
|
||||
|
|
@ -128,21 +140,29 @@ main (int argc, char **argv)
|
|||
percent=100.0;
|
||||
else
|
||||
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
|
||||
result = max_state (result, check_swap (percent, dskfree_mb, dsktotal_mb));
|
||||
result = max_state (result, check_swap (dskfree_mb, dsktotal_mb));
|
||||
if (verbose)
|
||||
xasprintf (&status, "%s [%.0f (%d%%)]", status, dskfree_mb, 100 - percent);
|
||||
xasprintf (&status, "%s [%lu (%d%%)]", status, dskfree_mb, 100 - percent);
|
||||
}
|
||||
}
|
||||
else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFre]%*[:] %f %*[k]%*[B]", str, &tmp_mb)) {
|
||||
|
||||
/*
|
||||
* The following sscanf call looks for lines looking like: "SwapTotal: 123" and "SwapFree: 123"
|
||||
* This format exists at least on Debian Linux with a 5.* kernel
|
||||
*/
|
||||
else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFreCchd]%*[:] %lu %*[k]%*[B]", str, &tmp_KB)) {
|
||||
if (verbose >= 3) {
|
||||
printf("Got %s with %f\n", str, tmp_mb);
|
||||
printf("Got %s with %lu\n", str, tmp_KB);
|
||||
}
|
||||
/* I think this part is always in Kb, so convert to mb */
|
||||
if (strcmp ("Total", str) == 0) {
|
||||
dsktotal_mb = tmp_mb / 1024;
|
||||
dsktotal_mb = tmp_KB / 1024;
|
||||
}
|
||||
else if (strcmp ("Free", str) == 0) {
|
||||
dskfree_mb = tmp_mb / 1024;
|
||||
dskfree_mb = dskfree_mb + tmp_KB / 1024;
|
||||
}
|
||||
else if (strcmp ("Cached", str) == 0) {
|
||||
dskfree_mb = dskfree_mb + tmp_KB / 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -227,7 +247,7 @@ main (int argc, char **argv)
|
|||
free_swap_mb += dskfree_mb;
|
||||
if (allswaps) {
|
||||
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
|
||||
result = max_state (result, check_swap (percent, dskfree_mb, dsktotal_mb));
|
||||
result = max_state (result, check_swap (dskfree_mb, dsktotal_mb));
|
||||
if (verbose)
|
||||
xasprintf (&status, "%s [%.0f (%d%%)]", status, dskfree_mb, 100 - percent);
|
||||
}
|
||||
|
|
@ -289,7 +309,7 @@ main (int argc, char **argv)
|
|||
|
||||
if(allswaps && dsktotal_mb > 0){
|
||||
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
|
||||
result = max_state (result, check_swap (percent, dskfree_mb, dsktotal_mb));
|
||||
result = max_state (result, check_swap (dskfree_mb, dsktotal_mb));
|
||||
if (verbose) {
|
||||
xasprintf (&status, "%s [%.0f (%d%%)]", status, dskfree_mb, 100 - percent);
|
||||
}
|
||||
|
|
@ -328,7 +348,7 @@ main (int argc, char **argv)
|
|||
|
||||
if(allswaps && dsktotal_mb > 0){
|
||||
percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb));
|
||||
result = max_state (result, check_swap (percent, dskfree_mb, dsktotal_mb));
|
||||
result = max_state (result, check_swap(dskfree_mb, dsktotal_mb));
|
||||
if (verbose) {
|
||||
xasprintf (&status, "%s [%.0f (%d%%)]", status, dskfree_mb, 100 - percent);
|
||||
}
|
||||
|
|
@ -355,41 +375,55 @@ main (int argc, char **argv)
|
|||
status = "- Swap is either disabled, not present, or of zero size. ";
|
||||
}
|
||||
|
||||
result = max_state (result, check_swap (percent_used, free_swap_mb, total_swap_mb));
|
||||
printf (_("SWAP %s - %d%% free (%d MB out of %d MB) %s|"),
|
||||
result = max_state (result, check_swap(free_swap_mb, total_swap_mb));
|
||||
printf (_("SWAP %s - %d%% free (%dMB out of %dMB) %s|"),
|
||||
state_text (result),
|
||||
(100 - percent_used), (int) free_swap_mb, (int) total_swap_mb, status);
|
||||
|
||||
puts (perfdata ("swap", (long) free_swap_mb, "MB",
|
||||
TRUE, (long) max (warn_size_bytes/(1024 * 1024), warn_percent/100.0*total_swap_mb),
|
||||
TRUE, (long) max (crit_size_bytes/(1024 * 1024), crit_percent/100.0*total_swap_mb),
|
||||
uint64_t warn_print = warn.value;
|
||||
if (warn.is_percentage) warn_print = warn.value * (total_swap_mb *1024 *1024/100);
|
||||
uint64_t crit_print = crit.value;
|
||||
if (crit.is_percentage) crit_print = crit.value * (total_swap_mb *1024 *1024/100);
|
||||
|
||||
puts (perfdata_uint64 ("swap", free_swap_mb *1024 *1024, "B",
|
||||
TRUE, warn_print,
|
||||
TRUE, crit_print,
|
||||
TRUE, 0,
|
||||
TRUE, (long) total_swap_mb));
|
||||
TRUE, (long) total_swap_mb * 1024 * 1024));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
check_swap (int usp, float free_swap_mb, float total_swap_mb)
|
||||
check_swap(float free_swap_mb, float total_swap_mb)
|
||||
{
|
||||
|
||||
if (!total_swap_mb) return no_swap_state;
|
||||
|
||||
int result = STATE_UNKNOWN;
|
||||
float free_swap = free_swap_mb * (1024 * 1024); /* Convert back to bytes as warn and crit specified in bytes */
|
||||
if (usp >= 0 && crit_percent != 0 && usp >= (100.0 - crit_percent))
|
||||
result = STATE_CRITICAL;
|
||||
else if (crit_size_bytes > 0 && free_swap <= crit_size_bytes)
|
||||
result = STATE_CRITICAL;
|
||||
else if (usp >= 0 && warn_percent != 0 && usp >= (100.0 - warn_percent))
|
||||
result = STATE_WARNING;
|
||||
else if (warn_size_bytes > 0 && free_swap <= warn_size_bytes)
|
||||
result = STATE_WARNING;
|
||||
else if (usp >= 0.0)
|
||||
result = STATE_OK;
|
||||
return result;
|
||||
uint64_t free_swap = free_swap_mb * (1024 * 1024); /* Convert back to bytes as warn and crit specified in bytes */
|
||||
|
||||
if (!crit.is_percentage && crit.value >= free_swap) return STATE_CRITICAL;
|
||||
if (!warn.is_percentage && warn.value >= free_swap) return STATE_WARNING;
|
||||
|
||||
|
||||
uint64_t usage_percentage = ((total_swap_mb - free_swap_mb) / total_swap_mb) * 100;
|
||||
|
||||
if (crit.is_percentage &&
|
||||
crit.value != 0 &&
|
||||
usage_percentage >= (100 - crit.value))
|
||||
{
|
||||
return STATE_CRITICAL;
|
||||
}
|
||||
|
||||
if (warn.is_percentage &&
|
||||
warn.value != 0 &&
|
||||
usage_percentage >= (100 - warn.value))
|
||||
{
|
||||
return STATE_WARNING;
|
||||
}
|
||||
|
||||
return STATE_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -422,42 +456,66 @@ process_arguments (int argc, char **argv)
|
|||
break;
|
||||
|
||||
switch (c) {
|
||||
case 'w': /* warning size threshold */
|
||||
if (is_intnonneg (optarg)) {
|
||||
warn_size_bytes = (float) atoi (optarg);
|
||||
break;
|
||||
}
|
||||
else if (strstr (optarg, ",") &&
|
||||
strstr (optarg, "%") &&
|
||||
sscanf (optarg, "%f,%d%%", &warn_size_bytes, &warn_percent) == 2) {
|
||||
warn_size_bytes = floorf(warn_size_bytes);
|
||||
break;
|
||||
}
|
||||
else if (strstr (optarg, "%") &&
|
||||
sscanf (optarg, "%d%%", &warn_percent) == 1) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
usage4 (_("Warning threshold must be integer or percentage!"));
|
||||
}
|
||||
case 'c': /* critical size threshold */
|
||||
if (is_intnonneg (optarg)) {
|
||||
crit_size_bytes = (float) atoi (optarg);
|
||||
break;
|
||||
}
|
||||
else if (strstr (optarg, ",") &&
|
||||
strstr (optarg, "%") &&
|
||||
sscanf (optarg, "%f,%d%%", &crit_size_bytes, &crit_percent) == 2) {
|
||||
crit_size_bytes = floorf(crit_size_bytes);
|
||||
break;
|
||||
}
|
||||
else if (strstr (optarg, "%") &&
|
||||
sscanf (optarg, "%d%%", &crit_percent) == 1) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
usage4 (_("Critical threshold must be integer or percentage!"));
|
||||
case 'w': /* warning size threshold */
|
||||
{
|
||||
/*
|
||||
* We expect either a positive integer value without a unit, which means
|
||||
* the unit is Bytes or a positive integer value and a percentage sign (%),
|
||||
* which means the value must be with 0 and 100 and is relative to the total swap
|
||||
*/
|
||||
size_t length;
|
||||
length = strlen(optarg);
|
||||
|
||||
if (optarg[length - 1] == '%') {
|
||||
/* It's percentage */
|
||||
warn.is_percentage = 1;
|
||||
optarg[length - 1] = '\0';
|
||||
if (is_uint64(optarg, &warn.value)) {
|
||||
if (warn.value > 100) {
|
||||
usage4 (_("Warning threshold percentage must be <= 100!"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
/* It's Bytes */
|
||||
warn.is_percentage = 0;
|
||||
if (is_uint64(optarg, &warn.value)) {
|
||||
break;
|
||||
} else {
|
||||
usage4 (_("Warning threshold be positive integer or percentage!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'c': /* critical size threshold */
|
||||
{
|
||||
/*
|
||||
* We expect either a positive integer value without a unit, which means
|
||||
* the unit is Bytes or a positive integer value and a percentage sign (%),
|
||||
* which means the value must be with 0 and 100 and is relative to the total swap
|
||||
*/
|
||||
size_t length;
|
||||
length = strlen(optarg);
|
||||
|
||||
if (optarg[length - 1] == '%') {
|
||||
/* It's percentage */
|
||||
crit.is_percentage = 1;
|
||||
optarg[length - 1] = '\0';
|
||||
if (is_uint64(optarg, &crit.value)) {
|
||||
if (crit.value> 100) {
|
||||
usage4 (_("Critical threshold percentage must be <= 100!"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
/* It's Bytes */
|
||||
crit.is_percentage = 0;
|
||||
if (is_uint64(optarg, &crit.value)) {
|
||||
break;
|
||||
} else {
|
||||
usage4 (_("Critical threshold be positive integer or percentage!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'a': /* all swap */
|
||||
allswaps = TRUE;
|
||||
break;
|
||||
|
|
@ -465,6 +523,7 @@ process_arguments (int argc, char **argv)
|
|||
if ((no_swap_state = mp_translate_state(optarg)) == ERROR) {
|
||||
usage4 (_("no-swap result must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3)."));
|
||||
}
|
||||
break;
|
||||
case 'v': /* verbose */
|
||||
verbose++;
|
||||
break;
|
||||
|
|
@ -482,23 +541,6 @@ process_arguments (int argc, char **argv)
|
|||
c = optind;
|
||||
if (c == argc)
|
||||
return validate_arguments ();
|
||||
if (warn_percent == 0 && is_intnonneg (argv[c]))
|
||||
warn_percent = atoi (argv[c++]);
|
||||
|
||||
if (c == argc)
|
||||
return validate_arguments ();
|
||||
if (crit_percent == 0 && is_intnonneg (argv[c]))
|
||||
crit_percent = atoi (argv[c++]);
|
||||
|
||||
if (c == argc)
|
||||
return validate_arguments ();
|
||||
if (warn_size_bytes == 0 && is_intnonneg (argv[c]))
|
||||
warn_size_bytes = (float) atoi (argv[c++]);
|
||||
|
||||
if (c == argc)
|
||||
return validate_arguments ();
|
||||
if (crit_size_bytes == 0 && is_intnonneg (argv[c]))
|
||||
crit_size_bytes = (float) atoi (argv[c++]);
|
||||
|
||||
return validate_arguments ();
|
||||
}
|
||||
|
|
@ -508,17 +550,15 @@ process_arguments (int argc, char **argv)
|
|||
int
|
||||
validate_arguments (void)
|
||||
{
|
||||
if (warn_percent == 0 && crit_percent == 0 && warn_size_bytes == 0
|
||||
&& crit_size_bytes == 0) {
|
||||
if (warn.value == 0 && crit.value == 0) {
|
||||
return ERROR;
|
||||
}
|
||||
else if (warn_percent < crit_percent) {
|
||||
usage4
|
||||
(_("Warning percentage should be more than critical percentage"));
|
||||
}
|
||||
else if (warn_size_bytes < crit_size_bytes) {
|
||||
usage4
|
||||
(_("Warning free space should be more than critical free space"));
|
||||
else if ((warn.is_percentage == crit.is_percentage) && (warn.value < crit.value)) {
|
||||
/* This is NOT triggered if warn and crit are different units, e.g warn is percentage
|
||||
* and crit is absolut. We cannot determine the condition at this point since we
|
||||
* dont know the value of total swap yet
|
||||
*/
|
||||
usage4(_("Warning should be more than critical"));
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
|
@ -534,7 +574,7 @@ print_help (void)
|
|||
|
||||
printf ("%s\n", _("Check swap space on local machine."));
|
||||
|
||||
printf ("\n\n");
|
||||
printf ("\n\n");
|
||||
|
||||
print_usage ();
|
||||
|
||||
|
|
@ -542,33 +582,32 @@ print_help (void)
|
|||
printf (UT_EXTRA_OPTS);
|
||||
|
||||
printf (" %s\n", "-w, --warning=INTEGER");
|
||||
printf (" %s\n", _("Exit with WARNING status if less than INTEGER bytes of swap space are free"));
|
||||
printf (" %s\n", "-w, --warning=PERCENT%%");
|
||||
printf (" %s\n", _("Exit with WARNING status if less than PERCENT of swap space is free"));
|
||||
printf (" %s\n", "-c, --critical=INTEGER");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if less than INTEGER bytes of swap space are free"));
|
||||
printf (" %s\n", "-c, --critical=PERCENT%%");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if less than PERCENT of swap space is free"));
|
||||
printf (" %s\n", "-a, --allswaps");
|
||||
printf (" %s\n", _("Conduct comparisons for all swap partitions, one by one"));
|
||||
printf (" %s\n", "-n, --no-swap=<ok|warning|critical|unknown>");
|
||||
printf (" %s %s\n", _("Resulting state when there is no swap regardless of thresholds. Default:"), state_text(no_swap_state));
|
||||
printf (" %s\n", _("Exit with WARNING status if less than INTEGER bytes of swap space are free"));
|
||||
printf (" %s\n", "-w, --warning=PERCENT%");
|
||||
printf (" %s\n", _("Exit with WARNING status if less than PERCENT of swap space is free"));
|
||||
printf (" %s\n", "-c, --critical=INTEGER");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if less than INTEGER bytes of swap space are free"));
|
||||
printf (" %s\n", "-c, --critical=PERCENT%");
|
||||
printf (" %s\n", _("Exit with CRITICAL status if less than PERCENT of swap space is free"));
|
||||
printf (" %s\n", "-a, --allswaps");
|
||||
printf (" %s\n", _("Conduct comparisons for all swap partitions, one by one"));
|
||||
printf (" %s\n", "-n, --no-swap=<ok|warning|critical|unknown>");
|
||||
printf (" %s %s\n", _("Resulting state when there is no swap regardless of thresholds. Default:"), state_text(no_swap_state));
|
||||
printf (UT_VERBOSE);
|
||||
|
||||
printf ("\n");
|
||||
printf ("%s\n", _("Notes:"));
|
||||
printf (" %s\n", _("Both INTEGER and PERCENT thresholds can be specified, they are all checked."));
|
||||
printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s."));
|
||||
printf ("%s\n", _("Notes:"));
|
||||
printf (" %s\n", _("Both INTEGER and PERCENT thresholds can be specified, they are all checked."));
|
||||
printf (" %s\n", _("On AIX, if -a is specified, uses lsps -a, otherwise uses lsps -s."));
|
||||
|
||||
printf (UT_SUPPORT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
print_usage (void)
|
||||
{
|
||||
printf ("%s\n", _("Usage:"));
|
||||
printf (" %s [-av] -w <percent_free>%% -c <percent_free>%%\n",progname);
|
||||
printf (" -w <bytes_free> -c <bytes_free> [-n <state>]\n");
|
||||
printf (" %s [-av] -w <percent_free>%% -c <percent_free>%%\n",progname);
|
||||
printf (" -w <bytes_free> -c <bytes_free> [-n <state>]\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,7 +402,10 @@ get_ups_variable (const char *varname, char *buf, size_t buflen)
|
|||
|
||||
/* create the command string to send to the UPS daemon */
|
||||
/* Add LOGOUT to avoid read failure logs */
|
||||
sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
|
||||
if (snprintf (send_buffer, sizeof(send_buffer), "GET VAR %s %s\nLOGOUT\n", ups_name, varname) >= sizeof(send_buffer)) {
|
||||
printf("%s\n", _("UPS name to long for buffer"));
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* send the command to the daemon and get a response back */
|
||||
if (process_tcp_request
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.11.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -16,23 +15,61 @@
|
|||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__make_dryrun = \
|
||||
{ \
|
||||
am__dry=no; \
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
||||
*) \
|
||||
for am__flg in $$MAKEFLAGS; do \
|
||||
case $$am__flg in \
|
||||
*=*|--*) ;; \
|
||||
*n*) am__dry=yes; break;; \
|
||||
esac; \
|
||||
done;; \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
test $$am__dry = yes; \
|
||||
}
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
|
|
@ -51,7 +88,6 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = plugins/picohttpparser
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
||||
$(top_srcdir)/m4/np_mysqlclient.m4 \
|
||||
|
|
@ -154,28 +190,59 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libcurl.m4 \
|
|||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
am__v_AR_1 =
|
||||
libpicohttpparser_a_AR = $(AR) $(ARFLAGS)
|
||||
libpicohttpparser_a_LIBADD =
|
||||
am_libpicohttpparser_a_OBJECTS = picohttpparser.$(OBJEXT)
|
||||
libpicohttpparser_a_OBJECTS = $(am_libpicohttpparser_a_OBJECTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/picohttpparser.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libpicohttpparser_a_SOURCES)
|
||||
DIST_SOURCES = $(libpicohttpparser_a_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
|
|
@ -183,14 +250,35 @@ am__can_run_installinfo = \
|
|||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||
$(top_srcdir)/build-aux/depcomp \
|
||||
$(top_srcdir)/build-aux/mkinstalldirs
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkglibexecdir = @pkglibexecdir@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_H = @ALLOCA_H@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
|
||||
AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
|
|
@ -1316,6 +1404,7 @@ pdfdir = @pdfdir@
|
|||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
|
|
@ -1343,14 +1432,13 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
|||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/picohttpparser/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu plugins/picohttpparser/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
|
|
@ -1364,10 +1452,11 @@ $(am__aclocal_m4_deps):
|
|||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
|
||||
libpicohttpparser.a: $(libpicohttpparser_a_OBJECTS) $(libpicohttpparser_a_DEPENDENCIES) $(EXTRA_libpicohttpparser_a_DEPENDENCIES)
|
||||
-rm -f libpicohttpparser.a
|
||||
$(libpicohttpparser_a_AR) libpicohttpparser.a $(libpicohttpparser_a_OBJECTS) $(libpicohttpparser_a_LIBADD)
|
||||
$(RANLIB) libpicohttpparser.a
|
||||
$(AM_V_at)-rm -f libpicohttpparser.a
|
||||
$(AM_V_AR)$(libpicohttpparser_a_AR) libpicohttpparser.a $(libpicohttpparser_a_OBJECTS) $(libpicohttpparser_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) libpicohttpparser.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
|
@ -1375,28 +1464,34 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/picohttpparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/picohttpparser.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -1404,26 +1499,15 @@ mostlyclean-libtool:
|
|||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
|
|
@ -1435,15 +1519,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
|
@ -1452,11 +1532,29 @@ GTAGS:
|
|||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
|
@ -1526,7 +1624,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
|||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/picohttpparser.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
|
@ -1572,7 +1670,7 @@ install-ps-am:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f ./$(DEPDIR)/picohttpparser.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
|
|
@ -1593,18 +1691,21 @@ uninstall-am:
|
|||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
||||
clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ static const char *is_complete(const char *buf, const char *buf_end, size_t last
|
|||
} while (0)
|
||||
|
||||
/* returned pointer is always within [buf, buf_end), or null */
|
||||
static const char *parse_http_version(const char *buf, const char *buf_end, int *minor_version, int *ret)
|
||||
static const char *parse_http_version(const char *buf, const char *buf_end, int *major_version, int *minor_version, int *ret)
|
||||
{
|
||||
/* we want at least [HTTP/1.<two chars>] to try to parse */
|
||||
if (buf_end - buf < 9) {
|
||||
|
|
@ -254,9 +254,13 @@ static const char *parse_http_version(const char *buf, const char *buf_end, int
|
|||
EXPECT_CHAR_NO_CHECK('T');
|
||||
EXPECT_CHAR_NO_CHECK('P');
|
||||
EXPECT_CHAR_NO_CHECK('/');
|
||||
EXPECT_CHAR_NO_CHECK('1');
|
||||
EXPECT_CHAR_NO_CHECK('.');
|
||||
PARSE_INT(minor_version, 1);
|
||||
PARSE_INT(major_version, 1);
|
||||
if (*major_version == 1) {
|
||||
EXPECT_CHAR_NO_CHECK('.');
|
||||
PARSE_INT(minor_version, 1);
|
||||
} else {
|
||||
*minor_version = 0;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -339,7 +343,7 @@ static const char *parse_headers(const char *buf, const char *buf_end, struct ph
|
|||
}
|
||||
|
||||
static const char *parse_request(const char *buf, const char *buf_end, const char **method, size_t *method_len, const char **path,
|
||||
size_t *path_len, int *minor_version, struct phr_header *headers, size_t *num_headers,
|
||||
size_t *path_len, int *major_version, int *minor_version, struct phr_header *headers, size_t *num_headers,
|
||||
size_t max_headers, int *ret)
|
||||
{
|
||||
/* skip first empty line (some clients add CRLF after POST content) */
|
||||
|
|
@ -364,7 +368,7 @@ static const char *parse_request(const char *buf, const char *buf_end, const cha
|
|||
*ret = -1;
|
||||
return NULL;
|
||||
}
|
||||
if ((buf = parse_http_version(buf, buf_end, minor_version, ret)) == NULL) {
|
||||
if ((buf = parse_http_version(buf, buf_end, major_version, minor_version, ret)) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
if (*buf == '\015') {
|
||||
|
|
@ -381,7 +385,7 @@ static const char *parse_request(const char *buf, const char *buf_end, const cha
|
|||
}
|
||||
|
||||
int phr_parse_request(const char *buf_start, size_t len, const char **method, size_t *method_len, const char **path,
|
||||
size_t *path_len, int *minor_version, struct phr_header *headers, size_t *num_headers, size_t last_len)
|
||||
size_t *path_len, int *major_version, int *minor_version, struct phr_header *headers, size_t *num_headers, size_t last_len)
|
||||
{
|
||||
const char *buf = buf_start, *buf_end = buf_start + len;
|
||||
size_t max_headers = *num_headers;
|
||||
|
|
@ -391,6 +395,7 @@ int phr_parse_request(const char *buf_start, size_t len, const char **method, si
|
|||
*method_len = 0;
|
||||
*path = NULL;
|
||||
*path_len = 0;
|
||||
*major_version = -1;
|
||||
*minor_version = -1;
|
||||
*num_headers = 0;
|
||||
|
||||
|
|
@ -400,7 +405,7 @@ int phr_parse_request(const char *buf_start, size_t len, const char **method, si
|
|||
return r;
|
||||
}
|
||||
|
||||
if ((buf = parse_request(buf, buf_end, method, method_len, path, path_len, minor_version, headers, num_headers, max_headers,
|
||||
if ((buf = parse_request(buf, buf_end, method, method_len, path, path_len, major_version, minor_version, headers, num_headers, max_headers,
|
||||
&r)) == NULL) {
|
||||
return r;
|
||||
}
|
||||
|
|
@ -408,11 +413,11 @@ int phr_parse_request(const char *buf_start, size_t len, const char **method, si
|
|||
return (int)(buf - buf_start);
|
||||
}
|
||||
|
||||
static const char *parse_response(const char *buf, const char *buf_end, int *minor_version, int *status, const char **msg,
|
||||
static const char *parse_response(const char *buf, const char *buf_end, int *major_version, int *minor_version, int *status, const char **msg,
|
||||
size_t *msg_len, struct phr_header *headers, size_t *num_headers, size_t max_headers, int *ret)
|
||||
{
|
||||
/* parse "HTTP/1.x" */
|
||||
if ((buf = parse_http_version(buf, buf_end, minor_version, ret)) == NULL) {
|
||||
if ((buf = parse_http_version(buf, buf_end, major_version, minor_version, ret)) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
/* skip space */
|
||||
|
|
@ -451,13 +456,14 @@ static const char *parse_response(const char *buf, const char *buf_end, int *min
|
|||
return parse_headers(buf, buf_end, headers, num_headers, max_headers, ret);
|
||||
}
|
||||
|
||||
int phr_parse_response(const char *buf_start, size_t len, int *minor_version, int *status, const char **msg, size_t *msg_len,
|
||||
int phr_parse_response(const char *buf_start, size_t len, int *major_version, int *minor_version, int *status, const char **msg, size_t *msg_len,
|
||||
struct phr_header *headers, size_t *num_headers, size_t last_len)
|
||||
{
|
||||
const char *buf = buf_start, *buf_end = buf + len;
|
||||
size_t max_headers = *num_headers;
|
||||
int r;
|
||||
|
||||
*major_version = -1;
|
||||
*minor_version = -1;
|
||||
*status = 0;
|
||||
*msg = NULL;
|
||||
|
|
@ -470,7 +476,7 @@ int phr_parse_response(const char *buf_start, size_t len, int *minor_version, in
|
|||
return r;
|
||||
}
|
||||
|
||||
if ((buf = parse_response(buf, buf_end, minor_version, status, msg, msg_len, headers, num_headers, max_headers, &r)) == NULL) {
|
||||
if ((buf = parse_response(buf, buf_end, major_version, minor_version, status, msg, msg_len, headers, num_headers, max_headers, &r)) == NULL) {
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ struct phr_header {
|
|||
/* returns number of bytes consumed if successful, -2 if request is partial,
|
||||
* -1 if failed */
|
||||
int phr_parse_request(const char *buf, size_t len, const char **method, size_t *method_len, const char **path, size_t *path_len,
|
||||
int *minor_version, struct phr_header *headers, size_t *num_headers, size_t last_len);
|
||||
int *major_version, int *minor_version, struct phr_header *headers, size_t *num_headers, size_t last_len);
|
||||
|
||||
/* ditto */
|
||||
int phr_parse_response(const char *_buf, size_t len, int *minor_version, int *status, const char **msg, size_t *msg_len,
|
||||
int phr_parse_response(const char *_buf, size_t len, int *major_version, int *minor_version, int *status, const char **msg, size_t *msg_len,
|
||||
struct phr_header *headers, size_t *num_headers, size_t last_len);
|
||||
|
||||
/* ditto */
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
|
|||
return STATE_CRITICAL;
|
||||
}
|
||||
if (cert && privkey) {
|
||||
SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM);
|
||||
SSL_CTX_use_certificate_chain_file(c, cert);
|
||||
SSL_CTX_use_PrivateKey_file(c, privkey, SSL_FILETYPE_PEM);
|
||||
#ifdef USE_OPENSSL
|
||||
if (!SSL_CTX_check_private_key(c)) {
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
'NP_ALLOW_SUDO' => 'yes',
|
||||
'NP_DNS_SERVER' => '8.8.8.8',
|
||||
'NP_GOOD_NTP_SERVICE' => '',
|
||||
'NP_HOST_DHCP_RESPONSIVE' => '',
|
||||
'NP_HOST_HPJD_PORT_INVALID' => '161',
|
||||
'NP_HOST_HPJD_PORT_VALID' => '',
|
||||
'NP_HOSTNAME_INVALID_CIDR' => '130.133.8.39/30',
|
||||
'NP_HOSTNAME_INVALID' => 'nosuchhost',
|
||||
'NP_HOSTNAME_VALID_CIDR' => '130.133.8.41/30',
|
||||
'NP_HOSTNAME_VALID_IP' => '130.133.8.40',
|
||||
'NP_HOSTNAME_VALID' => 'monitoring-plugins.org',
|
||||
'NP_HOSTNAME_VALID_REVERSE' => 'orwell.monitoring-plugins.org.',
|
||||
'NP_HOST_NONRESPONSIVE' => '10.0.0.1',
|
||||
'NP_HOST_RESPONSIVE' => 'localhost',
|
||||
'NP_HOST_SMB' => '',
|
||||
'NP_HOST_SNMP' => '',
|
||||
'NP_HOST_TCP_FTP' => '',
|
||||
'NP_HOST_TCP_HPJD' => '',
|
||||
'NP_HOST_TCP_HTTP2' => 'test.monitoring-plugins.org',
|
||||
'NP_HOST_TCP_HTTP' => 'localhost',
|
||||
'NP_HOST_TCP_IMAP' => 'imap.web.de',
|
||||
'NP_HOST_TCP_JABBER' => 'jabber.org',
|
||||
'NP_HOST_TCP_LDAP' => 'localhost',
|
||||
'NP_HOST_TCP_POP' => 'pop.web.de',
|
||||
'NP_HOST_TCP_PROXY' => 'localhost',
|
||||
'NP_HOST_TCP_SMTP' => 'localhost',
|
||||
'NP_HOST_TCP_SMTP_NOTLS' => '',
|
||||
'NP_HOST_TCP_SMTP_TLS' => '',
|
||||
'NP_HOST_TLS_CERT' => 'localhost,
|
||||
'NP_HOST_TLS_HTTP' => 'localhost',
|
||||
'NP_HOST_UDP_TIME' => 'none',
|
||||
'NP_INTERNET_ACCESS' => 'yes',
|
||||
'NP_LDAP_BASE_DN' => 'cn=admin,dc=nodomain',
|
||||
'NP_MOUNTPOINT2_VALID' => '/media/ramdisk',
|
||||
'NP_MOUNTPOINT_VALID' => '/',
|
||||
'NP_MYSQL_LOGIN_DETAILS' => '-u root -d test',
|
||||
'NP_MYSQL_SERVER' => 'localhost',
|
||||
'NP_MYSQL_SOCKET' => '/var/run/mysqld/mysqld.sock',
|
||||
'NP_MYSQL_WITH_SLAVE' => '',
|
||||
'NP_MYSQL_WITH_SLAVE_LOGIN' => '',
|
||||
'NP_NO_NTP_SERVICE' => 'localhost',
|
||||
'NP_PORT_TCP_PROXY' => '3128',
|
||||
'NP_SMB_SHARE' => '',
|
||||
'NP_SMB_SHARE_DENY' => '',
|
||||
'NP_SMB_SHARE_SPC' => '',
|
||||
'NP_SMB_VALID_USER' => '',
|
||||
'NP_SMB_VALID_USER_PASS' => '',
|
||||
'NP_SNMP_COMMUNITY' => '',
|
||||
'NP_SNMP_USER' => '',
|
||||
'NP_SSH_CONFIGFILE' => '~/.ssh/config',
|
||||
'NP_SSH_HOST' => 'localhost',
|
||||
'NP_SSH_IDENTITY' => '~/.ssh/id_rsa'
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ use Test::More;
|
|||
use POSIX qw/mktime strftime/;
|
||||
use NPTest;
|
||||
|
||||
plan tests => 58;
|
||||
plan tests => 57;
|
||||
|
||||
my $successOutput = '/OK.*HTTP.*second/';
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ like( $res->output, '/^Host: testhost:8001\s*$/ms', "Host Header OK" );
|
|||
like( $res->output, '/CURLOPT_URL: http:\/\/'.$host_tcp_http.':80\//ms', "Url OK" );
|
||||
|
||||
SKIP: {
|
||||
skip "No internet access", 3 if $internet_access eq "no";
|
||||
skip "No internet access", 4 if $internet_access eq "no";
|
||||
|
||||
$res = NPTest->testCmd("./$plugin -v -H $host_tls_http -S");
|
||||
like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" );
|
||||
|
|
@ -95,7 +95,7 @@ SKIP: {
|
|||
$res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443");
|
||||
like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" );
|
||||
|
||||
$res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -p 443");
|
||||
$res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -S -p 443");
|
||||
like( $res->output, '/(^Host: '.$host_tls_http.'\s*$)|(cURL returned 60)/ms', "Host Header OK" );
|
||||
};
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ SKIP: {
|
|||
cmp_ok( $res->return_code, "==", 0, "And also when not found");
|
||||
}
|
||||
SKIP: {
|
||||
skip "No internet access", 16 if $internet_access eq "no";
|
||||
skip "No internet access", 28 if $internet_access eq "no";
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"./$plugin --ssl $host_tls_http"
|
||||
|
|
@ -188,13 +188,7 @@ SKIP: {
|
|||
like ( $res->output, '/time_connect=[\d\.]+/', 'Extended Performance Data Output OK' );
|
||||
like ( $res->output, '/time_ssl=[\d\.]+/', 'Extended Performance Data SSL Output OK' );
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"./$plugin --ssl -H www.e-paycobalt.com"
|
||||
);
|
||||
cmp_ok( $res->return_code, "==", 0, "Can read https for www.e-paycobalt.com (uses AES certificate)" );
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H www.mozilla.com -u /firefox -f follow" );
|
||||
$res = NPTest->testCmd( "./$plugin -H www.mozilla.com -u /firefox -f curl" );
|
||||
is( $res->return_code, 0, "Redirection based on location is okay");
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H www.mozilla.com --extended-perfdata" );
|
||||
|
|
|
|||
|
|
@ -88,8 +88,9 @@ $result = NPTest->testCmd(
|
|||
);
|
||||
$_ = $result->perf_output;
|
||||
my ($warn_absth_data, $crit_absth_data, $total_absth_data) = (m/=.[^;]*;(\d+);(\d+);\d+;(\d+)/);
|
||||
is ($warn_absth_data, $total_absth_data - 20, "Wrong warning in perf data using absolute thresholds");
|
||||
is ($crit_absth_data, $total_absth_data - 10, "Wrong critical in perf data using absolute thresholds");
|
||||
# default unit is MiB, but perfdata is always bytes
|
||||
is ($warn_absth_data, $total_absth_data - (20 * (2 ** 20)), "Wrong warning in perf data using absolute thresholds");
|
||||
is ($crit_absth_data, $total_absth_data - (10 * (2 ** 20)), "Wrong critical in perf data using absolute thresholds");
|
||||
|
||||
# Then check percent thresholds.
|
||||
$result = NPTest->testCmd(
|
||||
|
|
@ -119,7 +120,7 @@ like ( $result->only_output, qr/$more_free/, "Have disk name in text");
|
|||
$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -p $more_free -p $less_free" );
|
||||
cmp_ok( $result->return_code, '==', 0, "At least 1 MB available on $more_free and $less_free");
|
||||
$_ = $result->output;
|
||||
my ($free_mb_on_mp1, $free_mb_on_mp2) = (m/(\d+) MB .* (\d+) MB /g);
|
||||
my ($free_mb_on_mp1, $free_mb_on_mp2) = (m/(\d+)MiB .* (\d+)MiB /g);
|
||||
my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use NPTest;
|
|||
|
||||
plan skip_all => "check_dns not compiled" unless (-x "check_dns");
|
||||
|
||||
plan tests => 19;
|
||||
plan tests => 23;
|
||||
|
||||
my $successOutput = '/DNS OK: [\.0-9]+ seconds? response time/';
|
||||
|
||||
|
|
@ -105,3 +105,11 @@ cmp_ok( $res->return_code, '==', 0, "Got expected address");
|
|||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -a $hostname_invalid_cidr -t 5");
|
||||
cmp_ok( $res->return_code, '==', 2, "Got wrong address");
|
||||
like ( $res->output, "/^DNS CRITICAL.*expected '$hostname_invalid_cidr' but got '$hostname_valid_ip'".'$/', "Output OK");
|
||||
|
||||
$res = NPTest->testCmd("./check_dns -H $hostname_valid -n");
|
||||
cmp_ok( $res->return_code, '==', 2, "Found $hostname_valid");
|
||||
like ( $res->output, "/^DNS CRITICAL.*Domain '$hostname_valid' was found by the server:/", "Output OK");
|
||||
|
||||
$res = NPTest->testCmd("./check_dns -H $hostname_invalid -n");
|
||||
cmp_ok( $res->return_code, '==', 0, "Did not find $hostname_invalid");
|
||||
like ( $res->output, $successOutput, "Output OK" );
|
||||
|
|
|
|||
|
|
@ -5,34 +5,30 @@
|
|||
#
|
||||
|
||||
use strict;
|
||||
use Test;
|
||||
use Test::More;
|
||||
use NPTest;
|
||||
|
||||
use vars qw($tests);
|
||||
|
||||
BEGIN {$tests = 4; plan tests => $tests}
|
||||
|
||||
my $successOutput = '/^FPING OK - /';
|
||||
my $failureOutput = '/^FPING CRITICAL - /';
|
||||
|
||||
my $host_responsive = getTestParameter("NP_HOST_RESPONSIVE", "The hostname of system responsive to network requests", "localhost");
|
||||
my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1");
|
||||
my $hostname_invalid = getTestParameter("NP_HOSTNAME_INVALID", "An invalid (not known to DNS) hostname", "nosuchhost");
|
||||
|
||||
my $t;
|
||||
my $res;
|
||||
|
||||
my $fping = qx(which fping 2> /dev/null);
|
||||
chomp($fping);
|
||||
if( ! -x "./check_fping") {
|
||||
$t += skipMissingCmd( "./check_fping", $tests );
|
||||
plan skip_all => "check_fping not found, skipping tests";
|
||||
}
|
||||
elsif ( $> != 0 && (!$fping || ! -u $fping)) {
|
||||
$t += skipMsg( "./check_fping", $tests );
|
||||
elsif ( !$fping || !-x $fping ) {
|
||||
plan skip_all => "fping not found or cannot be executed, skipping tests";
|
||||
} else {
|
||||
$t += checkCmd( "./check_fping $host_responsive", 0, $successOutput );
|
||||
$t += checkCmd( "./check_fping $host_nonresponsive", [ 1, 2 ] );
|
||||
$t += checkCmd( "./check_fping $hostname_invalid", [ 1, 2 ] );
|
||||
}
|
||||
plan tests => 3;
|
||||
$res = NPTest->testCmd( "./check_fping $host_responsive" );
|
||||
cmp_ok( $res->return_code, '==', 0, "Responsive host returns OK");
|
||||
|
||||
exit(0) if defined($Test::Harness::VERSION);
|
||||
exit($tests - $t);
|
||||
$res = NPTest->testCmd( "./check_fping $host_nonresponsive" );
|
||||
cmp_ok( $res->return_code, '==', 2, "Non-Responsive host returns Critical");
|
||||
|
||||
$res = NPTest->testCmd( "./check_fping $hostname_invalid" );
|
||||
cmp_ok( $res->return_code, '==', 3, "Invalid host returns Unknown");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Test::More;
|
|||
use POSIX qw/mktime strftime/;
|
||||
use NPTest;
|
||||
|
||||
plan tests => 50;
|
||||
plan tests => 49;
|
||||
|
||||
my $successOutput = '/OK.*HTTP.*second/';
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ SKIP: {
|
|||
cmp_ok( $res->return_code, "==", 0, "And also when not found");
|
||||
}
|
||||
SKIP: {
|
||||
skip "No internet access", 16 if $internet_access eq "no";
|
||||
skip "No internet access", 23 if $internet_access eq "no";
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"./$plugin --ssl $host_tls_http"
|
||||
|
|
@ -135,7 +135,7 @@ SKIP: {
|
|||
|
||||
# run some certificate checks with faketime
|
||||
SKIP: {
|
||||
skip "No faketime binary found", 12 if !$faketime;
|
||||
skip "No faketime binary found", 7 if !$faketime;
|
||||
$res = NPTest->testCmd("LC_TIME=C TZ=UTC ./$plugin -C 1 $host_tls_http");
|
||||
like($res->output, qr/OK - Certificate '$host_tls_cert' will expire on/, "Catch cert output");
|
||||
is( $res->return_code, 0, "Catch cert output exit code" );
|
||||
|
|
@ -166,12 +166,6 @@ SKIP: {
|
|||
like ( $res->output, '/time_connect=[\d\.]+/', 'Extended Performance Data Output OK' );
|
||||
like ( $res->output, '/time_ssl=[\d\.]+/', 'Extended Performance Data SSL Output OK' );
|
||||
|
||||
$res = NPTest->testCmd(
|
||||
"./$plugin --ssl -H www.e-paycobalt.com"
|
||||
);
|
||||
cmp_ok( $res->return_code, "==", 0, "Can read https for www.e-paycobalt.com (uses AES certificate)" );
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./$plugin -H www.mozilla.com -u /firefox -f follow" );
|
||||
is( $res->return_code, 0, "Redirection based on location is okay");
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@ use NPTest;
|
|||
my $res;
|
||||
|
||||
my $loadValue = "[0-9]+\.?[0-9]+";
|
||||
my $successOutput = "/^OK - load average: $loadValue, $loadValue, $loadValue/";
|
||||
my $failureOutput = "/^CRITICAL - load average: $loadValue, $loadValue, $loadValue/";
|
||||
my $successOutput = "/^LOAD OK - total load average: $loadValue, $loadValue, $loadValue/";
|
||||
my $successScaledOutput = "/^LOAD OK - scaled load average: $loadValue, $loadValue, $loadValue - total load average: $loadValue, $loadValue, $loadValue/";
|
||||
my $failureOutput = "/^LOAD CRITICAL - total load average: $loadValue, $loadValue, $loadValue/";
|
||||
my $failurScaledOutput = "/^LOAD CRITICAL - scaled load average: $loadValue, $loadValue, $loadValue - total load average: $loadValue, $loadValue, $loadValue/";
|
||||
|
||||
plan tests => 11;
|
||||
plan tests => 13;
|
||||
|
||||
$res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" );
|
||||
cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
|
||||
|
|
@ -26,7 +28,7 @@ like( $res->output, $failureOutput, "Output OK");
|
|||
|
||||
$res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" );
|
||||
cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division");
|
||||
like( $res->output, $failureOutput, "Output OK");
|
||||
like( $res->output, $failurScaledOutput, "Output OK");
|
||||
|
||||
$res = NPTest->testCmd( "./check_load -w 100 -c 100,110" );
|
||||
cmp_ok( $res->return_code, 'eq', 0, "Plugin can handle non-triplet-arguments");
|
||||
|
|
@ -34,3 +36,8 @@ like( $res->output, $successOutput, "Output OK");
|
|||
like( $res->perf_output, "/load1=$loadValue;100.000;100.000/", "Test handling of non triplet thresholds (load1)");
|
||||
like( $res->perf_output, "/load5=$loadValue;100.000;110.000/", "Test handling of non triplet thresholds (load5)");
|
||||
like( $res->perf_output, "/load15=$loadValue;100.000;110.000/", "Test handling of non triplet thresholds (load15)");
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100 -r" );
|
||||
cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
|
||||
like( $res->output, $successScaledOutput, "Output OK");
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ use strict;
|
|||
use Test::More tests => 8;
|
||||
use NPTest;
|
||||
|
||||
my $successOutput = '/^SWAP OK - [0-9]+\% free \([0-9]+ MB out of [0-9]+ MB\)/';
|
||||
my $failureOutput = '/^SWAP CRITICAL - [0-9]+\% free \([0-9]+ MB out of [0-9]+ MB\)/';
|
||||
my $warnOutput = '/^SWAP WARNING - [0-9]+\% free \([0-9]+ MB out of [0-9]+ MB\)/';
|
||||
my $successOutput = '/^SWAP OK - [0-9]+\% free \([0-9]+MB out of [0-9]+MB\)/';
|
||||
my $failureOutput = '/^SWAP CRITICAL - [0-9]+\% free \([0-9]+MB out of [0-9]+MB\)/';
|
||||
my $warnOutput = '/^SWAP WARNING - [0-9]+\% free \([0-9]+MB out of [0-9]+MB\)/';
|
||||
|
||||
my $result;
|
||||
|
||||
|
|
|
|||
2
plugins/tests/certs/.gitignore
vendored
Normal file
2
plugins/tests/certs/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/*.csr
|
||||
/*.srl
|
||||
22
plugins/tests/certs/client-cert.pem
Normal file
22
plugins/tests/certs/client-cert.pem
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDtDCCApwCAQIwDQYJKoZIhvcNAQELBQAwgaAxCzAJBgNVBAYTAkRFMRAwDgYD
|
||||
VQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0b3Jp
|
||||
bmcgUGx1Z2luczEkMCIGA1UEAwwbTW9uaXRvcmluZyBQbHVnaW5zIENsaWVudENB
|
||||
MSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMub3JnMB4X
|
||||
DTIxMDIyODIxMDIxMloXDTMwMTEyODIxMDIxMlowgZ4xCzAJBgNVBAYTAkRFMRAw
|
||||
DgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0
|
||||
b3JpbmcgUGx1Z2luczEiMCAGA1UEAwwZTW9uaXRvcmluZyBQbHVnaW5zIENsaWVu
|
||||
dDErMCkGCSqGSIb3DQEJARYcZGV2ZWxAbW9uaXRvcmluZy1wbHVnaW5zLm9yZzCC
|
||||
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM3EiqfFPomm5dZQPGYG5SrF
|
||||
rPvyqseXTzCkwUIUzGf+Sfm3s13zx7e3ije/04yKhTXgK59EQ793q7E2aWhSOz3s
|
||||
hwKKdylFkOIyc5jgbAfF1/pLZMK209rLt/mMRksXCRXYrHdTjRMx1ev4C2407+8Y
|
||||
8qkf77DuYQmUqCQe7DPOvqLeagdw9JcLGmQNTKHg3fl6wyRl5K1Bsy+qXu2XvEjZ
|
||||
0Ng7n8LHjOUkTqUEJndOxci9gL5cHU5ttul/GW34dKOtTuMU/pQX6/ywYusOGVOx
|
||||
RYI76OolRqj5BqbNctDIB/obe2RLo+UVx74/0jAxtH4XS23pYjO7NUpJcytsVG8C
|
||||
AwEAATANBgkqhkiG9w0BAQsFAAOCAQEAYfaY5n4pCq0NWPCdeVVRr4nr+GAfv1TC
|
||||
/PKcGuEoJZKt7TQT+OOA5yeZMZb53OvtA49D1r9aoJzWe946KElWOEBqxDRi5Cdr
|
||||
wkqpwGcPT2RfAqA3/cvQZ1XsquboXrCf7ajdl5OC64bs2jkqCFh9gnxuI140g8Ar
|
||||
Njol8BFxRPaYWOnwuQwmh/2t0FJqr3WSD85HrNqtxUSNGbTdSsvCfgF0v7QVkvLG
|
||||
3/cbx6z5hxzj2JUjhMnCvn+EbasoJt4xyBFvg67Q2229SMwu9YNqS63GVoKUqhCB
|
||||
4Gl5v31qx8dAFKuRvnez3ze/6oohwmakZkst4hcQdgZocHhzesvKlg==
|
||||
-----END CERTIFICATE-----
|
||||
28
plugins/tests/certs/client-key.pem
Normal file
28
plugins/tests/certs/client-key.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNxIqnxT6JpuXW
|
||||
UDxmBuUqxaz78qrHl08wpMFCFMxn/kn5t7Nd88e3t4o3v9OMioU14CufREO/d6ux
|
||||
NmloUjs97IcCincpRZDiMnOY4GwHxdf6S2TCttPay7f5jEZLFwkV2Kx3U40TMdXr
|
||||
+AtuNO/vGPKpH++w7mEJlKgkHuwzzr6i3moHcPSXCxpkDUyh4N35esMkZeStQbMv
|
||||
ql7tl7xI2dDYO5/Cx4zlJE6lBCZ3TsXIvYC+XB1Obbbpfxlt+HSjrU7jFP6UF+v8
|
||||
sGLrDhlTsUWCO+jqJUao+QamzXLQyAf6G3tkS6PlFce+P9IwMbR+F0tt6WIzuzVK
|
||||
SXMrbFRvAgMBAAECggEBALtc2pB3p0E6KpAiEU0pvCRdSO1FgsIpAd+eNadRPur2
|
||||
fi+XWQkUwGeGBaJL1npja3aqP65PP40pj7nWfNaUAgOZyznCEU0QXiPJor6yo0vU
|
||||
l5v+aKpwRao107i0RRF80TYGTMx+1LeEqnCqNOZN56gERHlBbkTiWpOZvBzf1143
|
||||
oegTcyM6+Ee6+FYNhHaDyIYD0md1S2wGR+IBPet6HwWiakLNKahFPa7lOLIKfmmD
|
||||
iTtifcbf4724wSe44a0uTeP4JrquZSeIKakm8MEmffmYqpycnaakYefd0Xc5UEsH
|
||||
+VbhKpOWGY3d8FKHqUsTa+6QyXb2uFPo6A+yWm0pdJECgYEA7Prd5sbWACvXOcHT
|
||||
ONDBAgyfAVDQwOXi3D4dk6D5mg+/jxl5ZQY5slszJrwsLFtoEzXtYpNfTy3cpNOp
|
||||
JLbBDZYnqty+5tD8t3/Zv2IBXCAgvuk5CgfJWP5FNAfiyUEE6Vbp6J/5/vAnODsa
|
||||
fxZryN5UsH0X8ew7AlbfcVNyj4kCgYEA3khetIgn+GR6sv9jFRdCT6aJbp0xMsms
|
||||
6F4v3L5FG4Kp+SwDHL1bVOhieJ5g8odYp9hDbgTEEqbJfNmyCOu9+OQmZ/mztku7
|
||||
6reU8HhYBIvi+hFeJmvqKpdIgU0Zveg4Bst5QordmhPk8AHjBC4xvQ++uh7rwYKd
|
||||
WVsS08bGDjcCgYEAlAuNARUKsASzakOqHv5a9VrJIttH7povBYRQmd+gzxwzgcRa
|
||||
UEB5XvEWnYZE2lkoRYgVCtYiXqa6BsasDmGVbVV25okNQckhd8mJUMR7MQBpNJsi
|
||||
pR+EK/J9bSnYBf52gQdpDYiTdy60ca6KuQZaw5wRsEgV426+1pFK+dM16HECgYBY
|
||||
cTsdYb9lmbUoW201CxgbUQwFsw3MQ2pE2pT4o8wjcg3nUpe6a61XT08+5uV0Gl4w
|
||||
CmBp+gN52Fr7DjNEUWg5C64sWLIkqmWOspTUSU3cITyiex6W8wEtCRyUNfU0Fp2U
|
||||
Nol87HvXvmqtBFMraqXnr8gXjg4H5MxurUoEcWaEaQKBgCT4iIGZwW0Qf2rkFC7B
|
||||
xObzVGefivVVbaf8/c/LRO8TMLdnExkShMOmCzHeHV4mMEZDLbMOusHCI7xm10EX
|
||||
l3L1I1Kyqnhm1RH3e7TVWgkTmIDW3V5Fgrhm1jx5Iz6et4sb4Uh+bZq9tTLyqfZY
|
||||
8s0yJUrfpjRggfk7eUs5s7aY
|
||||
-----END PRIVATE KEY-----
|
||||
25
plugins/tests/certs/clientca-cert.pem
Normal file
25
plugins/tests/certs/clientca-cert.pem
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEIzCCAwugAwIBAgIUL9Jfp5zv5B29NgDsNEFU2OM/UHswDQYJKoZIhvcNAQEL
|
||||
BQAwgaAxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN
|
||||
dW5pY2gxGzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEkMCIGA1UEAwwbTW9u
|
||||
aXRvcmluZyBQbHVnaW5zIENsaWVudENBMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBt
|
||||
b25pdG9yaW5nLXBsdWdpbnMub3JnMB4XDTIxMDIyODIxMDIxMVoXDTMwMTEyODIx
|
||||
MDIxMVowgaAxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQH
|
||||
DAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEkMCIGA1UEAwwb
|
||||
TW9uaXRvcmluZyBQbHVnaW5zIENsaWVudENBMSswKQYJKoZIhvcNAQkBFhxkZXZl
|
||||
bEBtb25pdG9yaW5nLXBsdWdpbnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
|
||||
MIIBCgKCAQEAyxiWsGrsJFHw3VR0pqHviXUfbfKMw8LaCxI5EQZfInsMVkBIGWEW
|
||||
tFW6qDuAOsMdzsrKOnQRNNt852ts/0Uz++z8zysoauAGpc4JnCZuM5A1DU5CFXBx
|
||||
w6Ax+1ft3UsTt8C6kfLfs8mPCbtNVqAHrMrIqDxsNSRRxQSqkzp1vD8rwSKcbB1h
|
||||
u2+lut1bEqMe7dp89jKOtc6G/1tHUFQuLAGFoX/qk9yPscmQNzL6YbLP4m9r/416
|
||||
PsxWsAfyY97hmoYo6mSCue5LmeanOsjf4Kzq90hIJRwrpiUGmxGjW+tPLEhQBZw6
|
||||
C2wHyN74YIJYX2xREz2ijT0mgsqdhO5ZxwIDAQABo1MwUTAdBgNVHQ4EFgQUtsP9
|
||||
Z3fKkhmFp97Kh/cW/UqHMIMwHwYDVR0jBBgwFoAUtsP9Z3fKkhmFp97Kh/cW/UqH
|
||||
MIMwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEApO5o+YECwTEv
|
||||
s+elDJZQ20UYwDSiU9Lpf4EcdnRv6FAb5UlhfRTH3ZdKCc/HX7kcKuy3PsF+b8Pw
|
||||
EusoKito9OlNEOF5HYAI9/J54/qceqn+SC0INsISeE19PvT0dma7lBSj4OvBv0IS
|
||||
GYbdztVaKLWqYgYs0mcEzteUc4MZcy1/C+Ru1i1Kp2s9/vIeAw2PV2+kpWtw88Pb
|
||||
FRJomGngP/hQdwniayCltG/Q1smS4iFEHNI5ayLZj1qJGMHwzqGiRr4KknJKfHzv
|
||||
fl4NQaFyMY31s1FRIS6QVIRFHVzUAlKZTdzwqEJygg3fUS9n9uDBnyDI/sW7DQuj
|
||||
yjSmYRS1hw==
|
||||
-----END CERTIFICATE-----
|
||||
28
plugins/tests/certs/clientca-key.pem
Normal file
28
plugins/tests/certs/clientca-key.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDLGJawauwkUfDd
|
||||
VHSmoe+JdR9t8ozDwtoLEjkRBl8iewxWQEgZYRa0VbqoO4A6wx3Oyso6dBE023zn
|
||||
a2z/RTP77PzPKyhq4AalzgmcJm4zkDUNTkIVcHHDoDH7V+3dSxO3wLqR8t+zyY8J
|
||||
u01WoAesysioPGw1JFHFBKqTOnW8PyvBIpxsHWG7b6W63VsSox7t2nz2Mo61zob/
|
||||
W0dQVC4sAYWhf+qT3I+xyZA3Mvphss/ib2v/jXo+zFawB/Jj3uGahijqZIK57kuZ
|
||||
5qc6yN/grOr3SEglHCumJQabEaNb608sSFAFnDoLbAfI3vhgglhfbFETPaKNPSaC
|
||||
yp2E7lnHAgMBAAECggEAJqAWiJbNMlsjI/Tb+pTxqYLM52wpuVFlhpWApOxBS517
|
||||
SywOikUcvE9RoI0wZfyVvq5yp4tLenID3z9fC21t5Yu8yOm8VhclLINy8G+epc/X
|
||||
RyCLEOjBuiLNXq/qXRvaNChDU16NjPPYcFFe9AqbaxFl+BkFu1Wc94tbpYSIv7Qt
|
||||
L6iBxUTXdgvLM5doa9AazIQzJx+jUsVCgRVQQf3zsLqtp9hH0Pfq+KWFIy5TA+bG
|
||||
0NFmYyQndRjtT0ihWGuNU7D8AXa+z7abzk+HydIlx4D//vGgdNq92QYPdnu2BBya
|
||||
5Fs6LkmkUonX/I8FbkLbRKkQWNPMt+Ks21t3xcVBgQKBgQDn4HuHVCPwxgU6Mv+5
|
||||
0sHJXYBq1fDzrUt0+iTtYkRqViX+9Mp4sUpYgXext/wXFLcKzQQp5B0g1dLYLSRS
|
||||
KwhsdiN0J7ZcoP1GMStw8zsayRTf8C3WRU6aACqyFiylYbyh56XomfYgwhja/7l9
|
||||
pzpVJD9ecG+mLVAyAkJtK2JolQKBgQDgOZfvrQj0L4QG+9E5VmFc3PE+6k3g+zDO
|
||||
MWqTSh0fOHqdTEyet4bMC4DogXGVsvw0/UKwbrGHOk0+ltA5VyKUtK/whSutr/+S
|
||||
nhCHljhV0XUN/I3OFcvezFjM3g0oC4uy1cL30hoM4IfeHM1d3EYse9N1Y/Op+mR6
|
||||
Sx+fEku16wKBgQC0KQ7RjuZ95N2a4pUe5En9EtD8MU4Nhs/iC5k1d+yAUn8jIT9P
|
||||
lzCUo8NEKheMN2Qg2Dor8jlPkdNIc4qM7TKWUxQo49IlFlCzgPCnydRac3HsrMhw
|
||||
e1ke/pIt3FzEArR1d27I0xcRTL3TKm4M2ynPjWJPFj0peHue33KNL/A+IQKBgEpL
|
||||
awd0Sxo1wEZcG9gmwf32C01wbzuTn3lCsHB7Ryj4GtCR3nVclCJ50U24zjzu4Fhi
|
||||
bj1tgA8xhzSs3fOR5phlQkKsrWtQfJtFGm8CnEn7LBDlVMsrN7Dr/qRrEuro4HHy
|
||||
GDbq+8y2fO5glr955BqLMOadprf0imRnDeQ0OLffAoGBAJio+X+xpglgMOC4BeH9
|
||||
9LcYi9nUEw8MDJNGo9/3e0XKA7spd3HShLDvt8YZhFJ2m168qBpGfezuw0+jpWxy
|
||||
PV9q0dokAgDx4pvCzIKaptZ1D30CWXJZHq25VK1tA41PCUIOh8JD5+R0MpxA5rn2
|
||||
DbqL4Vq7K7K0imGENYhHdyM+
|
||||
-----END PRIVATE KEY-----
|
||||
45
plugins/tests/certs/clientchain-cert.pem
Normal file
45
plugins/tests/certs/clientchain-cert.pem
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDuTCCAqECAQQwDQYJKoZIhvcNAQELBQAwgaAxCzAJBgNVBAYTAkRFMRAwDgYD
|
||||
VQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0b3Jp
|
||||
bmcgUGx1Z2luczEkMCIGA1UEAwwbTW9uaXRvcmluZyBQbHVnaW5zIENsaWVudENB
|
||||
MSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMub3JnMB4X
|
||||
DTIxMDIyODIxMDIxMloXDTMwMTEyODIxMDIxMlowgaMxCzAJBgNVBAYTAkRFMRAw
|
||||
DgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0
|
||||
b3JpbmcgUGx1Z2luczEnMCUGA1UEAwweTW9uaXRvcmluZyBQbHVnaW5zIENsaWVu
|
||||
dENoYWluMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMu
|
||||
b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAphvoJBbi/rDvm3+X
|
||||
8xok0sLCJvCRuUpSbU5wEmREQlkoOGmWK4l6r1JyOphKRBo8+n2MxPiCMvAmTrqx
|
||||
VlBmkcmyrwWj392Nga+2SLWTziASk5nFrrhV6U79PkgXnETV2Wk1/FNVIFkB8N+B
|
||||
undsTce8LLiCs7hfA5CK7ctJg8fqsAsmgKBNGzBRWwkbvxZPd6xlY6foIJeD7PQ2
|
||||
elvTmrD6WXSZq7GshFpDEkL3AifqrPMdsTnbBpyGgJ/fBM1b2dx9k53e25mgEQmn
|
||||
iSuYQxn08BsUT0FOvav8ksZLBQz859fuqCtwhikpODO635fD9zK5YkBPlVl+/5xo
|
||||
SvKOywIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBh4zeSKjENfY+VDLtPssaNQz2a
|
||||
R1ioY40lZ0WoihDSrfG32dqTK/R2YsLKBABjJ7uRYS1NIBMrtS2OktK8BWD5IUTF
|
||||
FuGuWilu6IWiTKZrLiZh1rsilNDVqwhorRPxDnbF+qVt9EMIvzKnKdJLGF+CWHN9
|
||||
yYJDeTD8MK5uR7zUJR3PsgW4ve5pFTi7z2UJ/xRvgOds6bmeeQnvaWDEL7k2+hrr
|
||||
0G899A086NL3htzaOnIllg0xo2D1o4ToncAJn+cUQVJmHZSg9HYiD4Lg3z8uXPAl
|
||||
rt/MX7dBm4dnImLXbSg7N3e8FdUtz+kZT9z+beKAeIe9JTbpxtsVUTzUZBBA
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID2jCCAsKgAwIBAgIBAzANBgkqhkiG9w0BAQsFADCBoDELMAkGA1UEBhMCREUx
|
||||
EDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwSTW9u
|
||||
aXRvcmluZyBQbHVnaW5zMSQwIgYDVQQDDBtNb25pdG9yaW5nIFBsdWdpbnMgQ2xp
|
||||
ZW50Q0ExKzApBgkqhkiG9w0BCQEWHGRldmVsQG1vbml0b3JpbmctcGx1Z2lucy5v
|
||||
cmcwHhcNMjEwMjI4MjEwMjEyWhcNMzAxMTI4MjEwMjEyWjCBqjELMAkGA1UEBhMC
|
||||
REUxEDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwS
|
||||
TW9uaXRvcmluZyBQbHVnaW5zMS4wLAYDVQQDDCVNb25pdG9yaW5nIFBsdWdpbnMg
|
||||
Q2xpZW50SW50ZXJtZWRpYXRlMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9y
|
||||
aW5nLXBsdWdpbnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
6rUgOZ9pAOxrcgeeOT3Vmu1YmY2O/C9tXhpKzDzjTaWUzcdDg00KdsjXfgbDzSiV
|
||||
uvMzjX63aKpmqeFG+05D2VzQGit3knqerUgl10FnTotiJGF5CU5/gY1aPxTJ7rj2
|
||||
tD6LINBkJcPTyQ4MoJT19pssvCax9erY1RxoXxLblJ+31C+VvrftdmBP4nVKXK26
|
||||
4anb1oUQhkgpXpJimJBmF+v7NbDs1Wh21Be80KXUh9SKgePhSQblr2QlRcA7jLgJ
|
||||
4PMjZ+KYF+da+4RB7s+DvTXVDMn9AL84E1w5Ut1E8XZV+u4RjWPvNdhK/7GnuxOR
|
||||
C9SdxonqkPQ8hiI7thP9bQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
|
||||
SIb3DQEBCwUAA4IBAQDKQeiDbyr0/7sEhX33MmTDv84GeWgKl9qqHecx+d/0vImb
|
||||
c8XHK0PDa4lVqo/BW4P1hjKzpt2DW35kbOhuqGqM0lasIczef43aCDDEBLwstAe6
|
||||
qMoyWGVGoAQbpwT3li2pMrsIYoPwMvoSGNUphjrkdpviff2POkLly7a5RrR1X3qt
|
||||
Dai6eYbeMCr9NdgW7AZ5++/sKlFoe+zVk/Ed31s4D2lh3awrApZhVgcoquPmEwpt
|
||||
gm+OgRmHw50U4SF3ZaJPwDyLMbx+clH/bgUg0+Za9e53Br1NtGKmw7hh/7CG/hy0
|
||||
yxeLd930pH4vZu7s0XM56N/ckkfUzRkAH8dSmhH4
|
||||
-----END CERTIFICATE-----
|
||||
28
plugins/tests/certs/clientchain-key.pem
Normal file
28
plugins/tests/certs/clientchain-key.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCmG+gkFuL+sO+b
|
||||
f5fzGiTSwsIm8JG5SlJtTnASZERCWSg4aZYriXqvUnI6mEpEGjz6fYzE+IIy8CZO
|
||||
urFWUGaRybKvBaPf3Y2Br7ZItZPOIBKTmcWuuFXpTv0+SBecRNXZaTX8U1UgWQHw
|
||||
34G6d2xNx7wsuIKzuF8DkIrty0mDx+qwCyaAoE0bMFFbCRu/Fk93rGVjp+ggl4Ps
|
||||
9DZ6W9OasPpZdJmrsayEWkMSQvcCJ+qs8x2xOdsGnIaAn98EzVvZ3H2Tnd7bmaAR
|
||||
CaeJK5hDGfTwGxRPQU69q/ySxksFDPzn1+6oK3CGKSk4M7rfl8P3MrliQE+VWX7/
|
||||
nGhK8o7LAgMBAAECggEAAfTqMyKh4eYrrGVAYPi53lG0/8htrwUVG3yFDXJo628p
|
||||
biCwSCsCavZJqi8JEOxOM5UvB1L2FauGh/7i/+VKkAUUOcOTPpvZguGTACBDcXYn
|
||||
Qd3Z2kkJmgn4Kbenr4uQCVOX8zT4F710rGW1nYCyoefsa4pw37UYSW52dH6kiwzW
|
||||
9k4X251nDMl/twBdOcjZbL768IEa5l4nySLpUNwfrVbSb1NzBoH0dVioh3DTLjt6
|
||||
gaShW4eIpaKczht1U97n6/7WNLl6vHX/mR99k/py8OhzhR1ccYpd2IfSHAWyQT0M
|
||||
K8BoNnkjICrr9oc0FCr2BVJa3IzKHlhukF4GTZiGYQKBgQDWCHTwAmwL4FFEBVhj
|
||||
pZne/sjaZc8TzPPxA8SkmxwDIZrM7tSu7qUuYgWTM432jZbLILWTyGfXf2PpqyF6
|
||||
wOpoBJj1ETkre8ZfRmYvsSvS5vtjF3Drszol+XvZnOclfB5VG3m5P2vYkQ8wI9OE
|
||||
Y5jUBgDj0RsCNd8QnrC1u54U/wKBgQDGrd5y8S9kUT0P0lkZit7bYjSPJExtClXt
|
||||
V7YNTjELrVCdc0jranxBWaub8NP3e6TGTi9HiQWvk2eOAS2qyccqlK4+YAK5XO3D
|
||||
EpFUNNcClq8CErw2POuCAKajrPuSp6vd6q8h4lTzDExVctQS4R9fRKKFBKkPUV5G
|
||||
UiKFllnKNQKBgQDBGIQXfLfpxwjKK2BhFihKDOc8UhmOrZtvV4zzTJTrJkg4l0f+
|
||||
QoN34ytQcHSleXwP6oSmvWkh/GYxjBj6XE2eZndwsYc4ecSwdB0A7gCxl345Gg7g
|
||||
NqRBWmGoJGxNXzsmYVFiFZvAmK5xKgFMMWbR8lCfOCn7xopmviSC8K9gFQKBgFRb
|
||||
KmH/SbH8VELNews/TVQ0pEBKlzCM/OLjJOcNVgGxOtM/Say677sHibeST0168AFK
|
||||
3QQwh3t+yK8gjPVA6xGHQ1w0g7OUY1c6IP5x2QC+XdwxfDxDLXNrN1WzcrVX/78f
|
||||
j/CBGrR/ekGlmanSb/GRQLfdvLJGSBLveLzjk4gpAoGBANN9RUm/aRz3dDBWex46
|
||||
kJ15xKJfLZiUeyDvY5+5d7YF4/tw5LU4XmKQNhiojHecykrTzPUMaGyMrbMPNn32
|
||||
WFW9CKMjuBEwWpMDJJb1/5NLEvpwu++sr7bUPZkQl76ot6OqgNHodbP8ATqrNr80
|
||||
5b8FrEN1LyfkTbabxNyAWcA0
|
||||
-----END PRIVATE KEY-----
|
||||
23
plugins/tests/certs/clientintermediate-cert.pem
Normal file
23
plugins/tests/certs/clientintermediate-cert.pem
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIID2jCCAsKgAwIBAgIBAzANBgkqhkiG9w0BAQsFADCBoDELMAkGA1UEBhMCREUx
|
||||
EDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwSTW9u
|
||||
aXRvcmluZyBQbHVnaW5zMSQwIgYDVQQDDBtNb25pdG9yaW5nIFBsdWdpbnMgQ2xp
|
||||
ZW50Q0ExKzApBgkqhkiG9w0BCQEWHGRldmVsQG1vbml0b3JpbmctcGx1Z2lucy5v
|
||||
cmcwHhcNMjEwMjI4MjEwMjEyWhcNMzAxMTI4MjEwMjEyWjCBqjELMAkGA1UEBhMC
|
||||
REUxEDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwS
|
||||
TW9uaXRvcmluZyBQbHVnaW5zMS4wLAYDVQQDDCVNb25pdG9yaW5nIFBsdWdpbnMg
|
||||
Q2xpZW50SW50ZXJtZWRpYXRlMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9y
|
||||
aW5nLXBsdWdpbnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
6rUgOZ9pAOxrcgeeOT3Vmu1YmY2O/C9tXhpKzDzjTaWUzcdDg00KdsjXfgbDzSiV
|
||||
uvMzjX63aKpmqeFG+05D2VzQGit3knqerUgl10FnTotiJGF5CU5/gY1aPxTJ7rj2
|
||||
tD6LINBkJcPTyQ4MoJT19pssvCax9erY1RxoXxLblJ+31C+VvrftdmBP4nVKXK26
|
||||
4anb1oUQhkgpXpJimJBmF+v7NbDs1Wh21Be80KXUh9SKgePhSQblr2QlRcA7jLgJ
|
||||
4PMjZ+KYF+da+4RB7s+DvTXVDMn9AL84E1w5Ut1E8XZV+u4RjWPvNdhK/7GnuxOR
|
||||
C9SdxonqkPQ8hiI7thP9bQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG
|
||||
SIb3DQEBCwUAA4IBAQDKQeiDbyr0/7sEhX33MmTDv84GeWgKl9qqHecx+d/0vImb
|
||||
c8XHK0PDa4lVqo/BW4P1hjKzpt2DW35kbOhuqGqM0lasIczef43aCDDEBLwstAe6
|
||||
qMoyWGVGoAQbpwT3li2pMrsIYoPwMvoSGNUphjrkdpviff2POkLly7a5RrR1X3qt
|
||||
Dai6eYbeMCr9NdgW7AZ5++/sKlFoe+zVk/Ed31s4D2lh3awrApZhVgcoquPmEwpt
|
||||
gm+OgRmHw50U4SF3ZaJPwDyLMbx+clH/bgUg0+Za9e53Br1NtGKmw7hh/7CG/hy0
|
||||
yxeLd930pH4vZu7s0XM56N/ckkfUzRkAH8dSmhH4
|
||||
-----END CERTIFICATE-----
|
||||
28
plugins/tests/certs/clientintermediate-key.pem
Normal file
28
plugins/tests/certs/clientintermediate-key.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDqtSA5n2kA7Gty
|
||||
B545PdWa7ViZjY78L21eGkrMPONNpZTNx0ODTQp2yNd+BsPNKJW68zONfrdoqmap
|
||||
4Ub7TkPZXNAaK3eSep6tSCXXQWdOi2IkYXkJTn+BjVo/FMnuuPa0Posg0GQlw9PJ
|
||||
DgyglPX2myy8JrH16tjVHGhfEtuUn7fUL5W+t+12YE/idUpcrbrhqdvWhRCGSCle
|
||||
kmKYkGYX6/s1sOzVaHbUF7zQpdSH1IqB4+FJBuWvZCVFwDuMuAng8yNn4pgX51r7
|
||||
hEHuz4O9NdUMyf0AvzgTXDlS3UTxdlX67hGNY+812Er/sae7E5EL1J3GieqQ9DyG
|
||||
Iju2E/1tAgMBAAECggEACyYJXtNUoIeaXvM/r8ZhJBfMEpcnyJDUKBklnmfyABky
|
||||
ZUfmzBDXw2as3b6ihFc+LYAp3bm8KouVjtI1lfBUxrli5StVZa7PZLm9mmjv6Eo0
|
||||
ojfDEQ8afWPieoaZRO6iQVOLNkbPyv9vSuiQ7vvEZy9dw54u69h47j6IMqPprDiG
|
||||
ropUNeGAvTnh1Vf9/8aCHEvHUNHcc4zjzGiQ+E60JgnbpGVeJKoeiMgrQE0yjweo
|
||||
KyKA47Y6vqP6+AxAaPplXtmrx2UCbMjktHNvLvg42+2UlLS5roiwmJYEN9c6iT6t
|
||||
y82MJrjEFGZyLG2u6ZQANSJiIWaCnOyT1o2deJ8NoQKBgQD7UxivDTuljQD0so+E
|
||||
JX9UaFZ9PgS+8LC9v56PciL4XQ7bcCVP5vVgZZPABiQ9i989Wq7qI042Jrfu5qtE
|
||||
SthlOAu80GvAQV+Oujwo7ZzM6ciQtjMsj63r2uayWXnmQ07QcIg7x7y161Pt9Bqr
|
||||
LIDrqHziIj/lzT7+6QKZaQwFaQKBgQDvEuSC14CBlMhy2jji71kB/3Ya3c+8dP+A
|
||||
kQZL9wEWK4a4dm8IaTS8jl1/luhQUzFRMyh2rWaTqqigSe3dvs5DRblhE5NPwTSI
|
||||
9TO7t1EnzjW3R8LxZZsySyiSFnZ/8mR0empxq0Mov37OdXBj0tXuuzREf/hwijWh
|
||||
WuLxJUSjZQKBgAIDZ2Y3l+u6lnBfYdDwL/XwJAk6zvTsnq3WdCG4C1mr/St62YGr
|
||||
WvnbtnRKWE356d7m9BHCGKVMaBrM1EBmzRb6fPWVQde3blmJWmQFi0UE9mtaWkyY
|
||||
Fg+WoFR7bQOQNHhs/lpkPjnC2dhFJVWLtLiuj9mL5rEjlMab/T5XXhZJAoGBAMEP
|
||||
FZ8fXbPGrTQqSwPfWpZFcF9zvbynEmkFM/uGRMddcNZnNXSqWJ7nrFNLTuEGvW2g
|
||||
DU4A6zPV/YQrDz4hRjmHBZOCFlSyZbUvpY4yFAQ7/p66AY+kiHZNwT5vi1P5Luvs
|
||||
qyaNsZcnRMR+i7rg2EeHv0aNvNdMlNBvL5KikNINAoGAU2P/phdwJOUcqgHavQcQ
|
||||
ureTEyZ5i5AeNomNeHSj0slG24V9nxOqEL7D00JKln7oAPovYBUWocEnF39uBJe0
|
||||
p0Hy7fCCK6EI8/0QyiQuuZmJfDEEvjQqE6irONNH63r2UwDEpDNGFvGsZNuWHLZc
|
||||
SXADu5oSNu6o6IydiyOx528=
|
||||
-----END PRIVATE KEY-----
|
||||
|
|
@ -1,24 +1,24 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEETCCAvmgAwIBAgIUFDsP6WnV/uqeQMpD/DYSqouE13kwDQYJKoZIhvcNAQEL
|
||||
MIIEETCCAvmgAwIBAgIUVDKkhcUoYFnjYCw12tScPIqQzqIwDQYJKoZIhvcNAQEL
|
||||
BQAwgZcxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN
|
||||
dW5pY2gxGzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEbMBkGA1UEAwwSTW9u
|
||||
aXRvcmluZyBQbHVnaW5zMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5n
|
||||
LXBsdWdpbnMub3JnMB4XDTA4MDEwMTExMDAyNloXDTA4MDEwMjExMDAyNlowgZcx
|
||||
LXBsdWdpbnMub3JnMB4XDTA4MDEwMTEyMDAwMFoXDTA4MDEwMjEyMDAwMFowgZcx
|
||||
CzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gx
|
||||
GzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEbMBkGA1UEAwwSTW9uaXRvcmlu
|
||||
ZyBQbHVnaW5zMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdp
|
||||
bnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyeHKwKFjJWUX
|
||||
YHKsisypUf9dHlIPQAISyGP1BX6UL26ZLvE6kKbx3LFQ9W2POGoQWlzFiB1soGeV
|
||||
WDd0U0JtWdCKmOXWdcXpupQlTSUtRCMDQkfqLN8GR5TBTd73rezp5mz08nMfLwu0
|
||||
p5VQ191Ui8JHFgrAOalAn8Uw5De8vj4VmTXmU5NJ2UFoC0ddU/Th/lwRCayHc1cn
|
||||
MVq2F7c/uhMUUQYNBmJy0pxoHawp+j9NKl/xIYsjgQNgahQyNuswuGHjaEwhPu+7
|
||||
G03XsW4ehu+H1898M/MkSln6LQAU1syoJ8ypPM8tV+zgx4uwj7udnZ2hceN95uW7
|
||||
0PWg5DQyUwIDAQABo1MwUTAdBgNVHQ4EFgQUt9ps3KJ1XiMuy/ijFBjMzf6jgwkw
|
||||
HwYDVR0jBBgwFoAUt9ps3KJ1XiMuy/ijFBjMzf6jgwkwDwYDVR0TAQH/BAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQsFAAOCAQEAVPBZwMHbrnHFbmhbcPuvYd5cxk0uSVNAUzsl
|
||||
2biCq5P+ZHo10VHGygXtdV4utqk/IrAt2u5qSxycWPStCtAgTd3Q8ncfjOkaHM4z
|
||||
2bxTkhLyQeU8NWPuDBqDszo2GOaFTv+lm36LEKiAfqB1tjQVePSkycdrWIhkamBV
|
||||
EgMe6uHLdU7QQk1ajQfrBdakN1beqki/dKieA6gm+XF/QS4SSYINmsHB/2X5cT9U
|
||||
b/KMB8xurCnuJQuk1P4VsSkJCOSeHjWZgK9pKNdsIJZr4wDVfhjQgU0XT6xakSf7
|
||||
eCaHtO0VKsbLZoiTmpxidjsdYiXyeKYIQNtUpTjyJ5V/cZsq9w==
|
||||
bnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwg1dmGT3rVqM
|
||||
beVWWLy8EAiq9re07AF8sTERy9oIYF5EUq9f0xO53mwwqIWV77O9mF99/kDFGQuQ
|
||||
NOnICMSHXNtMXEXzfBaMighw0uyCh1o/VCejNQ5x/HU8aLh930g5DIcOJQ3fZ4v9
|
||||
8kBaie7+aPgRMVDM1vIrILfedq9Kt56zvPizkXhDeqxjKyIZdrdoBlX5zAfftWtY
|
||||
HpQ+lkThSSXqQnchN6S2JFejmRtsNnceDVOBBdvlzmH0NlfwjynLK3/EJooTsINy
|
||||
i9dXD8/Oe8r+UA+nokWvnWC2IAUJjpxW+XAyTG/NofGwX+PwquT0YD5cSlODIwZA
|
||||
WAimygWLqQIDAQABo1MwUTAdBgNVHQ4EFgQUsKyJAwR9OXWEcSZMQz73GfpxCJIw
|
||||
HwYDVR0jBBgwFoAUsKyJAwR9OXWEcSZMQz73GfpxCJIwDwYDVR0TAQH/BAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQsFAAOCAQEAYKFGX7J3Fc/T9s278w61E2dSsY4DS/mjSDik
|
||||
fMWvod6eKw0fE3wJOnkWxjEH3VywTY6CmHd/oiJOaD8lr/Vk+BJfYNVBaVNmguyg
|
||||
4LXoWz9Benx0bAIeuDbNAhOvA4H4aIz8UrD9lKFvKdRp42gPMLtMEbzbLcBdT95D
|
||||
6BX7EhYm7vTnpitLPgFxVCsJ1JFqv2AQfUm+IkqQkezPs5x0tWLyrvCDNRGJ0kfv
|
||||
UuowpUZXDOh3k1vB+xaSOFviieLaCW8TSdd5FZgI2HQj4e6vCKsMGuKKZXrMUTI/
|
||||
qtrFlUfsOuwourfC5LMHtCyYo5B3uvAWT1eTXxhrGqyleSlxJQ==
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJ4crAoWMlZRdg
|
||||
cqyKzKlR/10eUg9AAhLIY/UFfpQvbpku8TqQpvHcsVD1bY84ahBaXMWIHWygZ5VY
|
||||
N3RTQm1Z0IqY5dZ1xem6lCVNJS1EIwNCR+os3wZHlMFN3vet7OnmbPTycx8vC7Sn
|
||||
lVDX3VSLwkcWCsA5qUCfxTDkN7y+PhWZNeZTk0nZQWgLR11T9OH+XBEJrIdzVycx
|
||||
WrYXtz+6ExRRBg0GYnLSnGgdrCn6P00qX/EhiyOBA2BqFDI26zC4YeNoTCE+77sb
|
||||
Tdexbh6G74fXz3wz8yRKWfotABTWzKgnzKk8zy1X7ODHi7CPu52dnaFx433m5bvQ
|
||||
9aDkNDJTAgMBAAECggEACrLFfNnQmD24NGs/S4e2/VpsA9xTZI/3kNkDNgxULANP
|
||||
aNZtxRajwI9A/BCXQ2UTgsZhzWnJxOJYXrlpl7PweY78mUesysb3MOUC6QisUm0M
|
||||
kimfdktHWOnAKLFFLNleN9DUVjjVkTeslijqhNX80f80py1grG2UuCLKCX4OqYIm
|
||||
qACE8TMmSZLz42AO96TndNtKplQ8LuGLEmByW95wEfhx3Gm4ckkL7qII/U3DnQXr
|
||||
0T+3xLaj+eNJzYDpIFZiw4sNzOuAyCz+4Cc4sPDuMnzquXF+enpkemoycC1RmEpG
|
||||
KIDTwmFsc8TrbGV0qifC6fsCrDivdYLqL7R/q3IBQQKBgQDmfvO3VYTEKY8NA+AT
|
||||
5s6+7NTxRsXxJUCEhCNBWimSH3EzmBAvrodLY6A0oYg8i81bgNX1I9GPVXJZ/QA7
|
||||
ukd84HUIQoGS5Usmo4rp+kz4P6KkLXDemZtWPU5GXxicfajHRQlkbW6St6SpV7IS
|
||||
ibJcDADeoiaPL1xvue1ToP/LoQKBgQDgOFHjYpep00gabvjXfYW7vhrg1vVwaKUM
|
||||
rf0+UW8Exk4nbBw0eEC2YjxIwzdktlkdbzGaXYULnhg8GnfxYesMOpCLPw1JdB8o
|
||||
ixETAFpW5bKrUsjEFRUGhzWnsCSFIQ4smpmtGLTxOQ8AkoDdORY5Z+Wv7JtFF6Do
|
||||
PSoblckZcwKBgB3TD3YJesRnHDty5OuuUdIikuslXTd2uoJrFqS+JeLibqNeabnB
|
||||
u3/lxDULMbWj4U6VvRmbKOKDC+jY887Gq7lc0cff0yROxwqY3sCnwo3crg7QUmp7
|
||||
Nb5S8G3qoCSfndcq96wm/Me/O28uCbycVJfUdchY8uRUHIHYbP0FOBQBAoGBAMgh
|
||||
fPX4imaKr1DovDObVkK87EDDnU84GBm5MtDs3qrkVd3aIVK0Aw7HoAdSN58tI12i
|
||||
YiPmVVqJQhhjh6tsOuAvZdTj8ngdrbICbrsHFZt6an+A5LIgHyQ0iy+hiPdLCdvG
|
||||
ImTeKKMmyr04Bs1upueWVO0xw2VoMbcY4Py+NUEBAoGASQqedfCSKGLT+5lLZrhP
|
||||
CbFVMmswEPjBcRb1trcuA09vfExn9FfUNFnnw3i9miprED5kufvAjb+6nduXizKg
|
||||
7HQYHCwVvakgtXgbiDMaNgYZcjWm+MdnfiwLJjJTO3DfI1JF2PJ8y9R95DPlAkDm
|
||||
xH3OV8KV4UiTEVxS7ksmGzY=
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCDV2YZPetWoxt
|
||||
5VZYvLwQCKr2t7TsAXyxMRHL2ghgXkRSr1/TE7nebDCohZXvs72YX33+QMUZC5A0
|
||||
6cgIxIdc20xcRfN8FoyKCHDS7IKHWj9UJ6M1DnH8dTxouH3fSDkMhw4lDd9ni/3y
|
||||
QFqJ7v5o+BExUMzW8isgt952r0q3nrO8+LOReEN6rGMrIhl2t2gGVfnMB9+1a1ge
|
||||
lD6WROFJJepCdyE3pLYkV6OZG2w2dx4NU4EF2+XOYfQ2V/CPKcsrf8QmihOwg3KL
|
||||
11cPz857yv5QD6eiRa+dYLYgBQmOnFb5cDJMb82h8bBf4/Cq5PRgPlxKU4MjBkBY
|
||||
CKbKBYupAgMBAAECggEBAJ2mdCKJ7LoWdT4W8pZ3BqZUFGkKCF8wOhhOUDH3+ZQp
|
||||
IYK3XbdDMF7mMIXIuW4a7W4sLlTwU/Ar98U1JMESwRIMS7YvUke+ngDKKLcDVGwY
|
||||
Qpjg9vP0v2Al8qT1NbW/nDF0S2aJJbWfAvnblHK5ClFHL9iL107NQYJ8PqzXbnFL
|
||||
gCQRiZxVHlrbn/73ZUMHPGEoU0711U9hSjrsqrRuSAMC+V38s4HxOomZWutlVAHF
|
||||
HwClNZBqRO+a2njPyUuV9DM/rl5Tm9IQ89iFo3/QEORICK77HjJYhi+UzdfI5F35
|
||||
UntRJt+WLaiAP+K6Vt6oxHSm58qXnOkeLzaAunTTie0CgYEA6OLYfme8xe5zYXWX
|
||||
rqmKNYdcVfMkvL+vUfVT475o/piRtE54JC1LYWEFAN8paxEWHD5HZMy0+ONNXfGm
|
||||
zyNNTN/Lagz4WcpdFzKQmhfdro7DzRiDfdvwSLmaZDyE41PPPVVvfrI9IeDiUNY4
|
||||
nWLSb3sWo96Iuns+RoMqeA9wkqsCgYEA1U/UqeVQVTPlrWyiB2VXoI1xvFCCJTf8
|
||||
4NC0gcisxLRrtINk0BwrUJrRy0x1OLpJWiKwUl/W1GgvPPfhbYcUOb669JNtTIjY
|
||||
FeIZblCTjz9GzKKmXeDciXvccyEdCJVUlPO3/e2JiJ4mCDjULprifq0a2gcQevFS
|
||||
PfqVULhBOvsCgYB5KfS7J1vGmv36ucSWAe0/VlKLATqe3RfpCzt/JQTZWSWNaroF
|
||||
EG/ElUaWIoUZCEW5oglg/0Q0rYYGF4DTCingkhrx7ReVF70BIbSsBzi15d8nKNbY
|
||||
t4I3RCF4fyggYe1TmsysXS2DH85/gkToVY7oo2CvF0uJwi8vXnTNDDNkiwKBgHKs
|
||||
mAc94BHt9GtnGzQepx0I7TvvjAe2MZwqlt+uojKdS8mfWXMHscGDeYVxdRMqEoUC
|
||||
YQfnvfYyjDKaj/XxyE3C237gQsICTyh0hHdpmepIeidIyWdumyDOFZVPF+ylWvM4
|
||||
kpFQQb/QRWHmKyti2KCBLw5G/fUaBryLGfprE6ZBAoGBANy5rr41A679UQZ0abev
|
||||
bOZb7YWOHYp/wReJaQbvLAyR30os3aEY/0ht9S+OWdrgGMezPKvsx2Sqr/CwoFXI
|
||||
esiklpknr11maEPxnQJYi4FYiXS1a3NCg7yBvKzFEgx2XnMAC3s6zhuZXaFq4zNu
|
||||
pm5Btrq/NZqtVXovS+UhGLvJ
|
||||
-----END PRIVATE KEY-----
|
||||
|
|
|
|||
2
plugins/tests/certs/ext.cnf
Normal file
2
plugins/tests/certs/ext.cnf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[ client_ca ]
|
||||
basicConstraints = critical, CA:true
|
||||
63
plugins/tests/certs/generate-certs.sh
Executable file
63
plugins/tests/certs/generate-certs.sh
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# Recreates the https server certificates
|
||||
#
|
||||
# Set the GEN_EXPIRED environment variable to also regenerate
|
||||
# the expired certificate.
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
trap 'rm -f *.csr; rm -f clientca-cert.srl' EXIT
|
||||
|
||||
subj() {
|
||||
c="DE"
|
||||
st="Bavaria"
|
||||
l="Munich"
|
||||
o="Monitoring Plugins"
|
||||
cn="Monitoring Plugins"
|
||||
emailAddress="devel@monitoring-plugins.org"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
# Add to CN
|
||||
cn="$cn $1"
|
||||
fi
|
||||
|
||||
printf "/C=%s/ST=%s/L=%s/O=%s/CN=%s/emailAddress=%s" \
|
||||
"$c" "$st" "$l" "$o" "$cn" "$emailAddress"
|
||||
}
|
||||
|
||||
# server
|
||||
openssl req -new -x509 -days 3560 -nodes \
|
||||
-keyout server-key.pem -out server-cert.pem \
|
||||
-subj "$(subj)"
|
||||
# server, expired
|
||||
# there is generally no need to regenerate this, as it will stay epxired
|
||||
[ -n "$GEN_EXPIRED" ] && TZ=UTC faketime -f '2008-01-01 12:00:00' \
|
||||
openssl req -new -x509 -days 1 -nodes \
|
||||
-keyout expired-key.pem -out expired-cert.pem \
|
||||
-subj "$(subj)"
|
||||
|
||||
# client, ca
|
||||
openssl req -new -x509 -days 3560 -nodes \
|
||||
-keyout clientca-key.pem -out clientca-cert.pem \
|
||||
-subj "$(subj ClientCA)"
|
||||
echo "01" >clientca-cert.srl
|
||||
# client
|
||||
openssl req -new -nodes \
|
||||
-keyout client-key.pem -out client-cert.csr \
|
||||
-subj "$(subj Client)"
|
||||
openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \
|
||||
-in client-cert.csr -out client-cert.pem
|
||||
# client, intermediate
|
||||
openssl req -new -nodes \
|
||||
-keyout clientintermediate-key.pem -out clientintermediate-cert.csr \
|
||||
-subj "$(subj ClientIntermediate)"
|
||||
openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \
|
||||
-extfile ext.cnf -extensions client_ca \
|
||||
-in clientintermediate-cert.csr -out clientintermediate-cert.pem
|
||||
# client, chain
|
||||
openssl req -new -nodes \
|
||||
-keyout clientchain-key.pem -out clientchain-cert.csr \
|
||||
-subj "$(subj ClientChain)"
|
||||
openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \
|
||||
-in clientchain-cert.csr -out clientchain-cert.pem
|
||||
cat clientintermediate-cert.pem >>clientchain-cert.pem
|
||||
|
|
@ -1,24 +1,24 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEBjCCAu6gAwIBAgIJANbQ5QQrKhUGMA0GCSqGSIb3DQEBCwUAMIGXMQswCQYD
|
||||
VQQGEwJERTEQMA4GA1UECAwHQmF2YXJpYTEPMA0GA1UEBwwGTXVuaWNoMRswGQYD
|
||||
VQQKDBJNb25pdG9yaW5nIFBsdWdpbnMxGzAZBgNVBAMMEk1vbml0b3JpbmcgUGx1
|
||||
Z2luczErMCkGCSqGSIb3DQEJARYcZGV2ZWxAbW9uaXRvcmluZy1wbHVnaW5zLm9y
|
||||
ZzAeFw0xOTAyMTkxNTMxNDRaFw0yOTAyMTYxNTMxNDRaMIGXMQswCQYDVQQGEwJE
|
||||
RTEQMA4GA1UECAwHQmF2YXJpYTEPMA0GA1UEBwwGTXVuaWNoMRswGQYDVQQKDBJN
|
||||
b25pdG9yaW5nIFBsdWdpbnMxGzAZBgNVBAMMEk1vbml0b3JpbmcgUGx1Z2luczEr
|
||||
MCkGCSqGSIb3DQEJARYcZGV2ZWxAbW9uaXRvcmluZy1wbHVnaW5zLm9yZzCCASIw
|
||||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKgV2yp8pQvJuN+aJGdAe6Hd0tja
|
||||
uteCPcNIcM92WLOF69TLTSYon1XDon4tHTh4Z5d4lD8bfsGzFVBmDSgWidhAUf+v
|
||||
EqEXwbp293ej/Frc0pXCvmrz6kI1tWrLtQhL/VdbxFYxhV7JjKb+PY3SxGFpSLPe
|
||||
PQ/5SwVndv7rZIwcjseL22K5Uy2TIrkgzzm2pRs/IvoxRybYr/+LGoHyrtJC6AO8
|
||||
ylp8A/etL0gwtUvRnrnZeTQ2pA1uZ5QN3anTL8JP/ZRZYNegIkaawqMtTKbhM6pi
|
||||
u3/4a3Uppvt0y7vmGfQlYejxCpICnMrvHMpw8L58zv/98AbCGjDU3UwCt6MCAwEA
|
||||
AaNTMFEwHQYDVR0OBBYEFG/UH6nGYPlVcM75UXzXBF5GZyrcMB8GA1UdIwQYMBaA
|
||||
FG/UH6nGYPlVcM75UXzXBF5GZyrcMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN
|
||||
AQELBQADggEBAGwitJPOnlIKLndNf+iCLMIs0dxsl8kAaejFcjoT0n4ja7Y6Zrqz
|
||||
VSIidzz9vQWvy24xKJpAOdj/iLRHCUOG+Pf5fA6+/FiuqXr6gE2/lm0eC58BNONr
|
||||
E5OzjQ/VoQ8RX4hDntgu6FYbaVa/vhwn16igt9qmdNGGZXf2/+DM3JADwyaA4EK8
|
||||
vm7KdofX9zkxXecHPNvf3jiVLPiDDt6tkGpHPEsyP/yc+RUdltUeZvHfliV0cCuC
|
||||
jJX+Fm9ysjSpHIFFr+jUMuMHibWoOD8iy3eYxfCDoWsH488pCbj8MNuAq6vd6DBk
|
||||
bOZxDz43vjWuYMkwXJTxJQh7Pne6kK0vE1g=
|
||||
MIIEETCCAvmgAwIBAgIUZwOhY4myaCUaPek3NM+MxbLG9vwwDQYJKoZIhvcNAQEL
|
||||
BQAwgZcxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN
|
||||
dW5pY2gxGzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEbMBkGA1UEAwwSTW9u
|
||||
aXRvcmluZyBQbHVnaW5zMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5n
|
||||
LXBsdWdpbnMub3JnMB4XDTIxMDIyODIxMDIxMVoXDTMwMTEyODIxMDIxMVowgZcx
|
||||
CzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gx
|
||||
GzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEbMBkGA1UEAwwSTW9uaXRvcmlu
|
||||
ZyBQbHVnaW5zMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdp
|
||||
bnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2/3eBA4WG6xz
|
||||
LfM6xcWywxThb1Rp7XAW3ewQd9/PdoWXEe8BJWlLfyYi1drLMcsDywhLkKmW4Vp9
|
||||
1R4PAkiljjrB/ZaUMDLJ1ri3dwX4RvXG7crsU3QWFWCBOrf5V2FTRQ2m/H/KyB/6
|
||||
rVZANsU47HqTFSPiUm2j7P3wx/wtHeYC+qmNG7zZTjAYPYxfKiod0lytTSmb+h54
|
||||
6lxn3+VPEXZAQZlLvPnm/58JnXGrUv7B2yocf5MhKkLJOrGxH2hfwKISfaj2gpOV
|
||||
m4PUVYiDzCSpq1fPvwbUxIvdO27xprx+mrGOFM6f2UCEOc35w8FSmYiR2yQTnEJK
|
||||
pbSQD6t1jQIDAQABo1MwUTAdBgNVHQ4EFgQUMeYgglT2aWDlF8KEeF2376AlTGYw
|
||||
HwYDVR0jBBgwFoAUMeYgglT2aWDlF8KEeF2376AlTGYwDwYDVR0TAQH/BAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQsFAAOCAQEAFcEg83rTJdgkp7JLYqK0j8JogSHNlDYchr/r
|
||||
VxKBgQwfnjSp5A8d5+uTQ9s3QDabw8v7YeSrzYXbbjuWZ61mnl84tzOQ8LMeESnC
|
||||
CBXRCxB8Ow22WsVTVJq279SGYT+cZrdsmqGVWDi1A0C5kH+XTLAioG5CZmmxemD/
|
||||
S92ZoRxGyYfg33r+3X6EMcEYtHKGxCUa3EPcPOL4dq2F3nOnyjiWPZm3786H3NY2
|
||||
nsYwrEhAdUFtbYSsV5O0c/Zlc33fmTfh654ab35io1DtwmFo7q8J532dUE007EN0
|
||||
mIQmhdrjNJJHIftgSt0fuN5m48oLOnX7vvkz+X0WLWfVTtMr0w==
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCoFdsqfKULybjf
|
||||
miRnQHuh3dLY2rrXgj3DSHDPdlizhevUy00mKJ9Vw6J+LR04eGeXeJQ/G37BsxVQ
|
||||
Zg0oFonYQFH/rxKhF8G6dvd3o/xa3NKVwr5q8+pCNbVqy7UIS/1XW8RWMYVeyYym
|
||||
/j2N0sRhaUiz3j0P+UsFZ3b+62SMHI7Hi9tiuVMtkyK5IM85tqUbPyL6MUcm2K//
|
||||
ixqB8q7SQugDvMpafAP3rS9IMLVL0Z652Xk0NqQNbmeUDd2p0y/CT/2UWWDXoCJG
|
||||
msKjLUym4TOqYrt/+Gt1Kab7dMu75hn0JWHo8QqSApzK7xzKcPC+fM7//fAGwhow
|
||||
1N1MArejAgMBAAECggEANuvdTwanTzC8jaNqHaq+OuemS2E9B8nwsGxtH/zFgvNR
|
||||
WZiMPtmrJnTkFWJcV+VPw/iMSAqN4nDHmBugVOb4Z4asxGTKK4T9shXJSnh0rqPU
|
||||
00ZsvbmxY6z0+E5TesCJqQ+9GYTY1V357V7JchvaOxIRxWPqg9urHbru8OCtW/I5
|
||||
Fh5HPUZlgCvlMpjlhyjydIf/oXyVA3RNsXlwe8+2cKuGIrjEzm2j9o3VF0sctTX0
|
||||
ItP8A9qDmDQN7GIWX0MW6gncojpS1omC2wcFsdjj/xfPyiDal1X4aq/2YqG8351c
|
||||
YlM/+6Va0u9WWE/i64gASTAVqpMV4Yg8y0gGycuA0QKBgQDbgI2QeLd3FvMcURiU
|
||||
l3w9qJgw/Jp3jaNC/9LkVGGz4f4lKKB67lPZvI4noMK8GqO/LcXgqP/RY1oJojoA
|
||||
/6JKVvzYGASZ7VgMoG9bk1AneP1PGdibuTUEwimGlcObxnDFIC/yjwPFu3jIdqdS
|
||||
zZi1RZzyqAogN5y3SBEypSmn9wKBgQDECKsqqlcizmCl8v5aVk875AzGN+DOHZqx
|
||||
bkmztlnLO/2e2Fmk3G5Vvnui0FYisf8Eq19tUTQCF6lSfJlGQeFAT119wkFZhLu+
|
||||
FfLGqoEMH0ijJg/8PpdpFRK3I94YcISoTNN6yxMvE6xdDGfKCt5a+IX5bwQi9Zdc
|
||||
B242gEc6tQKBgA6tM8n7KFlAIZU9HuWgk2AUC8kKutFPmSD7tgAqXDYI4FNfugs+
|
||||
MEEYyHCB4UNujJBV4Ss6YZCAkh6eyD4U2aca1eElCfm40vBVMdzvpqZdAqLtWXxg
|
||||
D9l3mgszrFaYGCY2Fr6jLV9lP5g3xsxUjudf9jSLY9HvpfzjRrMaNATVAoGBALTl
|
||||
/vYfPMucwKlC5B7++J0e4/7iv6vUu9SyHocdZh1anb9AjPDKjXLIlZT4RhQ8R0XK
|
||||
0wOw5JpttU2uN08TKkbLNk3/vYhbKVjPLjrQSseh8sjDLgsqw1QwIxYnniLVakVY
|
||||
p+rvjSNrNyqicQCMKQavwgocvSd5lJRTMwxOMezlAoGBAKWj71BX+0CK00/2S6lC
|
||||
TcNcuUPG0d8y1czZ4q6tUlG4htwq1FMOpaghATXjkdsOGTLS+H1aA0Kt7Ai9zDhc
|
||||
/bzOJEJ+jvBXV4Gcs7jl1r/HTKv0tT9ZSI5Vzkida0rfqxDGzcMVlLuCdH0cb8Iu
|
||||
N0wdmCAqlQwHR13+F1zrAD7V
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDb/d4EDhYbrHMt
|
||||
8zrFxbLDFOFvVGntcBbd7BB33892hZcR7wElaUt/JiLV2ssxywPLCEuQqZbhWn3V
|
||||
Hg8CSKWOOsH9lpQwMsnWuLd3BfhG9cbtyuxTdBYVYIE6t/lXYVNFDab8f8rIH/qt
|
||||
VkA2xTjsepMVI+JSbaPs/fDH/C0d5gL6qY0bvNlOMBg9jF8qKh3SXK1NKZv6Hnjq
|
||||
XGff5U8RdkBBmUu8+eb/nwmdcatS/sHbKhx/kyEqQsk6sbEfaF/AohJ9qPaCk5Wb
|
||||
g9RViIPMJKmrV8+/BtTEi907bvGmvH6asY4Uzp/ZQIQ5zfnDwVKZiJHbJBOcQkql
|
||||
tJAPq3WNAgMBAAECggEBAIvJDUjQVpXxByL8eazviT5SR0jBf6mC3tTWykQRb7ck
|
||||
/bBEiRrnhDRf3CS9KP4TvO5G8BUU3a2GHYzM08akuKXeiiODidfyfbQ1nUZBAdi9
|
||||
FVFF7tK8YcflkVfpTMOMMSggm6m33fc58sQvmQ/0U85XuJvnOEkeJ9pQJa49e8GR
|
||||
lpCQImF7ygltHPEz4o8qOtNMuPxiHOxpc517+ozQULZk153NTfGok1XctDFFZ3YX
|
||||
8okLSfcqZ28mdHYSvI9xf60Cm7cT9tunXHwZ0f1esTFiVYpAp+oTJqtdYxr/fYlL
|
||||
oO8G8iIQ7LjdJfgo84PscpKdSRCq3BfnmER1Eyg6hrUCgYEA/0hL5Y/haz/2jYGy
|
||||
aa8yZSuD1ZcWtj7pLKrBQnHPHIHsjSBggWhopvonCFvCjgSS1pOFOUAwMGc0T+Dw
|
||||
rWo3w8cEUyECl3Bw8gbCWtRXaigzU9TPgCWyx1j5dTopQhLObzS/m7fJFElnYNru
|
||||
jqhsUfWS+NKk8a5+A7i9lv4iBLMCgYEA3Jws3Lfj/Xs7LljrvryTMpPthvUGBcyt
|
||||
U9Qmf1Hmur90RP5V1rx4FqPQzIeaGQyZDNIUnkhBSqQZNCts3Rzay7N4uQzk8OEg
|
||||
S8Llnw76wLwi0SJ4okDtT5tpTR6fcS0M9lGN+zvvfUB4+ul8oub0pMcyme/pywEz
|
||||
ap+x3xAQPL8CgYEAiYOBVtTNof9fqdRurh1w8SyipKDx3BRBeQ02c7tozLt0GIWT
|
||||
VsJOdXwVIJyFTglKrAnlXvSjwL8nX8wU+eVYyr5fJwSGJ9urC8T2VwVBXW7wTz04
|
||||
1Zf5GQdlwW8mIHCPATqR6Kj0yVfNN1BX50L0rqWxmRWnQoUzXn/aqQaWfp8CgYAW
|
||||
9693/zEeR8EejyVkAy/z+RCml0XcPrXg31pusPErihkpwazgIVkDSmTHlmqFpxkc
|
||||
C5cX73/UrIbvNoIr9wAUawfrhBsltNpu6MiNKbsTa8LYMRWMFuReAFkTLVf+KWmL
|
||||
D2yPtmq1iIvP25UdRJw9t3teKWsWtnZK6HtVNM/r8wKBgQDKlqUpy8r4KK+S2w80
|
||||
H7rAQJo1DgXsYrgSa2gfppSKro4lm3ltyAfVIrKQKP7uCo9xTGKVQAUPttMs2+17
|
||||
nwbwvt7/nG7G1Dk/C/t6b7SJ80VY5b9ZZKIJ0wOjajLufSjPNCe0ZTRn32XusZUn
|
||||
nYGB5/QXYr5WGV9YhAkRsFJYgA==
|
||||
-----END PRIVATE KEY-----
|
||||
|
|
|
|||
|
|
@ -126,8 +126,6 @@ if ($pid) {
|
|||
exit;
|
||||
}
|
||||
}
|
||||
# give our webservers some time to startup
|
||||
sleep(1);
|
||||
} else {
|
||||
# Child
|
||||
#print "child\n";
|
||||
|
|
@ -140,6 +138,9 @@ if ($pid) {
|
|||
exit;
|
||||
}
|
||||
|
||||
# give our webservers some time to startup
|
||||
sleep(3);
|
||||
|
||||
# Run the same server on http and https
|
||||
sub run_server {
|
||||
my $d = shift;
|
||||
|
|
@ -227,23 +228,25 @@ SKIP: {
|
|||
skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https};
|
||||
run_common_tests( { command => "$command -p $port_https", ssl => 1 } );
|
||||
|
||||
my $expiry = "Thu Nov 28 21:02:11 2030 +0000";
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
|
||||
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on Fri Feb 16 15:31:44 2029 +0000.", "output ok" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on $expiry.", "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
|
||||
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
# Expired cert tests
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
|
||||
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->output,
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.',
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 12:00:00 2008 +0000.',
|
||||
"output ok" );
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,7 @@
|
|||
# Test check_http by having an actual HTTP server running
|
||||
#
|
||||
# To create the https server certificate:
|
||||
# openssl req -new -x509 -keyout server-key.pem -out server-cert.pem -days 3650 -nodes
|
||||
# to create a new expired certificate:
|
||||
# faketime '2008-01-01 12:00:00' openssl req -new -x509 -keyout expired-key.pem -out expired-cert.pem -days 1 -nodes
|
||||
# Country Name (2 letter code) [AU]:DE
|
||||
# State or Province Name (full name) [Some-State]:Bavaria
|
||||
# Locality Name (eg, city) []:Munich
|
||||
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:Monitoring Plugins
|
||||
# Organizational Unit Name (eg, section) []:
|
||||
# Common Name (e.g. server FQDN or YOUR name) []:Monitoring Plugins
|
||||
# Email Address []:devel@monitoring-plugins.org
|
||||
# ./certs/generate-certs.sh
|
||||
|
||||
use strict;
|
||||
use Test::More;
|
||||
|
|
@ -23,7 +14,7 @@ $ENV{'LC_TIME'} = "C";
|
|||
|
||||
my $common_tests = 70;
|
||||
my $virtual_port_tests = 8;
|
||||
my $ssl_only_tests = 8;
|
||||
my $ssl_only_tests = 12;
|
||||
# Check that all dependent modules are available
|
||||
eval "use HTTP::Daemon 6.01;";
|
||||
plan skip_all => 'HTTP::Daemon >= 6.01 required' if $@;
|
||||
|
|
@ -59,120 +50,151 @@ $HTTP::Daemon::VERSION = "1.00";
|
|||
my $port_http = 50000 + int(rand(1000));
|
||||
my $port_https = $port_http + 1;
|
||||
my $port_https_expired = $port_http + 2;
|
||||
my $port_https_clientcert = $port_http + 3;
|
||||
|
||||
# This array keeps sockets around for implementing timeouts
|
||||
my @persist;
|
||||
|
||||
# Start up all servers
|
||||
my @pids;
|
||||
my $pid = fork();
|
||||
if ($pid) {
|
||||
# Parent
|
||||
push @pids, $pid;
|
||||
if (exists $servers->{https}) {
|
||||
# Fork a normal HTTPS server
|
||||
$pid = fork();
|
||||
if ($pid) {
|
||||
# Parent
|
||||
push @pids, $pid;
|
||||
# Fork an expired cert server
|
||||
$pid = fork();
|
||||
if ($pid) {
|
||||
push @pids, $pid;
|
||||
} else {
|
||||
my $d = HTTP::Daemon::SSL->new(
|
||||
LocalPort => $port_https_expired,
|
||||
LocalAddr => "127.0.0.1",
|
||||
SSL_cert_file => "$Bin/certs/expired-cert.pem",
|
||||
SSL_key_file => "$Bin/certs/expired-key.pem",
|
||||
) || die;
|
||||
print "Please contact https expired at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
my $d = HTTP::Daemon::SSL->new(
|
||||
LocalPort => $port_https,
|
||||
LocalAddr => "127.0.0.1",
|
||||
SSL_cert_file => "$Bin/certs/server-cert.pem",
|
||||
SSL_key_file => "$Bin/certs/server-key.pem",
|
||||
) || die;
|
||||
print "Please contact https at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
# give our webservers some time to startup
|
||||
sleep(1);
|
||||
} else {
|
||||
# Child
|
||||
#print "child\n";
|
||||
# Fork a HTTP server
|
||||
my $pid = fork;
|
||||
defined $pid or die "Failed to fork";
|
||||
if (!$pid) {
|
||||
undef @pids;
|
||||
my $d = HTTP::Daemon->new(
|
||||
LocalPort => $port_http,
|
||||
LocalAddr => "127.0.0.1",
|
||||
) || die;
|
||||
print "Please contact http at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
exit;
|
||||
die "webserver stopped";
|
||||
}
|
||||
push @pids, $pid;
|
||||
|
||||
if (exists $servers->{https}) {
|
||||
# Fork a normal HTTPS server
|
||||
$pid = fork;
|
||||
defined $pid or die "Failed to fork";
|
||||
if (!$pid) {
|
||||
undef @pids;
|
||||
# closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise
|
||||
local $SIG{'PIPE'} = 'IGNORE';
|
||||
my $d = HTTP::Daemon::SSL->new(
|
||||
LocalPort => $port_https,
|
||||
LocalAddr => "127.0.0.1",
|
||||
SSL_cert_file => "$Bin/certs/server-cert.pem",
|
||||
SSL_key_file => "$Bin/certs/server-key.pem",
|
||||
) || die;
|
||||
print "Please contact https at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
die "webserver stopped";
|
||||
}
|
||||
push @pids, $pid;
|
||||
|
||||
# Fork an expired cert server
|
||||
$pid = fork;
|
||||
defined $pid or die "Failed to fork";
|
||||
if (!$pid) {
|
||||
undef @pids;
|
||||
# closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise
|
||||
local $SIG{'PIPE'} = 'IGNORE';
|
||||
my $d = HTTP::Daemon::SSL->new(
|
||||
LocalPort => $port_https_expired,
|
||||
LocalAddr => "127.0.0.1",
|
||||
SSL_cert_file => "$Bin/certs/expired-cert.pem",
|
||||
SSL_key_file => "$Bin/certs/expired-key.pem",
|
||||
) || die;
|
||||
print "Please contact https expired at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
die "webserver stopped";
|
||||
}
|
||||
push @pids, $pid;
|
||||
|
||||
# Fork an client cert expecting server
|
||||
$pid = fork;
|
||||
defined $pid or die "Failed to fork";
|
||||
if (!$pid) {
|
||||
undef @pids;
|
||||
# closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise
|
||||
local $SIG{'PIPE'} = 'IGNORE';
|
||||
my $d = HTTP::Daemon::SSL->new(
|
||||
LocalPort => $port_https_clientcert,
|
||||
LocalAddr => "127.0.0.1",
|
||||
SSL_cert_file => "$Bin/certs/server-cert.pem",
|
||||
SSL_key_file => "$Bin/certs/server-key.pem",
|
||||
SSL_verify_mode => IO::Socket::SSL->SSL_VERIFY_PEER | IO::Socket::SSL->SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
|
||||
SSL_ca_file => "$Bin/certs/clientca-cert.pem",
|
||||
) || die;
|
||||
print "Please contact https client cert at: <URL:", $d->url, ">\n";
|
||||
run_server( $d );
|
||||
die "webserver stopped";
|
||||
}
|
||||
push @pids, $pid;
|
||||
}
|
||||
|
||||
# give our webservers some time to startup
|
||||
sleep(3);
|
||||
|
||||
# Run the same server on http and https
|
||||
sub run_server {
|
||||
my $d = shift;
|
||||
MAINLOOP: while (my $c = $d->accept ) {
|
||||
while (my $r = $c->get_request) {
|
||||
if ($r->method eq "GET" and $r->url->path =~ m^/statuscode/(\d+)^) {
|
||||
$c->send_basic_header($1);
|
||||
$c->send_crlf;
|
||||
} elsif ($r->method eq "GET" and $r->url->path =~ m^/file/(.*)^) {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_file_response("$Bin/var/$1");
|
||||
} elsif ($r->method eq "GET" and $r->url->path eq "/slow") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
sleep 1;
|
||||
$c->send_response("slow");
|
||||
} elsif ($r->url->path eq "/method") {
|
||||
if ($r->method eq "DELETE") {
|
||||
$c->send_error(HTTP::Status->RC_METHOD_NOT_ALLOWED);
|
||||
} elsif ($r->method eq "foo") {
|
||||
$c->send_error(HTTP::Status->RC_NOT_IMPLEMENTED);
|
||||
while (1) {
|
||||
MAINLOOP: while (my $c = $d->accept) {
|
||||
while (my $r = $c->get_request) {
|
||||
if ($r->method eq "GET" and $r->url->path =~ m^/statuscode/(\d+)^) {
|
||||
$c->send_basic_header($1);
|
||||
$c->send_crlf;
|
||||
} elsif ($r->method eq "GET" and $r->url->path =~ m^/file/(.*)^) {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_file_response("$Bin/var/$1");
|
||||
} elsif ($r->method eq "GET" and $r->url->path eq "/slow") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
sleep 1;
|
||||
$c->send_response("slow");
|
||||
} elsif ($r->url->path eq "/method") {
|
||||
if ($r->method eq "DELETE") {
|
||||
$c->send_error(HTTP::Status->RC_METHOD_NOT_ALLOWED);
|
||||
} elsif ($r->method eq "foo") {
|
||||
$c->send_error(HTTP::Status->RC_NOT_IMPLEMENTED);
|
||||
} else {
|
||||
$c->send_status_line(200, $r->method);
|
||||
}
|
||||
} elsif ($r->url->path eq "/postdata") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response($r->method.":".$r->content);
|
||||
} elsif ($r->url->path eq "/redirect") {
|
||||
$c->send_redirect( "/redirect2" );
|
||||
} elsif ($r->url->path eq "/redir_external") {
|
||||
$c->send_redirect(($d->isa('HTTP::Daemon::SSL') ? "https" : "http") . "://169.254.169.254/redirect2" );
|
||||
} elsif ($r->url->path eq "/redirect2") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' ));
|
||||
} elsif ($r->url->path eq "/redir_timeout") {
|
||||
$c->send_redirect( "/timeout" );
|
||||
} elsif ($r->url->path eq "/timeout") {
|
||||
# Keep $c from being destroyed, but prevent severe leaks
|
||||
unshift @persist, $c;
|
||||
delete($persist[1000]);
|
||||
next MAINLOOP;
|
||||
} elsif ($r->url->path eq "/header_check") {
|
||||
$c->send_basic_header;
|
||||
$c->send_header('foo');
|
||||
$c->send_crlf;
|
||||
} elsif ($r->url->path eq "/virtual_port") {
|
||||
# return sent Host header
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
||||
} else {
|
||||
$c->send_status_line(200, $r->method);
|
||||
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
||||
}
|
||||
} elsif ($r->url->path eq "/postdata") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response($r->method.":".$r->content);
|
||||
} elsif ($r->url->path eq "/redirect") {
|
||||
$c->send_redirect( "/redirect2" );
|
||||
} elsif ($r->url->path eq "/redir_external") {
|
||||
$c->send_redirect(($d->isa('HTTP::Daemon::SSL') ? "https" : "http") . "://169.254.169.254/redirect2" );
|
||||
} elsif ($r->url->path eq "/redirect2") {
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' ));
|
||||
} elsif ($r->url->path eq "/redir_timeout") {
|
||||
$c->send_redirect( "/timeout" );
|
||||
} elsif ($r->url->path eq "/timeout") {
|
||||
# Keep $c from being destroyed, but prevent severe leaks
|
||||
unshift @persist, $c;
|
||||
delete($persist[1000]);
|
||||
next MAINLOOP;
|
||||
} elsif ($r->url->path eq "/header_check") {
|
||||
$c->send_basic_header;
|
||||
$c->send_header('foo');
|
||||
$c->send_crlf;
|
||||
} elsif ($r->url->path eq "/virtual_port") {
|
||||
# return sent Host header
|
||||
$c->send_basic_header;
|
||||
$c->send_crlf;
|
||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
||||
} else {
|
||||
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
||||
$c->close;
|
||||
}
|
||||
$c->close;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -197,25 +219,44 @@ SKIP: {
|
|||
skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https};
|
||||
run_common_tests( { command => "$command -p $port_https", ssl => 1 } );
|
||||
|
||||
my $expiry = "Thu Nov 28 21:02:11 2030 +0000";
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
|
||||
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on Fri Feb 16 15:31:44 2029 +0000.", "output ok" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on $expiry.", "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
|
||||
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
# Expired cert tests
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
|
||||
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->output,
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.',
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 12:00:00 2008 +0000.',
|
||||
"output ok" );
|
||||
|
||||
# client cert tests
|
||||
my $cmd;
|
||||
$cmd = "$command -p $port_https_clientcert"
|
||||
. " -J \"$Bin/certs/client-cert.pem\""
|
||||
. " -K \"$Bin/certs/client-key.pem\""
|
||||
. " -u /statuscode/200";
|
||||
$result = NPTest->testCmd($cmd);
|
||||
is( $result->return_code, 0, $cmd);
|
||||
like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output );
|
||||
|
||||
$cmd = "$command -p $port_https_clientcert"
|
||||
. " -J \"$Bin/certs/clientchain-cert.pem\""
|
||||
. " -K \"$Bin/certs/clientchain-key.pem\""
|
||||
. " -u /statuscode/200";
|
||||
$result = NPTest->testCmd($cmd);
|
||||
is( $result->return_code, 0, $cmd);
|
||||
like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output );
|
||||
}
|
||||
|
||||
my $cmd;
|
||||
|
|
@ -414,22 +455,24 @@ sub run_common_tests {
|
|||
|
||||
# stickyport - on full urlS port is set back to 80 otherwise
|
||||
$cmd = "$command -f stickyport -u /redir_external -t 5 -s redirected";
|
||||
alarm(2);
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die "alarm\n" };
|
||||
alarm(2);
|
||||
$result = NPTest->testCmd( $cmd );
|
||||
alarm(0); };
|
||||
};
|
||||
isnt( $@, "alarm\n", $cmd );
|
||||
alarm(0);
|
||||
is( $result->return_code, 0, $cmd );
|
||||
|
||||
# Let's hope there won't be any web server on :80 returning "redirected"!
|
||||
$cmd = "$command -f sticky -u /redir_external -t 5 -s redirected";
|
||||
alarm(2);
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die "alarm\n" };
|
||||
alarm(2);
|
||||
$result = NPTest->testCmd( $cmd );
|
||||
alarm(0); };
|
||||
};
|
||||
isnt( $@, "alarm\n", $cmd );
|
||||
alarm(0);
|
||||
isnt( $result->return_code, 0, $cmd );
|
||||
|
||||
# Test an external address - timeout
|
||||
|
|
|
|||
|
|
@ -8,13 +8,14 @@ use Test::More;
|
|||
use NPTest;
|
||||
|
||||
if (-x "./check_procs") {
|
||||
plan tests => 50;
|
||||
plan tests => 52;
|
||||
} else {
|
||||
plan skip_all => "No check_procs compiled";
|
||||
}
|
||||
|
||||
my $result;
|
||||
my $command = "./check_procs --input-file=tests/var/ps-axwo.darwin";
|
||||
my $command = "./check_procs --input-file=tests/var/ps-axwo.darwin";
|
||||
my $cmd_etime = "./check_procs --input-file=tests/var/ps-axwo.debian";
|
||||
|
||||
$result = NPTest->testCmd( "$command" );
|
||||
is( $result->return_code, 0, "Run with no options" );
|
||||
|
|
@ -69,9 +70,21 @@ SKIP: {
|
|||
like( $result->output, '/^PROCS OK: 0 processes with UID = -2 \(nobody\), args \'UsB\'/', "Output correct" );
|
||||
};
|
||||
|
||||
$result = NPTest->testCmd( "$command --ereg-argument-array='mdworker.*501'" );
|
||||
is( $result->return_code, 0, "Checking regexp search of arguments" );
|
||||
is( $result->output, "PROCS OK: 1 process with regex args 'mdworker.*501' | procs=1;;;0;", "Output correct" );
|
||||
SKIP: {
|
||||
skip 'check_procs is compiled with etime format support', 2 if `$command -vvv` =~ m/etime/mx;
|
||||
|
||||
$result = NPTest->testCmd( "$command --ereg-argument-array='mdworker.*501'" );
|
||||
is( $result->return_code, 0, "Checking regexp search of arguments" );
|
||||
is( $result->output, "PROCS OK: 1 process with regex args 'mdworker.*501' | procs=1;;;0;", "Output correct" );
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip 'check_procs is compiled without etime format support', 2 if `$cmd_etime -vvv` !~ m/etime/mx;
|
||||
|
||||
$result = NPTest->testCmd( "$cmd_etime -m ELAPSED -C apache2 -w 1000 -c 2000" );
|
||||
is( $result->return_code, 2, "Checking elapsed time threshold" );
|
||||
is( $result->output, "ELAPSED CRITICAL: 10 crit, 0 warn out of 10 processes with command name 'apache2' | procs=10;;;0; procs_warn=0;;;0; procs_crit=10;;;0;", "Output correct" );
|
||||
}
|
||||
|
||||
$result = NPTest->testCmd( "$command --vsz 1000000" );
|
||||
is( $result->return_code, 0, "Checking filter by VSZ" );
|
||||
|
|
@ -83,7 +96,7 @@ is( $result->output, 'PROCS OK: 3 processes with RSS >= 100000 | procs=3;;;0;',
|
|||
|
||||
$result = NPTest->testCmd( "$command -s S" );
|
||||
is( $result->return_code, 0, "Checking filter for sleeping processes" );
|
||||
like( $result->output, '/^PROCS OK: 44 processes with STATE = S/', "Output correct" );
|
||||
like( $result->output, '/^PROCS OK: 88 processes with STATE = S/', "Output correct" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -s Z" );
|
||||
is( $result->return_code, 0, "Checking filter for zombies" );
|
||||
|
|
@ -129,4 +142,3 @@ is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowSe
|
|||
$result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" );
|
||||
is( $result->return_code, 0, "Checking no pipe symbol in output" );
|
||||
is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)' | procs=0;;;0;", "Output correct" );
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use NPTest;
|
|||
use FindBin qw($Bin);
|
||||
use POSIX qw/strftime/;
|
||||
|
||||
my $tests = 67;
|
||||
my $tests = 73;
|
||||
# Check that all dependent modules are available
|
||||
eval {
|
||||
require NetSNMP::OID;
|
||||
|
|
@ -251,9 +251,20 @@ is($res->output, 'SNMP CRITICAL - *-4* | iso.3.6.1.4.1.8072.3.2.67.17=-4;-2:;-3:
|
|||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -c '~:-6.5'" );
|
||||
is($res->return_code, 0, "Negative float OK" );
|
||||
is($res->output, 'SNMP OK - -6.6 | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;;~:-6.5 ', "Negative float OK output" );
|
||||
is($res->output, 'SNMP OK - -6.6 | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;;@-6.5:~ ', "Negative float OK output" );
|
||||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -w '~:-6.65' -c '~:-6.55'" );
|
||||
is($res->return_code, 1, "Negative float WARNING" );
|
||||
is($res->output, 'SNMP WARNING - *-6.6* | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;~:-6.65;~:-6.55 ', "Negative float WARNING output" );
|
||||
is($res->output, 'SNMP WARNING - *-6.6* | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;@-6.65:~;@-6.55:~ ', "Negative float WARNING output" );
|
||||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w '1:100000,-10:20' -c '2:200000,-20:30'" );
|
||||
is($res->return_code, 0, "Multiple OIDs with thresholds" );
|
||||
like($res->output, '/SNMP OK - \d+ -4 | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1:100000;2:200000 iso.3.6.1.4.1.8072.3.2.67.17=-4;-10:20;-20:30/', "Multiple OIDs with thresholds output" );
|
||||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w '1:100000,-1:2' -c '2:200000,-20:30'" );
|
||||
is($res->return_code, 1, "Multiple OIDs with thresholds" );
|
||||
like($res->output, '/SNMP WARNING - \d+ \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1:100000;2:200000 iso.3.6.1.4.1.8072.3.2.67.17=-4;-10:20;-20:30/', "Multiple OIDs with thresholds output" );
|
||||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w 1,2 -c 1" );
|
||||
is($res->return_code, 2, "Multiple OIDs with some thresholds" );
|
||||
like($res->output, '/SNMP CRITICAL - \*\d+\* \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1;2 iso.3.6.1.4.1.8072.3.2.67.17=-4;;/', "Multiple OIDs with thresholds output" );
|
||||
|
|
|
|||
219
plugins/tests/var/ps-axwo.debian
Normal file
219
plugins/tests/var/ps-axwo.debian
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
STAT UID PID PPID VSZ RSS %CPU ELAPSED COMMAND COMMAND
|
||||
Ss 0 1 0 167244 7144 0.1 26-03:07:26 systemd /lib/systemd/systemd --system --deserialize 17
|
||||
S 0 2 0 0 0 0.0 26-03:07:26 kthreadd [kthreadd]
|
||||
I< 0 3 2 0 0 0.0 26-03:07:26 rcu_gp [rcu_gp]
|
||||
I< 0 4 2 0 0 0.0 26-03:07:26 rcu_par_gp [rcu_par_gp]
|
||||
I< 0 6 2 0 0 0.0 26-03:07:26 kworker/0:0H-ev [kworker/0:0H-events_highpri]
|
||||
I< 0 9 2 0 0 0.0 26-03:07:26 mm_percpu_wq [mm_percpu_wq]
|
||||
S 0 10 2 0 0 0.0 26-03:07:26 rcu_tasks_rude_ [rcu_tasks_rude_]
|
||||
S 0 11 2 0 0 0.0 26-03:07:26 rcu_tasks_trace [rcu_tasks_trace]
|
||||
S 0 12 2 0 0 0.0 26-03:07:26 ksoftirqd/0 [ksoftirqd/0]
|
||||
I 0 13 2 0 0 0.0 26-03:07:26 rcu_sched [rcu_sched]
|
||||
S 0 14 2 0 0 0.0 26-03:07:26 migration/0 [migration/0]
|
||||
S 0 15 2 0 0 0.0 26-03:07:26 cpuhp/0 [cpuhp/0]
|
||||
S 0 16 2 0 0 0.0 26-03:07:26 cpuhp/1 [cpuhp/1]
|
||||
S 0 17 2 0 0 0.0 26-03:07:26 migration/1 [migration/1]
|
||||
S 0 18 2 0 0 0.0 26-03:07:26 ksoftirqd/1 [ksoftirqd/1]
|
||||
I< 0 20 2 0 0 0.0 26-03:07:26 kworker/1:0H-ev [kworker/1:0H-events_highpri]
|
||||
S 0 21 2 0 0 0.0 26-03:07:26 cpuhp/2 [cpuhp/2]
|
||||
S 0 22 2 0 0 0.0 26-03:07:26 migration/2 [migration/2]
|
||||
S 0 23 2 0 0 0.0 26-03:07:26 ksoftirqd/2 [ksoftirqd/2]
|
||||
I< 0 25 2 0 0 0.0 26-03:07:26 kworker/2:0H-ev [kworker/2:0H-events_highpri]
|
||||
S 0 26 2 0 0 0.0 26-03:07:26 cpuhp/3 [cpuhp/3]
|
||||
S 0 27 2 0 0 0.0 26-03:07:26 migration/3 [migration/3]
|
||||
S 0 28 2 0 0 0.0 26-03:07:26 ksoftirqd/3 [ksoftirqd/3]
|
||||
I< 0 30 2 0 0 0.0 26-03:07:26 kworker/3:0H-ev [kworker/3:0H-events_highpri]
|
||||
S 0 35 2 0 0 0.0 26-03:07:26 kdevtmpfs [kdevtmpfs]
|
||||
I< 0 36 2 0 0 0.0 26-03:07:26 netns [netns]
|
||||
S 0 37 2 0 0 0.0 26-03:07:26 kauditd [kauditd]
|
||||
S 0 38 2 0 0 0.0 26-03:07:26 khungtaskd [khungtaskd]
|
||||
S 0 39 2 0 0 0.0 26-03:07:26 oom_reaper [oom_reaper]
|
||||
I< 0 40 2 0 0 0.0 26-03:07:26 writeback [writeback]
|
||||
S 0 41 2 0 0 0.0 26-03:07:26 kcompactd0 [kcompactd0]
|
||||
SN 0 42 2 0 0 0.0 26-03:07:26 ksmd [ksmd]
|
||||
SN 0 43 2 0 0 0.0 26-03:07:26 khugepaged [khugepaged]
|
||||
I< 0 62 2 0 0 0.0 26-03:07:26 kintegrityd [kintegrityd]
|
||||
I< 0 63 2 0 0 0.0 26-03:07:26 kblockd [kblockd]
|
||||
I< 0 64 2 0 0 0.0 26-03:07:26 blkcg_punt_bio [blkcg_punt_bio]
|
||||
I< 0 65 2 0 0 0.0 26-03:07:26 edac-poller [edac-poller]
|
||||
I< 0 66 2 0 0 0.0 26-03:07:26 devfreq_wq [devfreq_wq]
|
||||
I< 0 67 2 0 0 0.0 26-03:07:26 kworker/2:1H-ev [kworker/2:1H-events_highpri]
|
||||
S 0 70 2 0 0 0.3 26-03:07:25 kswapd0 [kswapd0]
|
||||
I< 0 71 2 0 0 0.0 26-03:07:25 kthrotld [kthrotld]
|
||||
I< 0 72 2 0 0 0.0 26-03:07:25 acpi_thermal_pm [acpi_thermal_pm]
|
||||
I< 0 74 2 0 0 0.0 26-03:07:25 ipv6_addrconf [ipv6_addrconf]
|
||||
I< 0 80 2 0 0 0.0 26-03:07:25 kworker/3:1H-ev [kworker/3:1H-events_highpri]
|
||||
I< 0 84 2 0 0 0.0 26-03:07:25 kstrp [kstrp]
|
||||
I< 0 87 2 0 0 0.0 26-03:07:25 zswap-shrink [zswap-shrink]
|
||||
I< 0 110 2 0 0 0.0 26-03:07:25 kworker/0:1H-ev [kworker/0:1H-events_highpri]
|
||||
I< 0 141 2 0 0 0.0 26-03:07:25 ata_sff [ata_sff]
|
||||
S 0 143 2 0 0 0.0 26-03:07:25 scsi_eh_0 [scsi_eh_0]
|
||||
I< 0 144 2 0 0 0.0 26-03:07:25 scsi_tmf_0 [scsi_tmf_0]
|
||||
S 0 145 2 0 0 0.0 26-03:07:25 scsi_eh_1 [scsi_eh_1]
|
||||
I< 0 146 2 0 0 0.0 26-03:07:25 scsi_tmf_1 [scsi_tmf_1]
|
||||
S 0 147 2 0 0 0.0 26-03:07:25 scsi_eh_2 [scsi_eh_2]
|
||||
I< 0 148 2 0 0 0.0 26-03:07:25 scsi_tmf_2 [scsi_tmf_2]
|
||||
S 0 149 2 0 0 0.0 26-03:07:25 scsi_eh_3 [scsi_eh_3]
|
||||
I< 0 150 2 0 0 0.0 26-03:07:25 scsi_tmf_3 [scsi_tmf_3]
|
||||
S 0 151 2 0 0 0.0 26-03:07:25 scsi_eh_4 [scsi_eh_4]
|
||||
I< 0 152 2 0 0 0.0 26-03:07:25 scsi_tmf_4 [scsi_tmf_4]
|
||||
S 0 153 2 0 0 0.0 26-03:07:25 scsi_eh_5 [scsi_eh_5]
|
||||
I< 0 154 2 0 0 0.0 26-03:07:25 scsi_tmf_5 [scsi_tmf_5]
|
||||
S 0 158 2 0 0 0.0 26-03:07:25 card0-crtc0 [card0-crtc0]
|
||||
S 0 159 2 0 0 0.0 26-03:07:25 card0-crtc1 [card0-crtc1]
|
||||
S 0 160 2 0 0 0.0 26-03:07:25 card0-crtc2 [card0-crtc2]
|
||||
I< 0 162 2 0 0 0.0 26-03:07:25 kworker/1:1H-ev [kworker/1:1H-events_highpri]
|
||||
S 0 163 2 0 0 0.0 26-03:07:25 scsi_eh_6 [scsi_eh_6]
|
||||
I< 0 164 2 0 0 0.0 26-03:07:25 scsi_tmf_6 [scsi_tmf_6]
|
||||
S 0 165 2 0 0 0.0 26-03:07:25 usb-storage [usb-storage]
|
||||
I< 0 167 2 0 0 0.0 26-03:07:25 uas [uas]
|
||||
I< 0 176 2 0 0 0.0 26-03:07:25 kdmflush [kdmflush]
|
||||
I< 0 177 2 0 0 0.0 26-03:07:25 kdmflush [kdmflush]
|
||||
S 0 202 2 0 0 0.0 26-03:07:24 scsi_eh_7 [scsi_eh_7]
|
||||
I< 0 203 2 0 0 0.0 26-03:07:24 scsi_tmf_7 [scsi_tmf_7]
|
||||
S 0 204 2 0 0 0.0 26-03:07:24 usb-storage [usb-storage]
|
||||
I< 0 232 2 0 0 0.0 26-03:07:23 btrfs-worker [btrfs-worker]
|
||||
I< 0 233 2 0 0 0.0 26-03:07:23 btrfs-worker-hi [btrfs-worker-hi]
|
||||
I< 0 234 2 0 0 0.0 26-03:07:23 btrfs-delalloc [btrfs-delalloc]
|
||||
I< 0 235 2 0 0 0.0 26-03:07:23 btrfs-flush_del [btrfs-flush_del]
|
||||
I< 0 236 2 0 0 0.0 26-03:07:23 btrfs-cache [btrfs-cache]
|
||||
I< 0 237 2 0 0 0.0 26-03:07:23 btrfs-fixup [btrfs-fixup]
|
||||
I< 0 238 2 0 0 0.0 26-03:07:23 btrfs-endio [btrfs-endio]
|
||||
I< 0 239 2 0 0 0.0 26-03:07:23 btrfs-endio-met [btrfs-endio-met]
|
||||
I< 0 240 2 0 0 0.0 26-03:07:23 btrfs-endio-met [btrfs-endio-met]
|
||||
I< 0 241 2 0 0 0.0 26-03:07:23 btrfs-endio-rai [btrfs-endio-rai]
|
||||
I< 0 242 2 0 0 0.0 26-03:07:23 btrfs-rmw [btrfs-rmw]
|
||||
I< 0 243 2 0 0 0.0 26-03:07:23 btrfs-endio-wri [btrfs-endio-wri]
|
||||
I< 0 244 2 0 0 0.0 26-03:07:23 btrfs-freespace [btrfs-freespace]
|
||||
I< 0 245 2 0 0 0.0 26-03:07:23 btrfs-delayed-m [btrfs-delayed-m]
|
||||
I< 0 246 2 0 0 0.0 26-03:07:23 btrfs-readahead [btrfs-readahead]
|
||||
I< 0 247 2 0 0 0.0 26-03:07:23 btrfs-qgroup-re [btrfs-qgroup-re]
|
||||
S 0 248 2 0 0 0.0 26-03:07:23 btrfs-cleaner [btrfs-cleaner]
|
||||
S 0 249 2 0 0 0.2 26-03:07:23 btrfs-transacti [btrfs-transacti]
|
||||
I< 0 317 2 0 0 0.0 26-03:07:22 rpciod [rpciod]
|
||||
I< 0 322 2 0 0 0.0 26-03:07:22 xprtiod [xprtiod]
|
||||
S 0 381 2 0 0 0.0 26-03:07:22 irq/133-mei_me [irq/133-mei_me]
|
||||
S 0 422 2 0 0 0.0 26-03:07:22 watchdogd [watchdogd]
|
||||
I< 0 523 2 0 0 0.0 26-03:07:22 led_workqueue [led_workqueue]
|
||||
I< 0 583 2 0 0 0.0 26-03:07:22 cryptd [cryptd]
|
||||
I< 0 590 2 0 0 0.0 26-03:07:22 ext4-rsv-conver [ext4-rsv-conver]
|
||||
Ss 104 693 1 12324 4292 0.5 26-03:07:21 dbus-daemon /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
|
||||
Ss 0 731 1 575120 1368 0.0 26-03:07:21 systemd-logind /lib/systemd/systemd-logind
|
||||
Ssl 0 1111 1 121248 732 0.0 26-03:07:18 unattended-upgr /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
|
||||
S 0 1141 2 0 0 0.0 26-03:07:18 lockd [lockd]
|
||||
I< 0 1459 2 0 0 0.0 26-03:07:16 nfsiod [nfsiod]
|
||||
S 0 1621 2 0 0 0.0 26-03:07:15 NFSv4 callback [NFSv4 callback]
|
||||
Ssl 0 1771 1 1548340 676 0.0 26-03:07:13 libvirtd /usr/sbin/libvirtd
|
||||
I< 0 24315 2 0 0 0.0 26-02:49:02 cifsiod [cifsiod]
|
||||
I< 0 24316 2 0 0 0.0 26-02:49:02 smb3decryptd [smb3decryptd]
|
||||
I< 0 24317 2 0 0 0.0 26-02:49:02 cifsfileinfoput [cifsfileinfoput]
|
||||
I< 0 24318 2 0 0 0.0 26-02:49:02 cifsoplockd [cifsoplockd]
|
||||
I< 0 24319 2 0 0 0.0 26-02:49:02 cifs-dfscache [cifs-dfscache]
|
||||
S 0 24322 2 0 0 0.0 26-02:49:02 cifsd [cifsd]
|
||||
I< 0 24413 2 0 0 0.0 26-02:48:57 btrfs-worker [btrfs-worker]
|
||||
I< 0 24414 2 0 0 0.0 26-02:48:57 btrfs-worker-hi [btrfs-worker-hi]
|
||||
I< 0 24415 2 0 0 0.0 26-02:48:57 btrfs-delalloc [btrfs-delalloc]
|
||||
I< 0 24416 2 0 0 0.0 26-02:48:57 btrfs-flush_del [btrfs-flush_del]
|
||||
I< 0 24418 2 0 0 0.0 26-02:48:57 btrfs-cache [btrfs-cache]
|
||||
I< 0 24419 2 0 0 0.0 26-02:48:57 btrfs-fixup [btrfs-fixup]
|
||||
I< 0 24420 2 0 0 0.0 26-02:48:57 btrfs-endio [btrfs-endio]
|
||||
I< 0 24421 2 0 0 0.0 26-02:48:57 btrfs-endio-met [btrfs-endio-met]
|
||||
I< 0 24422 2 0 0 0.0 26-02:48:57 btrfs-endio-met [btrfs-endio-met]
|
||||
I< 0 24423 2 0 0 0.0 26-02:48:57 btrfs-endio-rai [btrfs-endio-rai]
|
||||
I< 0 24424 2 0 0 0.0 26-02:48:57 btrfs-rmw [btrfs-rmw]
|
||||
I< 0 24425 2 0 0 0.0 26-02:48:57 btrfs-endio-wri [btrfs-endio-wri]
|
||||
I< 0 24426 2 0 0 0.0 26-02:48:57 btrfs-freespace [btrfs-freespace]
|
||||
I< 0 24427 2 0 0 0.0 26-02:48:57 btrfs-delayed-m [btrfs-delayed-m]
|
||||
I< 0 24428 2 0 0 0.0 26-02:48:57 btrfs-readahead [btrfs-readahead]
|
||||
I< 0 24429 2 0 0 0.0 26-02:48:57 btrfs-qgroup-re [btrfs-qgroup-re]
|
||||
S 0 24450 2 0 0 0.0 26-02:48:53 btrfs-cleaner [btrfs-cleaner]
|
||||
S 0 24451 2 0 0 0.0 26-02:48:53 btrfs-transacti [btrfs-transacti]
|
||||
I< 0 747708 2 0 0 0.0 16-21:06:20 xfsalloc [xfsalloc]
|
||||
I< 0 747709 2 0 0 0.0 16-21:06:20 xfs_mru_cache [xfs_mru_cache]
|
||||
S 0 747713 2 0 0 0.0 16-21:06:20 jfsIO [jfsIO]
|
||||
S 0 747714 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit]
|
||||
S 0 747715 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit]
|
||||
S 0 747716 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit]
|
||||
S 0 747717 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit]
|
||||
S 0 747718 2 0 0 0.0 16-21:06:20 jfsSync [jfsSync]
|
||||
Ss 0 1071687 1 105976 28304 0.0 3-03:12:31 systemd-journal /lib/systemd/systemd-journald
|
||||
Ss 0 1934146 1 25672 4704 0.0 11:19:31 cupsd /usr/sbin/cupsd -l
|
||||
Ssl 0 1934148 1 182868 8540 0.0 11:19:31 cups-browsed /usr/sbin/cups-browsed
|
||||
S 13 1934155 3392655 5752 88 0.0 11:19:31 pinger (pinger)
|
||||
S< 33 1934166 3393034 57996 5460 0.0 11:19:31 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934167 3393034 216944 13892 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934168 3393034 216944 13756 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934169 3393034 216936 13732 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934170 3393034 216944 13888 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934172 3393034 216944 15388 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1934701 3393034 216936 13736 0.0 11:19:29 apache2 /usr/sbin/apache2 -k start
|
||||
S< 33 1935056 3393034 216920 13724 0.0 11:19:28 apache2 /usr/sbin/apache2 -k start
|
||||
S 7 1936834 1934146 16652 832 0.0 11:18:12 dbus /usr/lib/cups/notifier/dbus dbus://
|
||||
S< 33 1955909 3393034 216928 13792 0.0 11:00:25 apache2 /usr/sbin/apache2 -k start
|
||||
I< 0 2531464 2 0 0 0.0 06:35:47 kworker/u9:0-i9 [kworker/u9:0-i915_flip]
|
||||
I 0 2570506 2 0 0 0.0 06:27:41 kworker/1:0-cgr [kworker/1:0-cgroup_destroy]
|
||||
I 0 2596195 2 0 0 0.0 06:21:52 kworker/1:1-eve [kworker/1:1-events]
|
||||
I 0 2785341 2 0 0 0.0 03:34:16 kworker/u8:8-bt [kworker/u8:8-btrfs-endio-write]
|
||||
I 0 2785520 2 0 0 0.0 03:33:50 kworker/3:0-eve [kworker/3:0-events]
|
||||
I 0 2798669 2 0 0 0.0 03:21:09 kworker/u8:5-bt [kworker/u8:5-btrfs-endio-write]
|
||||
Ss 0 2803015 1 5616 3108 0.0 03:17:54 cron /usr/sbin/cron -f
|
||||
I 0 2845483 2 0 0 0.0 02:38:11 kworker/0:3-eve [kworker/0:3-events]
|
||||
I 0 2939490 2 0 0 0.1 01:10:32 kworker/0:0-eve [kworker/0:0-events]
|
||||
I 0 2939754 2 0 0 0.0 01:10:26 kworker/u8:1-i9 [kworker/u8:1-i915]
|
||||
I 0 2942040 2 0 0 0.0 01:08:02 kworker/u8:7-bt [kworker/u8:7-btrfs-endio-meta]
|
||||
S 117 2954268 3392551 40044 5772 0.0 56:37 pickup pickup -l -t unix -u -c
|
||||
I 0 2965195 2 0 0 0.0 46:00 kworker/u8:0-bt [kworker/u8:0-btrfs-worker]
|
||||
I 0 2977972 2 0 0 0.0 33:54 kworker/u8:2-bt [kworker/u8:2-btrfs-endio-write]
|
||||
I 0 2985488 2 0 0 0.0 27:02 kworker/u8:3-bl [kworker/u8:3-blkcg_punt_bio]
|
||||
I 0 2987519 2 0 0 1.0 25:15 kworker/2:1-eve [kworker/2:1-events]
|
||||
I 0 2987601 2 0 0 0.0 25:03 kworker/u8:9-i9 [kworker/u8:9-i915]
|
||||
I< 0 2995218 2 0 0 0.0 18:41 kworker/u9:2-xp [kworker/u9:2-xprtiod]
|
||||
I 0 2997170 2 0 0 0.0 16:41 kworker/3:1-rcu [kworker/3:1-rcu_gp]
|
||||
I 0 3001264 2 0 0 0.0 13:01 kworker/u8:4-bt [kworker/u8:4-btrfs-endio-write]
|
||||
I 0 3004697 2 0 0 0.7 09:41 kworker/2:0-eve [kworker/2:0-events]
|
||||
I 0 3010619 2 0 0 1.0 04:29 kworker/2:2-eve [kworker/2:2-events]
|
||||
I 0 3014612 2 0 0 0.0 00:41 kworker/3:2-eve [kworker/3:2-events]
|
||||
S 0 3015082 2803015 6716 3028 0.0 00:30 cron /usr/sbin/CRON -f
|
||||
I 0 3015382 2 0 0 0.0 00:00 kworker/u8:6-bt [kworker/u8:6-btrfs-endio-meta]
|
||||
Ss 1 3392068 1 5592 504 0.0 15-02:34:39 atd /usr/sbin/atd -f
|
||||
Ssl 0 3392072 1 235796 1740 0.0 15-02:34:39 accounts-daemon /usr/libexec/accounts-daemon
|
||||
Ssl 106 3392076 1 315708 6128 0.0 15-02:34:39 colord /usr/libexec/colord
|
||||
Ss 0 3392083 1 8120 720 0.0 15-02:34:39 haveged /usr/sbin/haveged --Foreground --verbose=1
|
||||
Ss 0 3392090 1 5168 132 0.0 15-02:34:39 blkmapd /usr/sbin/blkmapd
|
||||
SNsl 111 3392094 1 155648 440 0.0 15-02:34:39 rtkit-daemon /usr/libexec/rtkit-daemon
|
||||
Ssl 0 3392097 1 290168 1352 0.0 15-02:34:39 packagekitd /usr/libexec/packagekitd
|
||||
Ss 128 3392100 1 7960 448 0.0 15-02:34:39 rpcbind /sbin/rpcbind -f -w
|
||||
Ss 0 3392114 1 13432 616 0.0 15-02:34:39 systemd-machine /lib/systemd/systemd-machined
|
||||
Ss 0 3392118 1 13316 848 0.0 15-02:34:39 sshd sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
|
||||
Ssl 0 3392124 1 244072 2456 0.0 15-02:34:39 upowerd /usr/libexec/upowerd
|
||||
Ssl 0 3392138 1 1634748 10684 0.0 15-02:34:39 containerd /usr/bin/containerd
|
||||
Ssl 0 3392139 1 222768 1784 0.0 15-02:34:39 rsyslogd /usr/sbin/rsyslogd -n -iNONE
|
||||
Ss 13 3392140 1 3344 152 0.0 15-02:34:39 polipo /usr/bin/polipo -c /etc/polipo/config pidFile=/var/run/polipo/polipo.pid daemonise=true
|
||||
Ssl 119 3392156 1 76472 1688 0.0 15-02:34:39 ntpd /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 119:126
|
||||
Ss 120 3392168 1 4656 276 0.0 15-02:34:39 rpc.statd /sbin/rpc.statd --no-notify
|
||||
Ss 0 3392171 1 5072 432 0.0 15-02:34:39 rpc.mountd /usr/sbin/rpc.mountd --manage-gids
|
||||
Ss 0 3392176 1 5008 288 0.0 15-02:34:39 rpc.idmapd /usr/sbin/rpc.idmapd
|
||||
Ss 105 3392184 1 15544 6816 3.5 15-02:34:39 avahi-daemon avahi-daemon: running [tsui.local]
|
||||
Ss 0 3392186 1 25288 3860 0.0 15-02:34:39 systemd-udevd /lib/systemd/systemd-udevd
|
||||
S 105 3392190 3392184 8788 52 0.0 15-02:34:39 avahi-daemon avahi-daemon: chroot helper
|
||||
Ssl 0 3392197 1 396120 4188 0.0 15-02:34:39 udisksd /usr/libexec/udisks2/udisksd
|
||||
Ssl 0 3392214 1 237504 6632 0.0 15-02:34:39 polkitd /usr/libexec/polkitd --no-debug
|
||||
Ss 0 3392284 1 9684 560 0.0 15-02:34:38 xinetd /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
|
||||
Ssl 0 3392285 1 314840 1352 0.0 15-02:34:38 ModemManager /usr/sbin/ModemManager
|
||||
Ss 0 3392317 1 2352 140 0.0 15-02:34:38 acpid /usr/sbin/acpid
|
||||
S 0 3392400 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392401 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392402 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392403 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392404 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392405 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392407 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
S 0 3392410 2 0 0 0.0 15-02:34:38 nfsd [nfsd]
|
||||
Ss 0 3392551 1 40092 1304 0.0 15-02:34:37 master /usr/lib/postfix/sbin/master -w
|
||||
S 117 3392553 3392551 40156 568 0.0 15-02:34:37 qmgr qmgr -l -t unix -u
|
||||
Ss 0 3392650 1 63652 4 0.0 15-02:34:36 squid /usr/sbin/squid --foreground -sYC
|
||||
Ssl 116 3392652 1 1675196 93848 0.0 15-02:34:36 mariadbd /usr/sbin/mariadbd
|
||||
S 13 3392655 3392650 81776 21232 0.0 15-02:34:36 squid (squid-1) --kid squid-1 --foreground -sYC
|
||||
S 13 3392657 3392655 5572 68 0.0 15-02:34:36 log_file_daemon (logfile-daemon) /var/log/squid/access.log
|
||||
S<s 0 3393034 1 216648 7560 0.0 15-02:34:34 apache2 /usr/sbin/apache2 -k start
|
||||
Ss 33 3393037 1 3432 180 0.0 15-02:34:34 htcacheclean /usr/bin/htcacheclean -d 120 -p /var/cache/apache2/mod_cache_disk -l 300M -n
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
STAT UID PID PPID VSZ RSS %CPU COMMAND COMMAND
|
||||
S 0 1 0 1504 428 0.0 init init [2]
|
||||
SN 0 2 1 0 0 0.0 ksoftirqd/0 [ksoftirqd/0]
|
||||
S< 0 3 1 0 0 0.0 events/0 [events/0]
|
||||
S< 0 4 3 0 0 0.0 khelper [khelper]
|
||||
S< 0 5 3 0 0 0.0 kacpid [kacpid]
|
||||
S< 0 38 3 0 0 0.0 kblockd/0 [kblockd/0]
|
||||
S 0 48 3 0 0 0.0 pdflush [pdflush]
|
||||
S< 0 51 3 0 0 0.0 aio/0 [aio/0]
|
||||
S 0 50 1 0 0 0.0 kswapd0 [kswapd0]
|
||||
S 0 193 1 0 0 0.0 kseriod [kseriod]
|
||||
S 0 214 1 0 0 0.0 scsi_eh_0 [scsi_eh_0]
|
||||
S 0 221 1 0 0 0.0 khubd [khubd]
|
||||
S 0 299 1 0 0 0.3 kjournald [kjournald]
|
||||
S 0 1148 1 0 0 0.0 pciehpd_event [pciehpd_event]
|
||||
S 0 1168 1 0 0 0.0 shpchpd_event [shpchpd_event]
|
||||
Ss 1 1795 1 1612 276 0.0 portmap /sbin/portmap
|
||||
Ss 0 2200 1 1652 568 0.0 vmware-guestd /usr/sbin/vmware-guestd --background /var/run/vmware-guestd.pid
|
||||
Ss 0 2209 1 2240 532 0.0 inetd /usr/sbin/inetd
|
||||
Ss 0 2319 1 3468 792 0.0 sshd /usr/sbin/sshd
|
||||
Ss 0 2323 1 2468 676 0.0 rpc.statd /sbin/rpc.statd
|
||||
Ss 1 2332 1 1684 488 0.0 atd /usr/sbin/atd
|
||||
Ss 0 2335 1 1764 636 0.0 cron /usr/sbin/cron
|
||||
Ss+ 0 2350 1 1500 348 0.0 getty /sbin/getty 38400 tty1
|
||||
Ss+ 0 2351 1 1500 348 0.0 getty /sbin/getty 38400 tty2
|
||||
Ss+ 0 2352 1 1500 348 0.0 getty /sbin/getty 38400 tty3
|
||||
Ss+ 0 2353 1 1500 348 0.0 getty /sbin/getty 38400 tty4
|
||||
Ss+ 0 2354 1 1500 348 0.0 getty /sbin/getty 38400 tty5
|
||||
Ss+ 0 2355 1 1500 348 0.0 getty /sbin/getty 38400 tty6
|
||||
S 0 6907 1 2308 892 0.0 mysqld_safe /bin/sh /usr/bin/mysqld_safe
|
||||
S 103 6944 6907 123220 27724 0.0 mysqld /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
|
||||
S 0 6945 6907 1488 420 0.0 logger logger -p daemon.err -t mysqld_safe -i -t mysqld
|
||||
S 1001 17778 1 6436 1588 0.0 snmpd /usr/sbin/snmpd -u nagios -Lsd -Lf /dev/null -p/var/run/snmpd.pid
|
||||
Ss 0 17789 1 9496 5556 0.0 snmptrapd /usr/sbin/snmptrapd -t -m ALL -M /usr/share/snmp/mibs:/usr/local/monitoring/snmp/load -p /var/run/snmptrapd.pid
|
||||
Ss 0 847 2319 14452 1752 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 857 847 14616 1832 0.0 sshd sshd: tonvoon@pts/3
|
||||
Ss 1000 860 857 2984 1620 0.0 bash -bash
|
||||
S 0 868 860 2588 1428 0.0 bash -su
|
||||
S+ 1001 877 868 2652 1568 0.0 bash -su
|
||||
S 0 6086 3 0 0 0.0 pdflush [pdflush]
|
||||
Ss 0 17832 2319 14452 1752 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 18155 17832 14620 1840 0.0 sshd sshd: tonvoon@pts/0
|
||||
Ss 1000 18156 18155 2984 1620 0.0 bash -bash
|
||||
S 0 18518 18156 2588 1428 0.0 bash -su
|
||||
S 1001 18955 18518 2672 1600 0.0 bash -su
|
||||
Ss 0 21683 2319 14452 1756 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 21742 21683 14620 1896 0.0 sshd sshd: tonvoon@pts/1
|
||||
Ss 1000 21743 21742 2984 1620 0.0 bash -bash
|
||||
S 0 21748 21743 2592 1432 0.0 bash -su
|
||||
S 1001 21757 21748 2620 1540 0.0 bash -su
|
||||
Ss 0 2334 2319 14452 1756 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 2343 2334 14620 1840 0.0 sshd sshd: tonvoon@pts/2
|
||||
Ss 1000 2344 2343 2984 1620 0.0 bash -bash
|
||||
S 0 2349 2344 2592 1432 0.0 bash -su
|
||||
S+ 1001 2364 2349 2620 1520 0.0 bash -su
|
||||
T 1001 2454 2364 2096 1032 0.0 vi vi configure.in.rej
|
||||
S+ 1001 8500 21757 69604 52576 0.0 opsview_web_ser /usr/bin/perl -w ./script/opsview_web_server.pl -f -d
|
||||
Ss 0 7609 2319 14452 1756 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 7617 7609 14460 1828 0.0 sshd sshd: tonvoon@pts/4
|
||||
Ss 1000 7618 7617 2984 1620 0.0 bash -bash
|
||||
S 0 7623 7618 2592 1432 0.0 bash -su
|
||||
S+ 1001 7632 7623 2620 1528 0.0 bash -su
|
||||
Ss 1001 12678 1 20784 17728 0.0 opsviewd opsviewd
|
||||
Ss 0 832 1 14512 6360 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
S 33 842 832 14648 6596 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
S 33 843 832 14512 6504 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
S 33 844 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
S 33 845 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
S 33 846 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
Ss 7 4081 1 2464 884 0.0 lpd /usr/sbin/lpd -s
|
||||
S 33 26484 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL
|
||||
Ss 1001 22324 1 20252 1612 0.1 nagios ../../bin/nagios -d /usr/local/nagios/etc/nagios.cfg
|
||||
Ss 0 23336 2319 14452 1756 0.0 sshd sshd: tonvoon [priv]
|
||||
S 1000 23339 23336 14620 1840 0.0 sshd sshd: tonvoon@pts/5
|
||||
Ss 1000 23340 23339 2996 1636 0.0 bash -bash
|
||||
S 0 23367 23340 3020 1628 0.0 bash bash
|
||||
S 1001 23370 23367 3064 1748 0.0 bash bash
|
||||
Ss 1001 23783 1 3220 764 0.0 ndo2db /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
|
||||
Ss 1001 23784 1 6428 4948 0.0 import_ndologsd import_ndologsd
|
||||
S+ 1001 9803 18955 4132 1936 0.0 ssh ssh altinity@cube02.lei.altinity
|
||||
S 1001 22505 22324 20256 1616 0.0 nagios ../../bin/nagios -d /usr/local/nagios/etc/nagios.cfg
|
||||
S 1001 22506 22505 1676 608 0.0 check_ping /usr/local/libexec/check_ping -H 192.168.10.23 -w 3000.0,80% -c 5000.0,100% -p 1
|
||||
S 1001 22507 22506 1660 492 0.0 ping /bin/ping -n -U -w 10 -c 1 192.168.10.23
|
||||
R+ 1001 22508 23370 2308 680 0.0 ps ps axwo stat uid pid ppid vsz rss pcpu comm args
|
||||
130
plugins/utils.c
130
plugins/utils.c
|
|
@ -27,6 +27,8 @@
|
|||
#include "utils_base.h"
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
|
|
@ -239,6 +241,46 @@ is_intnonneg (char *number)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks whether the number in the string _number_ can be put inside a int64_t
|
||||
* On success the number will be written to the _target_ address, if _target_ is not set
|
||||
* to NULL.
|
||||
*/
|
||||
int is_int64(char *number, int64_t *target) {
|
||||
errno = 0;
|
||||
uint64_t tmp = strtoll(number, NULL, 10);
|
||||
if (errno != 0) {
|
||||
return 0;
|
||||
}
|
||||
if (tmp < INT64_MIN || tmp > INT64_MAX) {
|
||||
return 0;
|
||||
}
|
||||
if (target != NULL) {
|
||||
*target = tmp;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks whether the number in the string _number_ can be put inside a uint64_t
|
||||
* On success the number will be written to the _target_ address, if _target_ is not set
|
||||
* to NULL.
|
||||
*/
|
||||
int is_uint64(char *number, uint64_t *target) {
|
||||
errno = 0;
|
||||
uint64_t tmp = strtoll(number, NULL, 10);
|
||||
if (errno != 0) {
|
||||
return 0;
|
||||
}
|
||||
if (tmp < 0 || tmp > UINT64_MAX) {
|
||||
return 0;
|
||||
}
|
||||
if (target != NULL) {
|
||||
*target = tmp;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
is_intpercent (char *number)
|
||||
{
|
||||
|
|
@ -547,10 +589,94 @@ char *perfdata (const char *label,
|
|||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (minp)
|
||||
xasprintf (&data, "%s%ld", data, minv);
|
||||
xasprintf (&data, "%s%ld;", data, minv);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (maxp)
|
||||
xasprintf (&data, "%s;%ld", data, maxv);
|
||||
xasprintf (&data, "%s%ld", data, maxv);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
char *perfdata_uint64 (const char *label,
|
||||
uint64_t val,
|
||||
const char *uom,
|
||||
int warnp, /* Warning present */
|
||||
uint64_t warn,
|
||||
int critp, /* Critical present */
|
||||
uint64_t crit,
|
||||
int minp, /* Minimum present */
|
||||
uint64_t minv,
|
||||
int maxp, /* Maximum present */
|
||||
uint64_t maxv)
|
||||
{
|
||||
char *data = NULL;
|
||||
|
||||
if (strpbrk (label, "'= "))
|
||||
xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
||||
else
|
||||
xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
||||
|
||||
if (warnp)
|
||||
xasprintf (&data, "%s%lu;", data, warn);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (critp)
|
||||
xasprintf (&data, "%s%lu;", data, crit);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (minp)
|
||||
xasprintf (&data, "%s%lu;", data, minv);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (maxp)
|
||||
xasprintf (&data, "%s%lu", data, maxv);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
char *perfdata_int64 (const char *label,
|
||||
int64_t val,
|
||||
const char *uom,
|
||||
int warnp, /* Warning present */
|
||||
int64_t warn,
|
||||
int critp, /* Critical present */
|
||||
int64_t crit,
|
||||
int minp, /* Minimum present */
|
||||
int64_t minv,
|
||||
int maxp, /* Maximum present */
|
||||
int64_t maxv)
|
||||
{
|
||||
char *data = NULL;
|
||||
|
||||
if (strpbrk (label, "'= "))
|
||||
xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
||||
else
|
||||
xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
||||
|
||||
if (warnp)
|
||||
xasprintf (&data, "%s%ld;", data, warn);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (critp)
|
||||
xasprintf (&data, "%s%ld;", data, crit);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (minp)
|
||||
xasprintf (&data, "%s%ld;", data, minv);
|
||||
else
|
||||
xasprintf (&data, "%s;", data);
|
||||
|
||||
if (maxp)
|
||||
xasprintf (&data, "%s%ld", data, maxv);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ suite of plugins. */
|
|||
/* now some functions etc are being defined in ../lib/utils_base.c */
|
||||
#include "utils_base.h"
|
||||
|
||||
|
||||
#ifdef NP_EXTRA_OPTS
|
||||
/* Include extra-opts functions if compiled in */
|
||||
#include "extra_opts.h"
|
||||
|
|
@ -38,6 +39,8 @@ int is_intpos (char *);
|
|||
int is_intneg (char *);
|
||||
int is_intnonneg (char *);
|
||||
int is_intpercent (char *);
|
||||
int is_uint64(char *number, uint64_t *target);
|
||||
int is_int64(char *number, int64_t *target);
|
||||
|
||||
int is_numeric (char *);
|
||||
int is_positive (char *);
|
||||
|
|
@ -88,6 +91,12 @@ void usage_va(const char *fmt, ...) __attribute__((noreturn));
|
|||
char *perfdata (const char *, long int, const char *, int, long int,
|
||||
int, long int, int, long int, int, long int);
|
||||
|
||||
char *perfdata_uint64 (const char *, uint64_t , const char *, int, uint64_t,
|
||||
int, uint64_t, int, uint64_t, int, uint64_t);
|
||||
|
||||
char *perfdata_int64 (const char *, int64_t, const char *, int, int64_t,
|
||||
int, int64_t, int, int64_t, int, int64_t);
|
||||
|
||||
char *fperfdata (const char *, double, const char *, int, double,
|
||||
int, double, int, double, int, double);
|
||||
|
||||
|
|
|
|||
BIN
po/de.gmo
BIN
po/de.gmo
Binary file not shown.
BIN
po/fr.gmo
BIN
po/fr.gmo
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue