Compare commits
No commits in common. "nll-2.8.0" and "upstream" have entirely different histories.
917 changed files with 30103 additions and 144840 deletions
38
.drone.yml
38
.drone.yml
|
@ -1,38 +0,0 @@
|
||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Build Bullseye
|
|
||||||
image: debian:bullseye
|
|
||||||
volumes:
|
|
||||||
- name: finished_files
|
|
||||||
path: /deb_files
|
|
||||||
commands:
|
|
||||||
- apt update
|
|
||||||
- apt -y upgrade
|
|
||||||
- apt -y install --no-install-recommends build-essential equivs devscripts git rename
|
|
||||||
- git clean -f -d -x
|
|
||||||
- mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
|
|
||||||
- dpkg-buildpackage -b -uc
|
|
||||||
- rename 's/\.deb/_bullseye\.deb/' ../*.deb
|
|
||||||
- mkdir -p /deb_files/bullseye/
|
|
||||||
- cp ../*.deb /deb_files/bullseye/
|
|
||||||
- find /deb_files/
|
|
||||||
|
|
||||||
- name: gitea_release
|
|
||||||
image: plugins/gitea-release
|
|
||||||
volumes:
|
|
||||||
- name: finished_files
|
|
||||||
path: /deb_files
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: GITEA_KEY
|
|
||||||
base_url: https://git.neulandlabor.de/
|
|
||||||
files:
|
|
||||||
- /deb_files/bullseye/*
|
|
||||||
when:
|
|
||||||
event: tag
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: finished_files
|
|
||||||
temp: {}
|
|
316
INSTALL
316
INSTALL
|
@ -1,8 +1,8 @@
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||||
Foundation, Inc.
|
Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
@ -12,96 +12,97 @@ without warranty of any kind.
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Briefly, the shell command './configure && make && make install'
|
Briefly, the shell command `./configure && make && make install'
|
||||||
should configure, build, and install this package. The following
|
should configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the 'README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package. Some packages provide this
|
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
|
below. The lack of an optional feature in a given package is not
|
||||||
necessarily a bug. More recommendations for GNU packages can be found
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
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
|
various system-dependent variables used during compilation. It uses
|
||||||
those values to create a 'Makefile' in each directory of the package.
|
those values to create a `Makefile' in each directory of the package.
|
||||||
It may also create one or more '.h' files containing system-dependent
|
It may also create one or more `.h' files containing system-dependent
|
||||||
definitions. Finally, it creates a shell script 'config.status' that
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
you can run in the future to recreate the current configuration, and a
|
you can run in the future to recreate the current configuration, and a
|
||||||
file 'config.log' containing compiler output (useful mainly for
|
file `config.log' containing compiler output (useful mainly for
|
||||||
debugging 'configure').
|
debugging `configure').
|
||||||
|
|
||||||
It can also use an optional file (typically called 'config.cache' and
|
It can also use an optional file (typically called `config.cache'
|
||||||
enabled with '--cache-file=config.cache' or simply '-C') that saves the
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
results of its tests to speed up reconfiguring. Caching is disabled by
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
default to prevent problems with accidental use of stale cache files.
|
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
|
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
|
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
|
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
|
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.
|
may remove or edit it.
|
||||||
|
|
||||||
The file 'configure.ac' (or 'configure.in') is used to create
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
'configure' by a program called 'autoconf'. You need 'configure.ac' if
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
you want to change it or regenerate 'configure' using a newer version of
|
you want to change it or regenerate `configure' using a newer version
|
||||||
'autoconf'.
|
of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
1. 'cd' to the directory containing the package's source code and type
|
1. `cd' to the directory containing the package's source code and type
|
||||||
'./configure' to configure the package for your system.
|
`./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.
|
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.
|
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
|
documentation. When installing into a prefix owned by root, it is
|
||||||
recommended that the package be configured and built as a regular
|
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.
|
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 time using the binaries in their final installed location.
|
||||||
This target does not install anything. Running this target as a
|
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
|
root privileges, verifies that the installation completed
|
||||||
correctly.
|
correctly.
|
||||||
|
|
||||||
6. You can remove the program binaries and object files from the
|
6. You can remove the program binaries and object files from the
|
||||||
source code directory by typing 'make clean'. To also remove the
|
source code directory by typing `make clean'. To also remove the
|
||||||
files that 'configure' created (so you can compile the package for
|
files that `configure' created (so you can compile the package for
|
||||||
a different kind of computer), type 'make distclean'. There is
|
a different kind of computer), type `make distclean'. There is
|
||||||
also a 'make maintainer-clean' target, but that is intended mainly
|
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
|
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
|
all sorts of other programs in order to regenerate files that came
|
||||||
with the distribution.
|
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
|
files again. In practice, not all packages have tested that
|
||||||
uninstallation works correctly, even though it is required by the
|
uninstallation works correctly, even though it is required by the
|
||||||
GNU Coding Standards.
|
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
|
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.
|
This target is generally not run by end users.
|
||||||
|
|
||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
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.
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
You can give 'configure' initial values for configuration parameters
|
You can give `configure' initial values for configuration parameters
|
||||||
by setting variables in the command line or in the environment. Here is
|
by setting variables in the command line or in the environment. Here
|
||||||
an example:
|
is an example:
|
||||||
|
|
||||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
|
@ -112,21 +113,21 @@ Compiling For Multiple Architectures
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
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
|
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
|
directory where you want the object files and executables to go and run
|
||||||
the 'configure' script. 'configure' automatically checks for the source
|
the `configure' script. `configure' automatically checks for the
|
||||||
code in the directory that 'configure' is in and in '..'. This is known
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
as a "VPATH" build.
|
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
|
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.
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
On MacOS X 10.5 and later systems, you can create libraries and
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
executables that work on multiple system types--known as "fat" or
|
executables that work on multiple system types--known as "fat" or
|
||||||
"universal" binaries--by specifying multiple '-arch' options to the
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
compiler but only a single '-arch' option to the preprocessor. Like
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
this:
|
this:
|
||||||
|
|
||||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
@ -135,104 +136,105 @@ this:
|
||||||
|
|
||||||
This is not guaranteed to produce working output in all cases, you
|
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
|
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
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, 'make install' installs the package's commands under
|
By default, `make install' installs the package's commands under
|
||||||
'/usr/local/bin', include files under '/usr/local/include', etc. You
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
can specify an installation prefix other than '/usr/local' by giving
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
'configure' the option '--prefix=PREFIX', where PREFIX must be an
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
absolute file name.
|
absolute file name.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
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.
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
Documentation and other data files still use the regular prefix.
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like '--bindir=DIR' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
kinds of files. Run 'configure --help' for a list of the directories
|
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
|
you can set and what kinds of files go in them. In general, the
|
||||||
for these options is expressed in terms of '${prefix}', so that
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
specifying just '--prefix' will affect all of the other directory
|
specifying just `--prefix' will affect all of the other directory
|
||||||
specifications that were not explicitly provided.
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
The most portable way to affect installation locations is to pass the
|
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
|
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.
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
The first method involves providing an override variable for each
|
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
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
directory configuration variables that were expressed in terms of
|
directory configuration variables that were expressed in terms of
|
||||||
'${prefix}'. Any directories that were specified during 'configure',
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
but not in terms of '${prefix}', must each be overridden at install time
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
for the entire installation to be relocated. The approach of makefile
|
time for the entire installation to be relocated. The approach of
|
||||||
variable overrides for each directory variable is required by the GNU
|
makefile variable overrides for each directory variable is required by
|
||||||
Coding Standards, and ideally causes no recompilation. However, some
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
platforms have known limitations with the semantics of shared libraries
|
However, some platforms have known limitations with the semantics of
|
||||||
that end up requiring recompilation when using this method, particularly
|
shared libraries that end up requiring recompilation when using this
|
||||||
noticeable in packages that use GNU Libtool.
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
The second method involves providing the 'DESTDIR' variable. For
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
example, 'make install DESTDIR=/alternate/directory' will prepend
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
'/alternate/directory' before all installation names. The approach of
|
`/alternate/directory' before all installation names. The approach of
|
||||||
'DESTDIR' overrides is not required by the GNU Coding Standards, and
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
does not work on platforms that have drive letters. On the other hand,
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
it does better at avoiding recompilation issues, and works well even
|
it does better at avoiding recompilation issues, and works well even
|
||||||
when some directory options were not specified in terms of '${prefix}'
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
at 'configure' time.
|
at `configure' time.
|
||||||
|
|
||||||
Optional Features
|
Optional Features
|
||||||
=================
|
=================
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
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
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
Some packages pay attention to '--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
'configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to '--with-PACKAGE' options, where 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
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
'README' should mention any '--enable-' and '--with-' options that the
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
package recognizes.
|
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,
|
find the X include and library files automatically, but if it doesn't,
|
||||||
you can use the 'configure' options '--x-includes=DIR' and
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
'--x-libraries=DIR' to specify their locations.
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
Some packages offer the ability to configure how verbose the
|
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
|
--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
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
overridden with 'make V=0'.
|
overridden with `make V=0'.
|
||||||
|
|
||||||
Particular systems
|
Particular systems
|
||||||
==================
|
==================
|
||||||
|
|
||||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
is not installed, it is recommended to use the following options in
|
CC is not installed, it is recommended to use the following options in
|
||||||
order to use an ANSI C compiler:
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
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
|
HP-UX `make' updates targets which have the same time stamps as
|
||||||
prerequisites, which makes it generally unusable when shipped generated
|
their prerequisites, which makes it generally unusable when shipped
|
||||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
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
|
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
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
workaround. If GNU CC is not installed, it is therefore recommended to
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
try
|
to try
|
||||||
|
|
||||||
./configure CC="cc"
|
./configure CC="cc"
|
||||||
|
|
||||||
|
@ -240,26 +242,26 @@ and if that doesn't work, try
|
||||||
|
|
||||||
./configure CC="cc -nodtk"
|
./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
|
directory contains several dysfunctional programs; working variants of
|
||||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
in your 'PATH', put it _after_ '/usr/bin'.
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
On Haiku, software installed for all users goes in '/boot/common',
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
not '/usr/local'. It is recommended to use the following options:
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
./configure --prefix=/boot/common
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
Specifying the System Type
|
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
|
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
|
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
|
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
|
`--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:
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
@ -268,101 +270,101 @@ where SYSTEM can have one of these forms:
|
||||||
OS
|
OS
|
||||||
KERNEL-OS
|
KERNEL-OS
|
||||||
|
|
||||||
See the file 'config.sub' for the possible values of each field. If
|
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
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
need to know the machine type.
|
need to know the machine type.
|
||||||
|
|
||||||
If you are _building_ compiler tools for cross-compiling, you should
|
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.
|
produce code for.
|
||||||
|
|
||||||
If you want to _use_ a cross compiler, that generates code for a
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
platform different from the build platform, you should specify the
|
platform different from the build platform, you should specify the
|
||||||
"host" platform (i.e., that on which the generated programs will
|
"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
|
Sharing Defaults
|
||||||
================
|
================
|
||||||
|
|
||||||
If you want to set default values for 'configure' scripts to share,
|
If you want to set default values for `configure' scripts to share,
|
||||||
you can create a site shell script called 'config.site' that gives
|
you can create a site shell script called `config.site' that gives
|
||||||
default values for variables like 'CC', 'cache_file', and 'prefix'.
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
'configure' looks for 'PREFIX/share/config.site' if it exists, then
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
'PREFIX/etc/config.site' if it exists. Or, you can set the
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
'CONFIG_SITE' environment variable to the location of the site script.
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
A warning: not all 'configure' scripts look for a site script.
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
Defining Variables
|
Defining Variables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
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
|
configure again during the build, and the customized values of these
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
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
|
./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).
|
overridden in the site shell script).
|
||||||
|
|
||||||
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
Autoconf limitation. Until the limitation is lifted, you can use this
|
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||||
workaround:
|
this workaround:
|
||||||
|
|
||||||
CONFIG_SHELL=/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.
|
operates.
|
||||||
|
|
||||||
'--help'
|
`--help'
|
||||||
'-h'
|
`-h'
|
||||||
Print a summary of all of the options to 'configure', and exit.
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
'--help=short'
|
`--help=short'
|
||||||
'--help=recursive'
|
`--help=recursive'
|
||||||
Print a summary of the options unique to this package's
|
Print a summary of the options unique to this package's
|
||||||
'configure', and exit. The 'short' variant lists options used only
|
`configure', and exit. The `short' variant lists options used
|
||||||
in the top level, while the 'recursive' variant lists options also
|
only in the top level, while the `recursive' variant lists options
|
||||||
present in any nested packages.
|
also present in any nested packages.
|
||||||
|
|
||||||
'--version'
|
`--version'
|
||||||
'-V'
|
`-V'
|
||||||
Print the version of Autoconf used to generate the 'configure'
|
Print the version of Autoconf used to generate the `configure'
|
||||||
script, and exit.
|
script, and exit.
|
||||||
|
|
||||||
'--cache-file=FILE'
|
`--cache-file=FILE'
|
||||||
Enable the cache: use and save the results of the tests in 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.
|
disable caching.
|
||||||
|
|
||||||
'--config-cache'
|
`--config-cache'
|
||||||
'-C'
|
`-C'
|
||||||
Alias for '--cache-file=config.cache'.
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
'--quiet'
|
`--quiet'
|
||||||
'--silent'
|
`--silent'
|
||||||
'-q'
|
`-q'
|
||||||
Do not print messages saying which checks are being made. To
|
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).
|
messages will still be shown).
|
||||||
|
|
||||||
'--srcdir=DIR'
|
`--srcdir=DIR'
|
||||||
Look for the package's source code in directory DIR. Usually
|
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'
|
`--prefix=DIR'
|
||||||
Use DIR as the installation prefix. *note Installation Names:: for
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
more details, including other options available for fine-tuning the
|
for more details, including other options available for fine-tuning
|
||||||
installation locations.
|
the installation locations.
|
||||||
|
|
||||||
'--no-create'
|
`--no-create'
|
||||||
'-n'
|
`-n'
|
||||||
Run the configure checks, but stop before creating any output
|
Run the configure checks, but stop before creating any output
|
||||||
files.
|
files.
|
||||||
|
|
||||||
'configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
'configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
63
INSTALL.nut
63
INSTALL.nut
|
@ -1,13 +1,11 @@
|
||||||
Installation instructions
|
Installation instructions
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
This chapter describes the various methods for installing Network UPS Tools.
|
This chapter describe the various methods for installing Network UPS Tools.
|
||||||
|
|
||||||
Whenever it is possible, prefer <<Installing_packages, installing from packages>>.
|
Whenever it is possible, prefer <<Installing_packages, installing from packages>>.
|
||||||
Packagers have done an excellent and hard work at improving NUT integration into
|
Packagers have done an excellent and hard work at improving NUT integration into
|
||||||
their system. On the other hand, distributions and appliances tend to package
|
their system.
|
||||||
"official releases" of projects such as NUT, and so do not deliver latest and
|
|
||||||
greatest fixes, new drivers, bugs and other features.
|
|
||||||
|
|
||||||
[[Installing_source]]
|
[[Installing_source]]
|
||||||
Installing from source
|
Installing from source
|
||||||
|
@ -18,13 +16,6 @@ These are the essential steps for compiling and installing this software.
|
||||||
The NUT linkdoc:packager-guide[Packager Guide], which presents the best
|
The NUT linkdoc:packager-guide[Packager Guide], which presents the best
|
||||||
practices for installing and integrating NUT, is also a good reading.
|
practices for installing and integrating NUT, is also a good reading.
|
||||||
|
|
||||||
The link:config-prereqs.txt[Prerequisites for building NUT on different OSes]
|
|
||||||
document suggests prerequisite packages with tools and dependencies
|
|
||||||
available and needed to build and test as much as possible of NUT on
|
|
||||||
numerous platforms, written from perspective of CI testing (if you
|
|
||||||
are interested in getting updated drivers for a particular device,
|
|
||||||
you might select a sub-set of those suggestions).
|
|
||||||
|
|
||||||
[NOTE]
|
[NOTE]
|
||||||
.Keep in mind that...
|
.Keep in mind that...
|
||||||
================================================================================
|
================================================================================
|
||||||
|
@ -61,7 +52,7 @@ long as you are consistent.
|
||||||
The process for doing this varies from one system to the next, and
|
The process for doing this varies from one system to the next, and
|
||||||
explaining how to add users is beyond the scope of this document.
|
explaining how to add users is beyond the scope of this document.
|
||||||
|
|
||||||
For the purposes of this document, the user name and group name
|
For the purposes of this document, the user name and group name
|
||||||
will be 'ups' and 'nut' respectively.
|
will be 'ups' and 'nut' respectively.
|
||||||
|
|
||||||
Be sure the new user is a member of the new group! If you forget to
|
Be sure the new user is a member of the new group! If you forget to
|
||||||
|
@ -96,7 +87,7 @@ docs/configure.txt or './configure --help' for all the available
|
||||||
options.
|
options.
|
||||||
|
|
||||||
If you alter paths with additional switches, be sure to use those
|
If you alter paths with additional switches, be sure to use those
|
||||||
new paths while reading the rest of the steps.
|
new paths while reading the rest of the steps.
|
||||||
|
|
||||||
Reference: <<Configure_options,Configure options>> from the
|
Reference: <<Configure_options,Configure options>> from the
|
||||||
User Manual.
|
User Manual.
|
||||||
|
@ -109,7 +100,7 @@ Build the programs
|
||||||
|
|
||||||
This will build the NUT client and server programs and the
|
This will build the NUT client and server programs and the
|
||||||
selected drivers. It will also build any other features that were
|
selected drivers. It will also build any other features that were
|
||||||
selected during <<Configuration,configuration>> step above.
|
selected during <<Configuration,configuration>> step above.
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
@ -184,7 +175,7 @@ permissions for the USB device, you may need to set up (operating
|
||||||
system dependent) hotplugging scripts. Sample scripts and
|
system dependent) hotplugging scripts. Sample scripts and
|
||||||
information are provided in the scripts/hotplug and
|
information are provided in the scripts/hotplug and
|
||||||
scripts/udev directories. For most users, the hotplugging scripts
|
scripts/udev directories. For most users, the hotplugging scripts
|
||||||
will be installed automatically by "make install".
|
will be installed automatically by "make install".
|
||||||
|
|
||||||
(If you want to try if a driver works without setting up
|
(If you want to try if a driver works without setting up
|
||||||
hotplugging, you can add the "-u root" option to upsd, upsmon, and
|
hotplugging, you can add the "-u root" option to upsd, upsmon, and
|
||||||
|
@ -301,47 +292,25 @@ You can either install NUT as a binary package or as a port.
|
||||||
Binary package
|
Binary package
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
To install NUT as a package execute:
|
To install the main component, use the following command:
|
||||||
|
|
||||||
# pkg install nut
|
# pkg_add -r nut
|
||||||
|
|
||||||
Port
|
Port
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
The port is located under +sysutils/nut+.
|
The port is located under /usr/ports/sysutils/nut.
|
||||||
Use +make config+ to select configuration options, e.g. to build the optional CGI scripts.
|
To install it, use the following command:
|
||||||
To install it, use:
|
|
||||||
|
|
||||||
# make install clean
|
# cd /usr/ports/sysutils/nut/ && make install clean
|
||||||
|
|
||||||
USB UPS on FreeBSD
|
You have to define WITH_NUT_CGI to build the optional CGI scripts.
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
For USB UPS devices the NUT package/port installs devd rules in +/usr/local/etc/devd/nut-usb.conf+ to set USB device permissions. 'devd' needs to be restarted for these rules to apply:
|
Optionally, you can also install the following ports:
|
||||||
|
|
||||||
# service devd restart
|
- sysutils/nut-snmp, for the SNMP driver,
|
||||||
|
- sysutils/nut-usb, for the USB drivers,
|
||||||
(Re-)connect the device after restarting 'devd' and check that the USB device has the proper
|
- sysutils/nut-libupsclient, for the upsclient library.
|
||||||
permissions. Check the last entries of the system message buffer. You should
|
|
||||||
find an entry like
|
|
||||||
|
|
||||||
# dmesg | tail
|
|
||||||
[...]
|
|
||||||
ugen0.2: <INNO TECH USB to Serial> at usbus0
|
|
||||||
|
|
||||||
The device file must be owned by group +uucp+ and must be group
|
|
||||||
read-/writable. In the example from above this would be
|
|
||||||
|
|
||||||
# ls -Ll /dev/ugen0.2
|
|
||||||
crw-rw---- 1 root uucp 0xa5 Mar 12 10:33 /dev/ugen0.2
|
|
||||||
|
|
||||||
If the permissions are not correct, verify that your device is registered in
|
|
||||||
+/usr/local/etc/devd/nut-usb.conf+. The vendor and product id can be found
|
|
||||||
using:
|
|
||||||
|
|
||||||
# usbconfig -u 0 -a 2 dump_device_desc
|
|
||||||
|
|
||||||
where +-u+ specifies the USB bus number and +-a+ specifies the USB device index.
|
|
||||||
|
|
||||||
|
|
||||||
You are now ready to configure NUT, and start testing and using it.
|
You are now ready to configure NUT, and start testing and using it.
|
||||||
|
|
|
@ -38,7 +38,7 @@ S: Maintained: apcsmart, belkin, bestups, cyberpower, dummycons,
|
||||||
P: Arnaud Quette
|
P: Arnaud Quette
|
||||||
M: aquette.dev@gmail.com
|
M: aquette.dev@gmail.com
|
||||||
M: ArnaudQuette@eaton.com
|
M: ArnaudQuette@eaton.com
|
||||||
S: Maintained or Supported: dummy-ups, usbhid-ups, mge-shut
|
S: Maintained or Supported: dummy-ups, usbhid-ups, mge-shut, newmge-shut
|
||||||
mge-utalk, snmp-ups, ...
|
mge-utalk, snmp-ups, ...
|
||||||
|
|
||||||
P: Fabio Di Niro
|
P: Fabio Di Niro
|
||||||
|
|
267
Makefile.am
267
Makefile.am
|
@ -5,33 +5,23 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# subdirectories to build and distribute. The order matters, as
|
# subdirectories to build and distribute. The order matters, as
|
||||||
# several subdirectories depend on stuff in "common" or tools being built first
|
# several subdirectories depend on stuff in "common" or tools being built first
|
||||||
SUBDIRS = include common clients conf data docs drivers tools \
|
SUBDIRS = include common clients conf data tools docs drivers \
|
||||||
lib scripts server tests
|
lib scripts server tests
|
||||||
|
|
||||||
# Automatically update the libtool script if it becomes out-of-date
|
|
||||||
# See https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
|
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
libtool: $(LIBTOOL_DEPS)
|
|
||||||
$(SHELL) ./config.status libtool
|
|
||||||
|
|
||||||
# COPYING is included automatically.
|
# COPYING is included automatically.
|
||||||
EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING
|
EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# flags to pass to ./configure when calling "make distcheck" and "make
|
# flags to pass to ./configure when calling "make distcheck" and "make
|
||||||
# distcheck-light". Try to check as many features as possible! Also
|
# distcheck-light". Try to check as many features as possible! Also
|
||||||
# need to give augeas-lenses-dir, hotplug-dir and udev-dir, so that
|
# need to give hotplug-dir and udev-dir, so that staged install does
|
||||||
# staged install does not fail.
|
# not fail.
|
||||||
|
|
||||||
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
||||||
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
||||||
DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='$(CXXFLAGS) -g' CFLAGS='$(CFLAGS) -g'
|
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
||||||
--with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \
|
--with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \
|
||||||
--with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \
|
|
||||||
--with-systemdtmpfilesdir='$${prefix}/usr/lib/tmpfiles.d' \
|
|
||||||
--with-augeas-lenses-dir='$${prefix}/usr/share/augeas/lenses' \
|
|
||||||
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
||||||
--with-udev-dir='$${prefix}/etc/udev' \
|
--with-udev-dir='$${prefix}/etc/udev' \
|
||||||
--with-devd-dir='$${prefix}/etc/devd'
|
--with-devd-dir='$${prefix}/etc/devd'
|
||||||
|
@ -39,10 +29,6 @@ DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
||||||
distcheck-light:
|
distcheck-light:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
||||||
|
|
||||||
# Make a distcheck (and check in particular) with enabled valgrind and debug info
|
|
||||||
memcheck distcheck-valgrind:
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck
|
|
||||||
|
|
||||||
# workaround the dist generated files that are also part of the distribution
|
# workaround the dist generated files that are also part of the distribution
|
||||||
# Note that distcleancheck is disabled for now, while waiting for a proper
|
# Note that distcleancheck is disabled for now, while waiting for a proper
|
||||||
# solution, that do not break older unix systems
|
# solution, that do not break older unix systems
|
||||||
|
@ -51,150 +37,9 @@ memcheck distcheck-valgrind:
|
||||||
distcleancheck:
|
distcleancheck:
|
||||||
@:
|
@:
|
||||||
|
|
||||||
# Quick alias for root dir recipe:
|
|
||||||
realclean: maintainer-clean
|
|
||||||
|
|
||||||
# Files made by our targets:
|
|
||||||
CLEANFILES = *-spellchecked cppcheck*.xml
|
|
||||||
DISTCLEANFILES = ChangeLog
|
|
||||||
|
|
||||||
# Most of the files generated by custom rules in the configure script
|
|
||||||
# or by autogen.sh are cleaned by the Makefile.am in their directories.
|
|
||||||
# Files below are re-created by running `configure` script and may be
|
|
||||||
# wiped by a `make distclean`:
|
|
||||||
DISTCLEANFILES += config.log configure~
|
|
||||||
#???# configure.ac~
|
|
||||||
DISTCLEANFILES += include/config.h.in~
|
|
||||||
|
|
||||||
# Files made by autotools and common rituals of the configure script,
|
|
||||||
# these are needed to run the configure script itself so are not wiped
|
|
||||||
# by a mere `make distclean`; most of these are copied by autotools
|
|
||||||
# from their installation, or made by `automake` etc. on the system
|
|
||||||
# which generates `configure`; rebuilding NUT after deleting these
|
|
||||||
# requires `autogen.sh` script to be re-run (and tools available):
|
|
||||||
MAINTAINERCLEANFILES = INSTALL
|
|
||||||
MAINTAINERCLEANFILES += aclocal.m4 config.guess config.sub
|
|
||||||
MAINTAINERCLEANFILES += configure
|
|
||||||
MAINTAINERCLEANFILES += depcomp install-sh ltmain.sh test-driver
|
|
||||||
MAINTAINERCLEANFILES += m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
|
|
||||||
MAINTAINERCLEANFILES += Makefile.in .dirstamp include/config.h.in
|
|
||||||
|
|
||||||
# Executed after default rules
|
|
||||||
maintainer-clean-local:
|
|
||||||
rm -f missing || true
|
|
||||||
|
|
||||||
# Do not let $SUBDIRS/Makefile rules delete their local .deps because
|
|
||||||
# this breaks our ability to clean up (e.g. some common/.../*.Plo files
|
|
||||||
# are included by generated Makefiles from other subdirectories, so they
|
|
||||||
# should be available during their clean-up). Just in case, we make sure
|
|
||||||
# here that their sub-distcleans complete first.
|
|
||||||
distclean-local:
|
|
||||||
@for DIR in $(SUBDIRS) ; do \
|
|
||||||
if test -f "$${DIR}/Makefile" ; then \
|
|
||||||
echo " DISTCLEAN in $${DIR}" >&2 ; \
|
|
||||||
( cd "$${DIR}" && $(MAKE) -s distclean ) || exit ; \
|
|
||||||
fi ; \
|
|
||||||
done
|
|
||||||
rm -rf .inst tmp autom4te.cache
|
|
||||||
find "$(builddir)" -type d -name '.deps' | while read DIR ; do rm -rf "$${DIR}" ; done
|
|
||||||
|
|
||||||
# Hook the documentation building and validating recipes
|
|
||||||
# Note: these are optionally available (as determined during configure runs)
|
|
||||||
spellcheck spellcheck-interactive:
|
|
||||||
@RES=0; \
|
|
||||||
(cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/data && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
exit $$RES
|
|
||||||
|
|
||||||
# Note: the "all-docs" and "check-docs" targets may require tools not
|
|
||||||
# found by `configure` script (and so avoided by conventional recipes)
|
|
||||||
# such as PDF generators, so it should only be called at developer's
|
|
||||||
# discretion, choice and risk. The "check-man" targets covers source
|
|
||||||
# texts, man pages and HTML rendering of man pages, as enabled by tools.
|
|
||||||
doc spellcheck-sortdict \
|
|
||||||
all-docs check-docs \
|
|
||||||
man all-man man-man check-man man-html all-html:
|
|
||||||
cd $(builddir)/docs && $(MAKE) $@
|
|
||||||
|
|
||||||
check-NIT check-NIT-devel:
|
|
||||||
cd $(builddir)/tests/NIT && $(MAKE) $@
|
|
||||||
|
|
||||||
# This target adds syntax-checking for committed shell script files,
|
|
||||||
# to avoid surprises and delays in finding fatal typos after packaging
|
|
||||||
###
|
|
||||||
### Note: currently, shellcheck target calls check-scripts-syntax
|
|
||||||
### so when both are invoked at once, in the end the check is only
|
|
||||||
### executed once. Later it is anticipated that shellcheck would
|
|
||||||
### be implemented by requiring, configuring and calling the tool
|
|
||||||
### named "shellcheck" for even more code inspection and details.
|
|
||||||
### Still, there remains value in also checking the script syntax
|
|
||||||
### by the very version of the shell interpreter that would run
|
|
||||||
### these scripts in production usage of the resulting packages.
|
|
||||||
###
|
|
||||||
check-scripts-syntax:
|
|
||||||
@echo 'NOTE: modern bash complains about scripts using backticks (warning not error), which we ignore in NUT codebase for portability reasons: `...` obsolete, use $$(...)'
|
|
||||||
@RUNBASH=bash; if [ -x /bin/bash ]; then RUNBASH=/bin/bash ; else if [ -x /usr/bin/env ] ; then RUNBASH="/usr/bin/env bash"; fi; fi ; \
|
|
||||||
for F in `git ls-files || find . -type f` ; do \
|
|
||||||
case "`file "$$F"`" in \
|
|
||||||
*"Bourne-Again shell script"*) ( set -x ; $$RUNBASH -n "$$F" ; ) ;; \
|
|
||||||
*"POSIX shell script"*|*"shell script"*) ( set -x ; /bin/sh -n "$$F" ; ) ;; \
|
|
||||||
esac || { RES=$$? ; echo "ERROR: Syntax check failed for script file: $$F" >&2 ; exit $$RES ; } ; \
|
|
||||||
done
|
|
||||||
@echo 'SUCCESS: Shell scripts syntax is acceptable, no fatal issues were found'
|
|
||||||
|
|
||||||
shellcheck-disclaimer:
|
|
||||||
@echo "==============================================================================="
|
|
||||||
@echo "NOTICE: 'make shellcheck' is currently an alias for 'make check-scripts-syntax'"
|
|
||||||
@echo "Later it may become a call to the real shellcheck tool (if available on the"
|
|
||||||
@echo "build system during the configure phase)"
|
|
||||||
@echo "==============================================================================="
|
|
||||||
|
|
||||||
# Note: currently not part of shellcheck target, because the script below
|
|
||||||
# can test the logic with numerous SHELL_PROGS in a CI setting, and because
|
|
||||||
# check-scripts-syntax probably has checked the basic syntax above already.
|
|
||||||
shellcheck-nde:
|
|
||||||
cd $(srcdir)/tests && SERVICE_FRAMEWORK="selftest" ./nut-driver-enumerator-test.sh
|
|
||||||
|
|
||||||
shellcheck: shellcheck-disclaimer check-scripts-syntax
|
|
||||||
|
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
if HAVE_CPPCHECK
|
|
||||||
cppcheck: cppcheck-cxx11.xml cppcheck-c99.xml
|
|
||||||
|
|
||||||
# Let the analysis get regenerated due to any change in source;
|
|
||||||
# but note that with our different make implementations to support,
|
|
||||||
# we can not either $(shell find ...) nor blindly say e.g. *.cpp
|
|
||||||
# for each FS structure layer because e.g. there are no ./*.cpp
|
|
||||||
# in the root dir of the codebase (and so make complains there is
|
|
||||||
# `No rule to make target `*.cpp', needed by `cppcheck-cxx11.xml'`)
|
|
||||||
#
|
|
||||||
# Note that the actual `cppcheck` scan finds all files it likes
|
|
||||||
# (so if CPPCHECK_SRC_* misses something, it just won't trigger
|
|
||||||
# automagically a rebuild of the XML in developer working cycles).
|
|
||||||
CPPCHECK_SRC_H = $(top_srcdir)/*/*.h $(top_srcdir)/*/*/*.h
|
|
||||||
# CPPCHECK_SRC_H += $(top_srcdir)/*.h
|
|
||||||
|
|
||||||
CPPCHECK_SRC_C = $(top_srcdir)/*/*.c $(top_srcdir)/*/*/*.c
|
|
||||||
# CPPCHECK_SRC_C += $(top_srcdir)/*.cpp
|
|
||||||
|
|
||||||
CPPCHECK_SRC_CXX = $(top_srcdir)/*/*.cpp
|
|
||||||
# CPPCHECK_SRC_CXX += $(top_srcdir)/*.cpp $(top_srcdir)/*/*/*.cpp
|
|
||||||
|
|
||||||
cppcheck-cxx11.xml: $(CPPCHECK_SRC_CXX) $(CPPCHECK_SRC_H)
|
|
||||||
$(CPPCHECK) --std=c++11 --enable=all --inconclusive --xml --xml-version=2 . 2>$@
|
|
||||||
|
|
||||||
cppcheck-c99.xml: $(CPPCHECK_SRC_C) $(CPPCHECK_SRC_H)
|
|
||||||
$(CPPCHECK) --std=c99 --enable=all --inconclusive --xml --xml-version=2 . 2>$@
|
|
||||||
else !HAVE_CPPCHECK
|
|
||||||
cppcheck:
|
|
||||||
@echo "CPPCHECK analysis not available since 'cppcheck' was not found."
|
|
||||||
endif !HAVE_CPPCHECK
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Automatically generate the ChangeLog from Git logs:
|
# Automatically generate the ChangeLog from Git logs:
|
||||||
MAINTAINERCLEANFILES += ChangeLog
|
MAINTAINERCLEAN_FILES = ChangeLog
|
||||||
|
|
||||||
# Older boundary of the ChangeLog commits range
|
# Older boundary of the ChangeLog commits range
|
||||||
# It can be a tag ('v2.2.0'), a commit hash, a date, ...
|
# It can be a tag ('v2.2.0'), a commit hash, a date, ...
|
||||||
|
@ -203,30 +48,18 @@ GITLOG_START_POINT=v2.6.0
|
||||||
|
|
||||||
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
|
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
|
||||||
# in case it has already been generated previously
|
# in case it has already been generated previously
|
||||||
# Note that the script is hard-coded to generate "ChangeLog" in the current dir
|
|
||||||
dummy-stamp:
|
dummy-stamp:
|
||||||
ChangeLog: tools/gitlog2changelog.py dummy-stamp
|
ChangeLog: tools/gitlog2changelog.py dummy-stamp
|
||||||
cd $(top_builddir) && \
|
$(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \
|
||||||
./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \
|
echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@
|
||||||
{ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; }
|
|
||||||
|
|
||||||
nut_version.h include/nut_version.h:
|
|
||||||
cd $(abs_top_builddir)/include && $(MAKE) nut_version.h
|
|
||||||
|
|
||||||
tools/gitlog2changelog.py: tools/gitlog2changelog.py.in
|
|
||||||
cd $(@D) && $(MAKE) -s $(@F)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Maintainers targets: distribution signature and hashes
|
# Maintainers targets: distribution signature and hashes
|
||||||
nut-@PACKAGE_VERSION@.tar.gz: dist
|
dist-sig:
|
||||||
nut-@PACKAGE_VERSION@.tar.gz.sig: dist-sig
|
|
||||||
nut-@PACKAGE_VERSION@.tar.gz.md5 nut-@PACKAGE_VERSION@.tar.gz.sha256: dist-hash
|
|
||||||
|
|
||||||
dist-sig: nut-@PACKAGE_VERSION@.tar.gz
|
|
||||||
rm -f nut-@PACKAGE_VERSION@.tar.gz.sig
|
rm -f nut-@PACKAGE_VERSION@.tar.gz.sig
|
||||||
gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz
|
gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz
|
||||||
|
|
||||||
dist-hash: nut-@PACKAGE_VERSION@.tar.gz
|
dist-hash:
|
||||||
md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5
|
md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5
|
||||||
sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256
|
sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256
|
||||||
|
|
||||||
|
@ -268,7 +101,7 @@ install-dirs:
|
||||||
@echo "Warning: 'make install-dirs' is deprecated."
|
@echo "Warning: 'make install-dirs' is deprecated."
|
||||||
@echo "Use 'make installdirs' instead."
|
@echo "Use 'make installdirs' instead."
|
||||||
@echo $(WARN)
|
@echo $(WARN)
|
||||||
$(MAKE) installdirs
|
make installdirs
|
||||||
cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
|
cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
|
||||||
install-cgi-man install-cgi-conf install-cgi-html:
|
install-cgi-man install-cgi-conf install-cgi-html:
|
||||||
@echo "Error: 'make $@' no longer exists."
|
@echo "Error: 'make $@' no longer exists."
|
||||||
|
@ -284,65 +117,23 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
|
||||||
@echo "Use './configure --with-snmp' instead."
|
@echo "Use './configure --with-snmp' instead."
|
||||||
setver:
|
setver:
|
||||||
@echo "Error: 'make setver' no longer exists."
|
@echo "Error: 'make setver' no longer exists."
|
||||||
@echo "Edit configure.ac to set version number."
|
@echo "Edit configure.in to set version number."
|
||||||
|
package:
|
||||||
# Clean the dist tarball and packages
|
if test `uname -s` = "HP-UX"; then \
|
||||||
MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz
|
cd scripts/HP-UX; \
|
||||||
# HP-UX:
|
make package; \
|
||||||
MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@PACKAGE_VERSION@.depot
|
mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
|
||||||
# AIX as below, and RedHat-compatible (cover binary and source packages):
|
elif test `uname -s` = "SunOS"; then \
|
||||||
MAINTAINERCLEANFILES_PACKAGES += nut*rpm
|
make; \
|
||||||
# Debian-compatible (cover binary and source packages):
|
rm -rf @prefix@; \
|
||||||
MAINTAINERCLEANFILES_PACKAGES += nut*deb
|
make install; \
|
||||||
# Solaris SVR4 package archives:
|
cd scripts/Solaris; \
|
||||||
MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@PACKAGE_VERSION@.local.gz
|
make package; \
|
||||||
# Newer Solaris IPS (aka "pkg(5)" format archives)
|
make uninstall; \
|
||||||
MAINTAINERCLEANFILES_PACKAGES += *.p5p
|
rm -rf @prefix@; \
|
||||||
|
elif test `uname -s` = "AIX"; then \
|
||||||
MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_DISTBALL)
|
make dist; \
|
||||||
MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_PACKAGES)
|
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \
|
||||||
|
cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \
|
||||||
package: dist
|
rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \
|
||||||
DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \
|
fi;
|
||||||
rm -rf "$$DESTDIR"; \
|
|
||||||
case "`uname -s`" in \
|
|
||||||
"HP-UX") \
|
|
||||||
( cd scripts/HP-UX && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \
|
|
||||||
mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \
|
|
||||||
"SunOS") \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \
|
|
||||||
( cd scripts/Solaris && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package ) && \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" uninstall && \
|
|
||||||
rm -rf "$$DESTDIR" || \
|
|
||||||
{ echo "FAILED to produce SunOS packages, inspect '$$DESTDIR' for clues" >&2 ; exit 1; } ;; \
|
|
||||||
"AIX") \
|
|
||||||
if test -d /usr/src/packages/SPECS -a -w /usr/src/packages/SPECS ; then : ; else echo "Can not write to /usr/src/packages/SPECS" >&2 ; exit 1; fi ; \
|
|
||||||
if test -d /usr/src/packages/SOURCES -a -w /usr/src/packages/SOURCES ; then : ; else echo "Can not write to /usr/src/packages/SOURCES" >&2 ; exit 1; fi ; \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) dist && \
|
|
||||||
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS && \
|
|
||||||
cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES && \
|
|
||||||
rpm -ba /usr/src/packages/SPECS/nut-aix.spec && \
|
|
||||||
mv /usr/src/packages/RPMS/nut*rpm $(abs_top_builddir)/ ;; \
|
|
||||||
*) echo "Unsupported OS for 'make $@' (no recipe bound)" >&2; exit 1;; \
|
|
||||||
esac
|
|
||||||
|
|
||||||
print-MAINTAINERCLEANFILES print-REALCLEANFILES:
|
|
||||||
@echo $(MAINTAINERCLEANFILES)
|
|
||||||
|
|
||||||
print-DISTCLEANFILES:
|
|
||||||
@echo $(DISTCLEANFILES)
|
|
||||||
|
|
||||||
# TODO: Recursive mode to consider patterns defined in sub-dir makefiles
|
|
||||||
git-realclean-check:
|
|
||||||
@if test -e .git && (command -v git); then \
|
|
||||||
git status --ignored || while read F ; do \
|
|
||||||
for P in $(MAINTAINERCLEANFILES) ; do \
|
|
||||||
case "$$F" in \
|
|
||||||
*/$$P) exit 1 ;; \
|
|
||||||
esac ; \
|
|
||||||
done; \
|
|
||||||
done ; \
|
|
||||||
fi
|
|
||||||
|
|
427
Makefile.in
427
Makefile.in
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -16,17 +16,7 @@
|
||||||
|
|
||||||
# top-level Makefile for NUT
|
# top-level Makefile for NUT
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -91,24 +81,27 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = .
|
subdir = .
|
||||||
|
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
||||||
|
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(top_srcdir)/configure $(am__configure_deps) \
|
||||||
|
$(top_srcdir)/scripts/Aix/nut-aix.spec.in \
|
||||||
|
$(top_srcdir)/scripts/avahi/nut.service.in \
|
||||||
|
$(top_srcdir)/scripts/HP-UX/nut.psf.in \
|
||||||
|
$(top_srcdir)/scripts/HP-UX/postinstall.in \
|
||||||
|
$(top_srcdir)/scripts/ufw/nut.ufw.profile.in COPYING TODO \
|
||||||
|
compile config.guess config.sub depcomp install-sh missing \
|
||||||
|
ltmain.sh
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -117,29 +110,18 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(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 \
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
configure.lineno config.status.lineno
|
configure.lineno config.status.lineno
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES = scripts/Aix/nut-aix.spec \
|
CONFIG_CLEAN_FILES = scripts/Aix/nut-aix.spec \
|
||||||
scripts/avahi/nut.service scripts/HP-UX/nut.psf \
|
scripts/avahi/nut.service scripts/HP-UX/nut.psf \
|
||||||
scripts/python/module/PyNUT.py scripts/Aix/nut.init \
|
scripts/HP-UX/postinstall scripts/ufw/nut.ufw.profile
|
||||||
scripts/HP-UX/postinstall \
|
|
||||||
scripts/python/app/NUT-Monitor-py2gtk2 \
|
|
||||||
scripts/python/app/NUT-Monitor-py3qt5 \
|
|
||||||
scripts/python/module/test_nutclient.py
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
@ -175,7 +157,7 @@ am__recursive_targets = \
|
||||||
$(RECURSIVE_CLEAN_TARGETS) \
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
$(am__extra_recursive_targets)
|
$(am__extra_recursive_targets)
|
||||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
cscope distdir distdir-am dist dist-all distcheck
|
cscope distdir dist dist-all distcheck
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
# Read a list of newline-separated strings from the standard input,
|
# Read a list of newline-separated strings from the standard input,
|
||||||
# and print each of them once, without duplicates. Input order is
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
@ -197,18 +179,6 @@ ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
CSCOPE = cscope
|
CSCOPE = cscope
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
|
||||||
$(top_srcdir)/scripts/Aix/nut-aix.spec.in \
|
|
||||||
$(top_srcdir)/scripts/Aix/nut.init.in \
|
|
||||||
$(top_srcdir)/scripts/HP-UX/nut.psf.in \
|
|
||||||
$(top_srcdir)/scripts/HP-UX/postinstall.in \
|
|
||||||
$(top_srcdir)/scripts/avahi/nut.service.in \
|
|
||||||
$(top_srcdir)/scripts/python/app/NUT-Monitor-py2gtk2.in \
|
|
||||||
$(top_srcdir)/scripts/python/app/NUT-Monitor-py3qt5.in \
|
|
||||||
$(top_srcdir)/scripts/python/module/PyNUT.py.in \
|
|
||||||
$(top_srcdir)/scripts/python/module/test_nutclient.py.in \
|
|
||||||
AUTHORS COPYING ChangeLog INSTALL NEWS README TODO compile \
|
|
||||||
config.guess config.sub depcomp install-sh ltmain.sh missing
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
top_distdir = $(distdir)
|
top_distdir = $(distdir)
|
||||||
|
@ -247,8 +217,6 @@ am__relativize = \
|
||||||
DIST_ARCHIVES = $(distdir).tar.gz
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
DIST_TARGETS = dist-gzip
|
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
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||||
|
@ -260,7 +228,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -271,7 +238,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -285,7 +251,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -298,7 +263,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -316,8 +280,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -328,32 +290,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
|
||||||
# Automatically update the libtool script if it becomes out-of-date
|
|
||||||
# See https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
|
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -373,9 +324,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -389,7 +337,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -407,7 +354,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -421,9 +367,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -449,14 +392,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -472,7 +413,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# subdirectories to build and distribute. The order matters, as
|
# subdirectories to build and distribute. The order matters, as
|
||||||
# several subdirectories depend on stuff in "common" or tools being built first
|
# several subdirectories depend on stuff in "common" or tools being built first
|
||||||
SUBDIRS = include common clients conf data docs drivers tools \
|
SUBDIRS = include common clients conf data tools docs drivers \
|
||||||
lib scripts server tests
|
lib scripts server tests
|
||||||
|
|
||||||
|
|
||||||
|
@ -482,62 +423,20 @@ EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# flags to pass to ./configure when calling "make distcheck" and "make
|
# flags to pass to ./configure when calling "make distcheck" and "make
|
||||||
# distcheck-light". Try to check as many features as possible! Also
|
# distcheck-light". Try to check as many features as possible! Also
|
||||||
# need to give augeas-lenses-dir, hotplug-dir and udev-dir, so that
|
# need to give hotplug-dir and udev-dir, so that staged install does
|
||||||
# staged install does not fail.
|
# not fail.
|
||||||
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
||||||
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
||||||
DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='$(CXXFLAGS) -g' CFLAGS='$(CFLAGS) -g'
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
||||||
--with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \
|
--with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \
|
||||||
--with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \
|
|
||||||
--with-systemdtmpfilesdir='$${prefix}/usr/lib/tmpfiles.d' \
|
|
||||||
--with-augeas-lenses-dir='$${prefix}/usr/share/augeas/lenses' \
|
|
||||||
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
||||||
--with-udev-dir='$${prefix}/etc/udev' \
|
--with-udev-dir='$${prefix}/etc/udev' \
|
||||||
--with-devd-dir='$${prefix}/etc/devd'
|
--with-devd-dir='$${prefix}/etc/devd'
|
||||||
|
|
||||||
|
|
||||||
# Files made by our targets:
|
|
||||||
CLEANFILES = *-spellchecked cppcheck*.xml
|
|
||||||
|
|
||||||
# Most of the files generated by custom rules in the configure script
|
|
||||||
# or by autogen.sh are cleaned by the Makefile.am in their directories.
|
|
||||||
# Files below are re-created by running `configure` script and may be
|
|
||||||
# wiped by a `make distclean`:
|
|
||||||
#???# configure.ac~
|
|
||||||
DISTCLEANFILES = ChangeLog config.log configure~ include/config.h.in~
|
|
||||||
|
|
||||||
# Files made by autotools and common rituals of the configure script,
|
|
||||||
# these are needed to run the configure script itself so are not wiped
|
|
||||||
# by a mere `make distclean`; most of these are copied by autotools
|
|
||||||
# from their installation, or made by `automake` etc. on the system
|
|
||||||
# which generates `configure`; rebuilding NUT after deleting these
|
|
||||||
# requires `autogen.sh` script to be re-run (and tools available):
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Automatically generate the ChangeLog from Git logs:
|
# Automatically generate the ChangeLog from Git logs:
|
||||||
MAINTAINERCLEANFILES = INSTALL aclocal.m4 config.guess config.sub \
|
MAINTAINERCLEAN_FILES = ChangeLog
|
||||||
configure depcomp install-sh ltmain.sh test-driver \
|
|
||||||
m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
|
|
||||||
m4/lt~obsolete.m4 Makefile.in .dirstamp include/config.h.in \
|
|
||||||
ChangeLog $(MAINTAINERCLEANFILES_DISTBALL) \
|
|
||||||
$(MAINTAINERCLEANFILES_PACKAGES)
|
|
||||||
|
|
||||||
# Let the analysis get regenerated due to any change in source;
|
|
||||||
# but note that with our different make implementations to support,
|
|
||||||
# we can not either $(shell find ...) nor blindly say e.g. *.cpp
|
|
||||||
# for each FS structure layer because e.g. there are no ./*.cpp
|
|
||||||
# in the root dir of the codebase (and so make complains there is
|
|
||||||
# `No rule to make target `*.cpp', needed by `cppcheck-cxx11.xml'`)
|
|
||||||
#
|
|
||||||
# Note that the actual `cppcheck` scan finds all files it likes
|
|
||||||
# (so if CPPCHECK_SRC_* misses something, it just won't trigger
|
|
||||||
# automagically a rebuild of the XML in developer working cycles).
|
|
||||||
@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_H = $(top_srcdir)/*/*.h $(top_srcdir)/*/*/*.h
|
|
||||||
# CPPCHECK_SRC_H += $(top_srcdir)/*.h
|
|
||||||
@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_C = $(top_srcdir)/*/*.c $(top_srcdir)/*/*/*.c
|
|
||||||
# CPPCHECK_SRC_C += $(top_srcdir)/*.cpp
|
|
||||||
@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_CXX = $(top_srcdir)/*/*.cpp
|
|
||||||
|
|
||||||
# Older boundary of the ChangeLog commits range
|
# Older boundary of the ChangeLog commits range
|
||||||
# It can be a tag ('v2.2.0'), a commit hash, a date, ...
|
# It can be a tag ('v2.2.0'), a commit hash, a date, ...
|
||||||
|
@ -548,17 +447,6 @@ GITLOG_START_POINT = v2.6.0
|
||||||
# targets from old build system (pre-automake).
|
# targets from old build system (pre-automake).
|
||||||
# supported for a period of time for backward "compatibility".
|
# supported for a period of time for backward "compatibility".
|
||||||
WARN = "----------------------------------------------------------------------"
|
WARN = "----------------------------------------------------------------------"
|
||||||
|
|
||||||
# Clean the dist tarball and packages
|
|
||||||
MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz
|
|
||||||
# HP-UX:
|
|
||||||
# AIX as below, and RedHat-compatible (cover binary and source packages):
|
|
||||||
# Debian-compatible (cover binary and source packages):
|
|
||||||
# Solaris SVR4 package archives:
|
|
||||||
# Newer Solaris IPS (aka "pkg(5)" format archives)
|
|
||||||
MAINTAINERCLEANFILES_PACKAGES = \
|
|
||||||
NUT_HPUX_package@PACKAGE_VERSION@.depot nut*rpm nut*deb \
|
|
||||||
NUT_solaris_*_package@PACKAGE_VERSION@.local.gz *.p5p
|
|
||||||
all: all-recursive
|
all: all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -577,14 +465,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu Makefile
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
echo ' $(SHELL) ./config.status'; \
|
echo ' $(SHELL) ./config.status'; \
|
||||||
$(SHELL) ./config.status;; \
|
$(SHELL) ./config.status;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -601,17 +490,9 @@ scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/a
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in
|
scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
scripts/python/module/PyNUT.py: $(top_builddir)/config.status $(top_srcdir)/scripts/python/module/PyNUT.py.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
||||||
scripts/Aix/nut.init: $(top_builddir)/config.status $(top_srcdir)/scripts/Aix/nut.init.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
||||||
scripts/HP-UX/postinstall: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/postinstall.in
|
scripts/HP-UX/postinstall: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/postinstall.in
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
scripts/python/app/NUT-Monitor-py2gtk2: $(top_builddir)/config.status $(top_srcdir)/scripts/python/app/NUT-Monitor-py2gtk2.in
|
scripts/ufw/nut.ufw.profile: $(top_builddir)/config.status $(top_srcdir)/scripts/ufw/nut.ufw.profile.in
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
||||||
scripts/python/app/NUT-Monitor-py3qt5: $(top_builddir)/config.status $(top_srcdir)/scripts/python/app/NUT-Monitor-py3qt5.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
||||||
scripts/python/module/test_nutclient.py: $(top_builddir)/config.status $(top_srcdir)/scripts/python/module/test_nutclient.py.in
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
|
||||||
mostlyclean-libtool:
|
mostlyclean-libtool:
|
||||||
|
@ -729,10 +610,7 @@ distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
$(am__remove_distdir)
|
$(am__remove_distdir)
|
||||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
@ -797,7 +675,7 @@ distdir-am: $(DISTFILES)
|
||||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|| chmod -R a+r "$(distdir)"
|
|| chmod -R a+r "$(distdir)"
|
||||||
dist-gzip: distdir
|
dist-gzip: distdir
|
||||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-bzip2: distdir
|
dist-bzip2: distdir
|
||||||
|
@ -812,22 +690,18 @@ dist-xz: distdir
|
||||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||||
$(am__post_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
|
dist-tarZ: distdir
|
||||||
@echo WARNING: "Support for distribution archives compressed with" \
|
@echo WARNING: "Support for shar distribution archives is" \
|
||||||
"legacy program 'compress' is deprecated." >&2
|
"deprecated." >&2
|
||||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-shar: distdir
|
dist-shar: distdir
|
||||||
@echo WARNING: "Support for shar distribution archives is" \
|
@echo WARNING: "Support for distribution archives compressed with" \
|
||||||
"deprecated." >&2
|
"legacy program 'compress' is deprecated." >&2
|
||||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-zip: distdir
|
dist-zip: distdir
|
||||||
|
@ -845,7 +719,7 @@ dist dist-all:
|
||||||
distcheck: dist
|
distcheck: dist
|
||||||
case '$(DIST_ARCHIVES)' in \
|
case '$(DIST_ARCHIVES)' in \
|
||||||
*.tar.gz*) \
|
*.tar.gz*) \
|
||||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
*.tar.bz2*) \
|
*.tar.bz2*) \
|
||||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
*.tar.lz*) \
|
*.tar.lz*) \
|
||||||
|
@ -855,27 +729,25 @@ distcheck: dist
|
||||||
*.tar.Z*) \
|
*.tar.Z*) \
|
||||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
*.shar.gz*) \
|
*.shar.gz*) \
|
||||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
*.zip*) \
|
*.zip*) \
|
||||||
unzip $(distdir).zip ;;\
|
unzip $(distdir).zip ;;\
|
||||||
*.tar.zst*) \
|
|
||||||
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
|
|
||||||
esac
|
esac
|
||||||
chmod -R a-w $(distdir)
|
chmod -R a-w $(distdir)
|
||||||
chmod u+w $(distdir)
|
chmod u+w $(distdir)
|
||||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
mkdir $(distdir)/_build $(distdir)/_inst
|
||||||
chmod a-w $(distdir)
|
chmod a-w $(distdir)
|
||||||
test -d $(distdir)/_build || exit 0; \
|
test -d $(distdir)/_build || exit 0; \
|
||||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
&& am__cwd=`pwd` \
|
&& am__cwd=`pwd` \
|
||||||
&& $(am__cd) $(distdir)/_build/sub \
|
&& $(am__cd) $(distdir)/_build \
|
||||||
&& ../../configure \
|
&& ../configure \
|
||||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
--srcdir=.. --prefix="$$dc_install_base" \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
@ -944,17 +816,14 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
@ -963,7 +832,7 @@ distclean: distclean-recursive
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||||
distclean-local distclean-tags
|
distclean-tags
|
||||||
|
|
||||||
dvi: dvi-recursive
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
@ -1007,8 +876,7 @@ maintainer-clean: maintainer-clean-recursive
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -rf $(top_srcdir)/autom4te.cache
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic \
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
maintainer-clean-local
|
|
||||||
|
|
||||||
mostlyclean: mostlyclean-recursive
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
@ -1030,32 +898,22 @@ uninstall-am:
|
||||||
am--refresh check check-am clean clean-cscope clean-generic \
|
am--refresh check check-am clean clean-cscope clean-generic \
|
||||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||||
dist-xz dist-zip dist-zstd distcheck distclean \
|
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||||
distclean-generic distclean-libtool distclean-local \
|
distclean-libtool distclean-tags distcleancheck distdir \
|
||||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||||
dvi-am html html-am info info-am install install-am \
|
install install-am install-data install-data-am install-dvi \
|
||||||
install-data install-data-am install-dvi install-dvi-am \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-exec install-exec-am install-html install-html-am \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-info install-info-am install-man install-pdf \
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
install-pdf-am install-ps install-ps-am install-strip \
|
install-strip installcheck installcheck-am installdirs \
|
||||||
installcheck installcheck-am installdirs installdirs-am \
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
maintainer-clean maintainer-clean-generic \
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
maintainer-clean-local mostlyclean mostlyclean-generic \
|
ps ps-am tags tags-am uninstall uninstall-am
|
||||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
|
||||||
uninstall-am
|
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
libtool: $(LIBTOOL_DEPS)
|
|
||||||
$(SHELL) ./config.status libtool
|
|
||||||
|
|
||||||
distcheck-light:
|
distcheck-light:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
||||||
|
|
||||||
# Make a distcheck (and check in particular) with enabled valgrind and debug info
|
|
||||||
memcheck distcheck-valgrind:
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck
|
|
||||||
|
|
||||||
# workaround the dist generated files that are also part of the distribution
|
# workaround the dist generated files that are also part of the distribution
|
||||||
# Note that distcleancheck is disabled for now, while waiting for a proper
|
# Note that distcleancheck is disabled for now, while waiting for a proper
|
||||||
# solution, that do not break older unix systems
|
# solution, that do not break older unix systems
|
||||||
|
@ -1064,125 +922,20 @@ memcheck distcheck-valgrind:
|
||||||
distcleancheck:
|
distcleancheck:
|
||||||
@:
|
@:
|
||||||
|
|
||||||
# Quick alias for root dir recipe:
|
|
||||||
realclean: maintainer-clean
|
|
||||||
|
|
||||||
# Executed after default rules
|
|
||||||
maintainer-clean-local:
|
|
||||||
rm -f missing || true
|
|
||||||
|
|
||||||
# Do not let $SUBDIRS/Makefile rules delete their local .deps because
|
|
||||||
# this breaks our ability to clean up (e.g. some common/.../*.Plo files
|
|
||||||
# are included by generated Makefiles from other subdirectories, so they
|
|
||||||
# should be available during their clean-up). Just in case, we make sure
|
|
||||||
# here that their sub-distcleans complete first.
|
|
||||||
distclean-local:
|
|
||||||
@for DIR in $(SUBDIRS) ; do \
|
|
||||||
if test -f "$${DIR}/Makefile" ; then \
|
|
||||||
echo " DISTCLEAN in $${DIR}" >&2 ; \
|
|
||||||
( cd "$${DIR}" && $(MAKE) -s distclean ) || exit ; \
|
|
||||||
fi ; \
|
|
||||||
done
|
|
||||||
rm -rf .inst tmp autom4te.cache
|
|
||||||
find "$(builddir)" -type d -name '.deps' | while read DIR ; do rm -rf "$${DIR}" ; done
|
|
||||||
|
|
||||||
# Hook the documentation building and validating recipes
|
|
||||||
# Note: these are optionally available (as determined during configure runs)
|
|
||||||
spellcheck spellcheck-interactive:
|
|
||||||
@RES=0; \
|
|
||||||
(cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
(cd $(builddir)/data && $(MAKE) -s $@) || RES=$$? ; \
|
|
||||||
exit $$RES
|
|
||||||
|
|
||||||
# Note: the "all-docs" and "check-docs" targets may require tools not
|
|
||||||
# found by `configure` script (and so avoided by conventional recipes)
|
|
||||||
# such as PDF generators, so it should only be called at developer's
|
|
||||||
# discretion, choice and risk. The "check-man" targets covers source
|
|
||||||
# texts, man pages and HTML rendering of man pages, as enabled by tools.
|
|
||||||
doc spellcheck-sortdict \
|
|
||||||
all-docs check-docs \
|
|
||||||
man all-man man-man check-man man-html all-html:
|
|
||||||
cd $(builddir)/docs && $(MAKE) $@
|
|
||||||
|
|
||||||
check-NIT check-NIT-devel:
|
|
||||||
cd $(builddir)/tests/NIT && $(MAKE) $@
|
|
||||||
|
|
||||||
# This target adds syntax-checking for committed shell script files,
|
|
||||||
# to avoid surprises and delays in finding fatal typos after packaging
|
|
||||||
###
|
|
||||||
### Note: currently, shellcheck target calls check-scripts-syntax
|
|
||||||
### so when both are invoked at once, in the end the check is only
|
|
||||||
### executed once. Later it is anticipated that shellcheck would
|
|
||||||
### be implemented by requiring, configuring and calling the tool
|
|
||||||
### named "shellcheck" for even more code inspection and details.
|
|
||||||
### Still, there remains value in also checking the script syntax
|
|
||||||
### by the very version of the shell interpreter that would run
|
|
||||||
### these scripts in production usage of the resulting packages.
|
|
||||||
###
|
|
||||||
check-scripts-syntax:
|
|
||||||
@echo 'NOTE: modern bash complains about scripts using backticks (warning not error), which we ignore in NUT codebase for portability reasons: `...` obsolete, use $$(...)'
|
|
||||||
@RUNBASH=bash; if [ -x /bin/bash ]; then RUNBASH=/bin/bash ; else if [ -x /usr/bin/env ] ; then RUNBASH="/usr/bin/env bash"; fi; fi ; \
|
|
||||||
for F in `git ls-files || find . -type f` ; do \
|
|
||||||
case "`file "$$F"`" in \
|
|
||||||
*"Bourne-Again shell script"*) ( set -x ; $$RUNBASH -n "$$F" ; ) ;; \
|
|
||||||
*"POSIX shell script"*|*"shell script"*) ( set -x ; /bin/sh -n "$$F" ; ) ;; \
|
|
||||||
esac || { RES=$$? ; echo "ERROR: Syntax check failed for script file: $$F" >&2 ; exit $$RES ; } ; \
|
|
||||||
done
|
|
||||||
@echo 'SUCCESS: Shell scripts syntax is acceptable, no fatal issues were found'
|
|
||||||
|
|
||||||
shellcheck-disclaimer:
|
|
||||||
@echo "==============================================================================="
|
|
||||||
@echo "NOTICE: 'make shellcheck' is currently an alias for 'make check-scripts-syntax'"
|
|
||||||
@echo "Later it may become a call to the real shellcheck tool (if available on the"
|
|
||||||
@echo "build system during the configure phase)"
|
|
||||||
@echo "==============================================================================="
|
|
||||||
|
|
||||||
# Note: currently not part of shellcheck target, because the script below
|
|
||||||
# can test the logic with numerous SHELL_PROGS in a CI setting, and because
|
|
||||||
# check-scripts-syntax probably has checked the basic syntax above already.
|
|
||||||
shellcheck-nde:
|
|
||||||
cd $(srcdir)/tests && SERVICE_FRAMEWORK="selftest" ./nut-driver-enumerator-test.sh
|
|
||||||
|
|
||||||
shellcheck: shellcheck-disclaimer check-scripts-syntax
|
|
||||||
@HAVE_CPPCHECK_TRUE@cppcheck: cppcheck-cxx11.xml cppcheck-c99.xml
|
|
||||||
# CPPCHECK_SRC_CXX += $(top_srcdir)/*.cpp $(top_srcdir)/*/*/*.cpp
|
|
||||||
|
|
||||||
@HAVE_CPPCHECK_TRUE@cppcheck-cxx11.xml: $(CPPCHECK_SRC_CXX) $(CPPCHECK_SRC_H)
|
|
||||||
@HAVE_CPPCHECK_TRUE@ $(CPPCHECK) --std=c++11 --enable=all --inconclusive --xml --xml-version=2 . 2>$@
|
|
||||||
|
|
||||||
@HAVE_CPPCHECK_TRUE@cppcheck-c99.xml: $(CPPCHECK_SRC_C) $(CPPCHECK_SRC_H)
|
|
||||||
@HAVE_CPPCHECK_TRUE@ $(CPPCHECK) --std=c99 --enable=all --inconclusive --xml --xml-version=2 . 2>$@
|
|
||||||
@HAVE_CPPCHECK_FALSE@cppcheck:
|
|
||||||
@HAVE_CPPCHECK_FALSE@ @echo "CPPCHECK analysis not available since 'cppcheck' was not found."
|
|
||||||
|
|
||||||
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
|
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
|
||||||
# in case it has already been generated previously
|
# in case it has already been generated previously
|
||||||
# Note that the script is hard-coded to generate "ChangeLog" in the current dir
|
|
||||||
dummy-stamp:
|
dummy-stamp:
|
||||||
ChangeLog: tools/gitlog2changelog.py dummy-stamp
|
ChangeLog: tools/gitlog2changelog.py dummy-stamp
|
||||||
cd $(top_builddir) && \
|
$(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \
|
||||||
./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \
|
echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@
|
||||||
{ echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; }
|
|
||||||
|
|
||||||
nut_version.h include/nut_version.h:
|
|
||||||
cd $(abs_top_builddir)/include && $(MAKE) nut_version.h
|
|
||||||
|
|
||||||
tools/gitlog2changelog.py: tools/gitlog2changelog.py.in
|
|
||||||
cd $(@D) && $(MAKE) -s $(@F)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Maintainers targets: distribution signature and hashes
|
# Maintainers targets: distribution signature and hashes
|
||||||
nut-@PACKAGE_VERSION@.tar.gz: dist
|
dist-sig:
|
||||||
nut-@PACKAGE_VERSION@.tar.gz.sig: dist-sig
|
|
||||||
nut-@PACKAGE_VERSION@.tar.gz.md5 nut-@PACKAGE_VERSION@.tar.gz.sha256: dist-hash
|
|
||||||
|
|
||||||
dist-sig: nut-@PACKAGE_VERSION@.tar.gz
|
|
||||||
rm -f nut-@PACKAGE_VERSION@.tar.gz.sig
|
rm -f nut-@PACKAGE_VERSION@.tar.gz.sig
|
||||||
gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz
|
gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz
|
||||||
|
|
||||||
dist-hash: nut-@PACKAGE_VERSION@.tar.gz
|
dist-hash:
|
||||||
md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5
|
md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5
|
||||||
sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256
|
sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256
|
||||||
|
|
||||||
|
@ -1218,7 +971,7 @@ install-dirs:
|
||||||
@echo "Warning: 'make install-dirs' is deprecated."
|
@echo "Warning: 'make install-dirs' is deprecated."
|
||||||
@echo "Use 'make installdirs' instead."
|
@echo "Use 'make installdirs' instead."
|
||||||
@echo $(WARN)
|
@echo $(WARN)
|
||||||
$(MAKE) installdirs
|
make installdirs
|
||||||
cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
|
cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
|
||||||
install-cgi-man install-cgi-conf install-cgi-html:
|
install-cgi-man install-cgi-conf install-cgi-html:
|
||||||
@echo "Error: 'make $@' no longer exists."
|
@echo "Error: 'make $@' no longer exists."
|
||||||
|
@ -1234,52 +987,26 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
|
||||||
@echo "Use './configure --with-snmp' instead."
|
@echo "Use './configure --with-snmp' instead."
|
||||||
setver:
|
setver:
|
||||||
@echo "Error: 'make setver' no longer exists."
|
@echo "Error: 'make setver' no longer exists."
|
||||||
@echo "Edit configure.ac to set version number."
|
@echo "Edit configure.in to set version number."
|
||||||
|
package:
|
||||||
package: dist
|
if test `uname -s` = "HP-UX"; then \
|
||||||
DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \
|
cd scripts/HP-UX; \
|
||||||
rm -rf "$$DESTDIR"; \
|
make package; \
|
||||||
case "`uname -s`" in \
|
mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
|
||||||
"HP-UX") \
|
elif test `uname -s` = "SunOS"; then \
|
||||||
( cd scripts/HP-UX && \
|
make; \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \
|
rm -rf @prefix@; \
|
||||||
mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \
|
make install; \
|
||||||
"SunOS") \
|
cd scripts/Solaris; \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) && \
|
make package; \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \
|
make uninstall; \
|
||||||
( cd scripts/Solaris && \
|
rm -rf @prefix@; \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package ) && \
|
elif test `uname -s` = "AIX"; then \
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" uninstall && \
|
make dist; \
|
||||||
rm -rf "$$DESTDIR" || \
|
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \
|
||||||
{ echo "FAILED to produce SunOS packages, inspect '$$DESTDIR' for clues" >&2 ; exit 1; } ;; \
|
cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \
|
||||||
"AIX") \
|
rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \
|
||||||
if test -d /usr/src/packages/SPECS -a -w /usr/src/packages/SPECS ; then : ; else echo "Can not write to /usr/src/packages/SPECS" >&2 ; exit 1; fi ; \
|
fi;
|
||||||
if test -d /usr/src/packages/SOURCES -a -w /usr/src/packages/SOURCES ; then : ; else echo "Can not write to /usr/src/packages/SOURCES" >&2 ; exit 1; fi ; \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) dist && \
|
|
||||||
cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS && \
|
|
||||||
cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES && \
|
|
||||||
rpm -ba /usr/src/packages/SPECS/nut-aix.spec && \
|
|
||||||
mv /usr/src/packages/RPMS/nut*rpm $(abs_top_builddir)/ ;; \
|
|
||||||
*) echo "Unsupported OS for 'make $@' (no recipe bound)" >&2; exit 1;; \
|
|
||||||
esac
|
|
||||||
|
|
||||||
print-MAINTAINERCLEANFILES print-REALCLEANFILES:
|
|
||||||
@echo $(MAINTAINERCLEANFILES)
|
|
||||||
|
|
||||||
print-DISTCLEANFILES:
|
|
||||||
@echo $(DISTCLEANFILES)
|
|
||||||
|
|
||||||
# TODO: Recursive mode to consider patterns defined in sub-dir makefiles
|
|
||||||
git-realclean-check:
|
|
||||||
@if test -e .git && (command -v git); then \
|
|
||||||
git status --ignored || while read F ; do \
|
|
||||||
for P in $(MAINTAINERCLEANFILES) ; do \
|
|
||||||
case "$$F" in \
|
|
||||||
*/$$P) exit 1 ;; \
|
|
||||||
esac ; \
|
|
||||||
done; \
|
|
||||||
done ; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
542
NEWS
542
NEWS
|
@ -1,413 +1,7 @@
|
||||||
If you're upgrading from an earlier version, see the UPGRADING file.
|
If you're upgrading from an earlier version, see the UPGRADING file.
|
||||||
|
|
||||||
For a complete and more detailed list of changes, please refer to the
|
For a complete and more detailed list of changes, please refer to the
|
||||||
ChangeLog file (generated for release archives), or to the Git version
|
ChangeLog file.
|
||||||
control history for "live" codebase.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
Release notes for NUT 2.8.0 - what's new since 2.7.4:
|
|
||||||
|
|
||||||
NOTE: Earlier discussions (mailing list threads, GitHub issues, etc.) could
|
|
||||||
refer to this change set (too long in the making) as NUT 2.7.5.
|
|
||||||
|
|
||||||
- New (optional) keywords for configuration files were added,
|
|
||||||
so existing NUT 2.7.x builds would not accept them if some
|
|
||||||
deployments switch versions back and forth -- due to this,
|
|
||||||
semantically the version was bumped to NUT 2.8.x.
|
|
||||||
|
|
||||||
- Add support for openssl-1.1.0 (Arjen de Korte)
|
|
||||||
|
|
||||||
- libusb-1.0 API support in addition to libusb-0.1 API [#300]
|
|
||||||
|
|
||||||
- Add support for `DISABLE_WEAK_SSL=true` in upsd.conf to disable older/weaker
|
|
||||||
SSL/TLS protocols and ciphers: when NUT is built against relatively recent
|
|
||||||
versions of OpenSSL or NSS it will be restricted to TLSv1.2 or better.
|
|
||||||
For least-surprise, currently defaults to `false` and complains in log
|
|
||||||
[PR #1043]
|
|
||||||
|
|
||||||
- Add support for `ALLOW_NO_DEVICE=true` (as an upsd.conf flag or environment
|
|
||||||
variable passed from caller of the program), to allow starting the data
|
|
||||||
server initially without any device configurations and reloading it later
|
|
||||||
to apply config changes on the fly [PR #766]
|
|
||||||
|
|
||||||
- Add support for `debug_min=NUM` setting (ups.conf, upsd.conf, upsmon.conf)
|
|
||||||
to specify the minimum debug verbosity for daemons. This allows "in-vivo"
|
|
||||||
troubleshooting of service daemons without editing init scripts or service
|
|
||||||
unit definitions.
|
|
||||||
|
|
||||||
- Improve support for upsdrvctl for managing of numerous device configs,
|
|
||||||
including default "maxretry=3" and a "nowait" option to complete the
|
|
||||||
"start of everything" mode after triggering the drivers and not waiting
|
|
||||||
for them to complete initializing. This matters on systems that monitor
|
|
||||||
from dozens to hundreds of devices.
|
|
||||||
|
|
||||||
- Drivers support a new value for `synchronous` setting, which is the
|
|
||||||
new default now: `auto`. Initially after driver start-up this mode
|
|
||||||
acts as the older default `off`, but would fall back to `on` in case
|
|
||||||
the driver fails to send reports to `upsd` by overflowing the socket
|
|
||||||
buffer in async mode -- so the next connections of this driver uptime
|
|
||||||
would be synchronized (potentially slower, but safer -- blocking on
|
|
||||||
writes to the data server). This adaptation would primarily impact
|
|
||||||
and benefit devices with many (hundreds of) data points, such as
|
|
||||||
ePDUs and daisy chains. [issue #1309, PR #1315]
|
|
||||||
|
|
||||||
- Daemons such as upsd, upsmon, upslog, and device drivers previously
|
|
||||||
implied that enabled debugging (or upslog to stdout) means foreground
|
|
||||||
running, otherwise the daemon was always sent to the background.
|
|
||||||
Now there are explicit options for this (`-F`/`-B`), although default
|
|
||||||
behavior is retained. This change is used for simplified service unit
|
|
||||||
definitions.
|
|
||||||
|
|
||||||
- Improvements for device discovery or driver "lock-picking", including
|
|
||||||
general support for:
|
|
||||||
* "Standalone" mode (`-s` option), to monitor a device which is not
|
|
||||||
detailed or mentioned in ups.conf
|
|
||||||
* `NUT_ALTPIDPATH` and `NUT_STATEPATH` environment variables to override
|
|
||||||
the paths built into the driver binary [PR #473 and #507]
|
|
||||||
* "Driver data dump" mode (`-d` option), to poll a device for one or
|
|
||||||
few ('update_count' ) loops, report discovered values (dump the data
|
|
||||||
tree in upsc-like format), and exit. This complements the `nut-scanner`
|
|
||||||
for finding and identifying devices.
|
|
||||||
|
|
||||||
- support for new devices:
|
|
||||||
* IBM 6000 VA LCD 4U Rack UPS; 5396-1Kx (USB)
|
|
||||||
* Phoenix Contact QUINT-UPS model 2320461 (Modbus)
|
|
||||||
* Tripp-Lite SU3000LCD2UHV (USB; protocol 1330)
|
|
||||||
* Emerson Avocent PM3000 PDU (SNMP)
|
|
||||||
* HPE ePDU (SNMP)
|
|
||||||
|
|
||||||
- nutdrv_qx: enhanced estimation of remaining battery runtime based
|
|
||||||
on speed of voltage drop, which varies as they age [PR #1027]
|
|
||||||
|
|
||||||
- nutdrv_qx: several subdrivers added or improved, including:
|
|
||||||
* "snr" subdriver with USB connection, for SNR-UPS-LID-XXXX [PR #1008].
|
|
||||||
Note that end-users should reference explicitly the `snr` subdriver
|
|
||||||
in their `ups.conf` settings because of USB chip using the same
|
|
||||||
values of VendorID/ProductID as fabula_subdriver, fuji_subdriver,
|
|
||||||
and krauler_subdriver.
|
|
||||||
* "hunnox" subdriver, as a dialect of earlier "fabula" [PR #638]
|
|
||||||
adds support for Hunnox HNX-850 with USB connection and reported to work
|
|
||||||
for Powercool, Iron Guardian, ARES devices and possibly many others from
|
|
||||||
discussions linking to the pull request which introduced the driver.
|
|
||||||
* "phoenixtec" subdriver for Masterguard A and E series, device series
|
|
||||||
A700/1000/2000/3000(-19) and E40/60/100(-19). [PR #975]
|
|
||||||
* "ablerex" subdriver provided by the OEM vendor, note that it replaces
|
|
||||||
"krauler_subdriver" as default handler for VID:PID 0xffff:0x0000
|
|
||||||
[PR #1135]
|
|
||||||
* Legrand HID defined and handled by "krauler_subdriver" by default
|
|
||||||
[PR #1075, issue #616]
|
|
||||||
* add new "armac" subdriver, tested with Armac R/2000I/PSW, but should
|
|
||||||
support other UPSes that work with "PowerManagerII" software from
|
|
||||||
Richcomm Technologies from around 2004-2005 [PR #1239, issue #1238]
|
|
||||||
|
|
||||||
- microsol-apc (starting at version 0.68 as derived from solis 0.67):
|
|
||||||
adding support for newer APC Back-UPS BR hardware, such as
|
|
||||||
APC Back-UPS BZ1500, BZ2200BI and BZ2200I [PR #994]
|
|
||||||
|
|
||||||
- pijuice: added new i2c bus driver for PiJuice HAT, a battery UPS module
|
|
||||||
for the Raspberry Pi systems [PR #730]
|
|
||||||
|
|
||||||
- huawei-ups2000: added new driver for USB (Linux 5.12+ so far) and Serial
|
|
||||||
RS-232 Modbus device support of Huawei UPS2000/2000A (1kVA-3kVA) series,
|
|
||||||
and possibly some related FSP UPS models. [PR #954]
|
|
||||||
|
|
||||||
- socomec_jbus: added new driver for modbus-based JBUS protocol over serial
|
|
||||||
RS-232 for Socomec UPS (tested with a DIGYS 3/3 15kVA model, working
|
|
||||||
on Linux x86-64 and Raspberry Pi 3 ARM). [PR #1313]
|
|
||||||
|
|
||||||
- adelsystem_cbi: added new driver for ADELSYSTEM CBI2801224A, an all-in-one
|
|
||||||
12/24Vdc DC-UPS, which supports the modbus RTU communication protocol
|
|
||||||
[PR #1282]
|
|
||||||
|
|
||||||
- generic_modbus: added new driver for TCP and Serial Modbus device support.
|
|
||||||
The driver has been tested against PULS UPS (model UB40.241) via
|
|
||||||
MOXA ioLogikR1212 (RS485) and ioLogikE1212 (TCP/IP), and configuration
|
|
||||||
allows to map custom registers and addresses to NUT events [PR #1052]
|
|
||||||
|
|
||||||
- genericups: added support for FTTx battery backup devices, and new signal
|
|
||||||
type mappings for the contact closure pins interpretation (RB for replace
|
|
||||||
battery, BYPASS for disconnected battery, and "none" or NULL for signals
|
|
||||||
to ignore) [PR #1061]
|
|
||||||
|
|
||||||
- add devices to HCL/DDL:
|
|
||||||
* APC Back-UPS CS (USB)
|
|
||||||
* CPS CP1500EPFCLCD (USB)
|
|
||||||
* CPS EC350G, EC750G (USB)
|
|
||||||
* CPS PR2200LCDRT2U (SNMP)
|
|
||||||
* Eaton ATS 16 and 30 (SNMP)
|
|
||||||
* Eaton 5E2200VA (USB)
|
|
||||||
* Eaton 9PX Split Phase 6/8/10 kVA (XML/USB/SHUT)
|
|
||||||
* Eaton 9PX (XML/USB/SHUT)
|
|
||||||
* Eaton Ellipse PRO 650 VA (USB)
|
|
||||||
* Ippon Back Comfo Pro II 650/850/1050 (USB)
|
|
||||||
* Numeric Digital 800 (USB)
|
|
||||||
* Opti-UPS PS1500E (USB)
|
|
||||||
* Powercool 350VA to 1600VA (USB)
|
|
||||||
|
|
||||||
- C++11 support in nutclient library and cppunit tests
|
|
||||||
|
|
||||||
- Added C++ testing mock for TcpClient class (nutclientmem/MemClientStub:
|
|
||||||
data stored in local memory) [PR #1034]
|
|
||||||
|
|
||||||
- Dual Python 2 and 3 compatibility in development scripts; ability to
|
|
||||||
run build activities and resulting built NUT programs on systems that
|
|
||||||
do not have a binary named "python" [PR #1115 and some before it]
|
|
||||||
|
|
||||||
- Added Russian translation for NUT-Monitor GUI client [PR #806]
|
|
||||||
|
|
||||||
- Separated NUT-Monitor UI into two applications, NUT-Monitor-py2gtk2 and
|
|
||||||
NUT-Monitor-py3qt5, suitable for two generations of Python ecosystem
|
|
||||||
with their great differences; `NUT-Monitor` name is retained for wrapper
|
|
||||||
script which calls one of these, such that the current system can execute
|
|
||||||
[PRs #1310, #1354]
|
|
||||||
|
|
||||||
- Various USB driver families: expanded device-matching with "device" in
|
|
||||||
addition to "bus" and generic USB fields. This is needed to support
|
|
||||||
multiple attached devices that seem identical by other fields (e.g.
|
|
||||||
same vendor, same model, same USB bus, and no serial number) [PR #974]
|
|
||||||
|
|
||||||
- Various USB driver families: Improved HID parsing for byte-stream to
|
|
||||||
number conversions on different CPU architectures [PR #1024]
|
|
||||||
|
|
||||||
- Various USB HID driver families: added support for composite devices
|
|
||||||
utilizing interface greater than 0 for the UPS interface [PR #1044]
|
|
||||||
|
|
||||||
- usbhid-ups:
|
|
||||||
* added generic framework for fixing Report Descriptors which can be
|
|
||||||
used for different manufacturers by adding code to the appropriate
|
|
||||||
subdriver rather than polluting the main code with UPS specific
|
|
||||||
exceptions, and applied fixes for known mistakes in (some releases
|
|
||||||
of firmware for) CyberPower CPS*EPFCLCD [issue #439, PR #1245]
|
|
||||||
* added `onlinedischarge` option for UPSes that report `OL+DISCHRG`
|
|
||||||
when wall power is lost [PR #811]
|
|
||||||
* changed detection of VendorID 0x06da handling of which is claimed
|
|
||||||
by Liebert/Phoenixtec HID historically, and MGE HID (for AEG PROTECT
|
|
||||||
NAS UPSes) since NUT 2.7.4, so that the higher-priority MGE subdriver
|
|
||||||
would not grab each and all of the devices exposing that ID [PR #1357]
|
|
||||||
* CPS HID: add input.frequency and output.frequency
|
|
||||||
* OpenUPS2: only check OEM Information string once (fewer log messages)
|
|
||||||
* Liebert GXT4 USB VID:PID [10AF:0000]
|
|
||||||
* add battery voltage and input/output transfer voltage and frequency
|
|
||||||
in Liebert/Phoenixtec HID mapping, to support PowerWalker VFI 2000 TGS
|
|
||||||
better [PR #564, issue #560]
|
|
||||||
* add a little delay between multicommands [PR #1228]
|
|
||||||
* fix Eaton/MGE mapping for beeper handling
|
|
||||||
* add IBM USB VID
|
|
||||||
* add deep battery test for CyberPower OL3000RMXL2U
|
|
||||||
* report the libusb version used
|
|
||||||
* fixed CPU architecture dependent bitmask math issues, causing wrong
|
|
||||||
numbers interpreted from wire protocol data in Big-Endian LP64 builds
|
|
||||||
(SPARC64, s390x, etc.) [issue #1023, PRs #1024, #1040, #1055, #1226]
|
|
||||||
* add Delta UPS Amplon R Series, tested on R1K and R3K model [PR #987]
|
|
||||||
* add Delta Minuteman UPS VID/PID [PR #1230, issues #555 and #1227]
|
|
||||||
* add AMETEK Powervar UPM [PR #733]
|
|
||||||
* add Tripplite AVR750U (ProductID 0x3024) [PR #963]
|
|
||||||
* add Arduino HID device support with new arduino-hid subdriver [PR #1044]
|
|
||||||
* add new salicru-hid subdriver, tested with Salicru SPS Home 850 VA
|
|
||||||
[PR #1199, issue #732]
|
|
||||||
* add new ever-hid subdriver to support EVER UPS devices (Sinline RT Series,
|
|
||||||
Sinline RT XL Series, ECO PRO AVR CDS Series) [PR #431]
|
|
||||||
* add ability to set `battery.mfr.date` for APC HID UPS [PR #1318]
|
|
||||||
|
|
||||||
- usbhid-ups / mge-shut: compute a realpower output load approximation for
|
|
||||||
Eaton UPS when the needed data is not present
|
|
||||||
|
|
||||||
- snmp-ups:
|
|
||||||
* APC ePDU MIB support
|
|
||||||
* add `input.phase.shift` variable
|
|
||||||
* add configurable write-able `ondelay` (`ups.delay.start`) and `offdelay`
|
|
||||||
(`ups.delay.shutdown`) as timeticks support [PR #276]
|
|
||||||
* outlet groups
|
|
||||||
* fix the rounding / truncation of some values
|
|
||||||
* add outlet.N.name for Eaton ePDU
|
|
||||||
* add input.bypass.frequency for Eaton 3ph
|
|
||||||
* fix support for Eaton 2-phase ("split phase") UPS
|
|
||||||
* add flag to list currently loaded MIB-to-NUT mappings
|
|
||||||
* fix input.L2.voltage on Eaton G2/G3 PDU
|
|
||||||
* update Eaton Aphel Revelation MIB
|
|
||||||
* support Raritan Dominion PX2 PDU
|
|
||||||
* support Emerson Avocent PM3000 PDU
|
|
||||||
* improve ALARM flag handling
|
|
||||||
* add firmware version for new HPE Network card
|
|
||||||
* add ups.load, battery.charge, input.{voltage,frequency} and output.voltage
|
|
||||||
for CyberPower, as well as shutdown and other instant commands
|
|
||||||
* several rounds of updates for Eaton devices, including new ATS and ePDU
|
|
||||||
hardware families
|
|
||||||
* fixed bit mask values for flags to surely use different numbers behind
|
|
||||||
logical items (inevitably changing some of those macro symbols) [PR #1180]
|
|
||||||
|
|
||||||
- snmp-ups and nut-scanner should now support more SNMPv3 Auth and Priv
|
|
||||||
protocols, as available at NUT build time [PRs #1165, #1172]
|
|
||||||
|
|
||||||
- nut-scanner: various improvements, including:
|
|
||||||
* detection of libraries at runtime
|
|
||||||
* tracing information
|
|
||||||
* limiting parallelism (thread count) [PRs #1158, #1164]
|
|
||||||
|
|
||||||
- nut-ipmipsu: improve FreeIPMI support to build cleanly against older and
|
|
||||||
newer FreeIPMI versions [PR #1179]
|
|
||||||
|
|
||||||
- the powerpanel driver now also supports CyberPower OR1500LCDRTXL2U with
|
|
||||||
serial cable [PR #538]
|
|
||||||
|
|
||||||
- powercom driver: implement `nobt` config parameter to skip battery check
|
|
||||||
on initialization/startup [PR #1256]
|
|
||||||
|
|
||||||
- netxml-ups:
|
|
||||||
* Report calibration status
|
|
||||||
* Fix for erroneous battery info (MGEXML/0.30) [PR #1069]
|
|
||||||
|
|
||||||
- solis: various improvements and fixes
|
|
||||||
|
|
||||||
- liebert-esp2: Correct battery V scaling, update docs, implement split-phase
|
|
||||||
unit support [PR #412]
|
|
||||||
|
|
||||||
- tripplite: the "Tripp-Lite SmartUPS driver" as tested with SMART2200NET
|
|
||||||
learned to discover the firmware generation and some device features,
|
|
||||||
and in particular to manage power separately on one or two outlet groups
|
|
||||||
[PR #1048]
|
|
||||||
|
|
||||||
- tripplite_usb: updated to recognize the "3005" protocol [PR #584]
|
|
||||||
|
|
||||||
- libnutclient: introduce getDevicesVariableValues() to improve performances
|
|
||||||
when querying many devices (up to 15 times faster)
|
|
||||||
|
|
||||||
- nut-driver-enumerator: introduced a script for Linux systemd and
|
|
||||||
Solaris/illumos SMF to inspect current NUT configuration in ups.conf
|
|
||||||
file and generate service management instances for each currently
|
|
||||||
tracked power device. Also introduced services to monitor the NUT
|
|
||||||
configuration and react to editions of this file, mostly intended
|
|
||||||
for deployments that do massive monitoring of dynamically changing
|
|
||||||
farms of power devices.
|
|
||||||
|
|
||||||
- Fix File descriptors leaks by upsmon and upssched (SELinux errors)
|
|
||||||
|
|
||||||
- systemd support improvements:
|
|
||||||
* POWEROFF_WAIT
|
|
||||||
* reload support for upsd
|
|
||||||
* Deliver systemd-tmpfiles config to pre-create runtime locations
|
|
||||||
[PR #1037 for Issue #1030]
|
|
||||||
* Update units with SyslogIdentifier=%N for better logging [PR #1054]
|
|
||||||
|
|
||||||
- upsrw: display the variable type beside ENUM / RANGE
|
|
||||||
|
|
||||||
- Added `PROTVER` as alias to `NETVER` to report the protocol version in use.
|
|
||||||
Note that NUT codebase itself does not use this value and handles commands
|
|
||||||
and reported errors individually [issue #1347]
|
|
||||||
|
|
||||||
- Implement status tracking for instant commands (instcmd) and variables
|
|
||||||
settings (setvar): this allows to get the actual execution status from the
|
|
||||||
driver, and is available in libraries and upscmd / upsrw [PR #659]
|
|
||||||
|
|
||||||
- Add support for extra parameter for instant commands, both in library and
|
|
||||||
in upscmd
|
|
||||||
|
|
||||||
- dummy-ups can now specify `mode` as a driver argument, and separates the
|
|
||||||
notion of `dummy-once` (new default for `*.dev` files that do not change)
|
|
||||||
vs. `dummy-loop` (legacy default for `*.seq` and others) [issue #1385]
|
|
||||||
|
|
||||||
- new protocol variables:
|
|
||||||
* `input.phase.shift`
|
|
||||||
* `outlet.N.name`
|
|
||||||
* `outlet.N.type`
|
|
||||||
* `battery.voltage.cell.max`, `battery.voltage.cell.min`
|
|
||||||
* `battery.temperature.cell.max`, `battery.temperature.cell.min`
|
|
||||||
* `battery.status`
|
|
||||||
* `battery.capacity.nominal`
|
|
||||||
* `battery.date.maintenance` (and clarified purpose of `battery.date`)
|
|
||||||
* `battery.packs.external` (and clarified purpose of `battery.packs`)
|
|
||||||
* `experimental.*` namespace introduced [PR #1046] to facilitate
|
|
||||||
introduction of NUT drivers and their data points for which we do
|
|
||||||
not yet have concepts, or which the original driver contributors
|
|
||||||
did not map well per suitable NUT standards: this allows to balance
|
|
||||||
having those drivers available in the project vs. least surprise
|
|
||||||
for when the explicitly experimental names are changed to something
|
|
||||||
stable and standardized.
|
|
||||||
* Proposed to track Date and Time values (still as "opaque strings")
|
|
||||||
preferably in representations compatible to ISO-8601/RFC-3339 [PR #1076]
|
|
||||||
(standards update; changes to actual codebase to be applied in the future)
|
|
||||||
** New routine to convert a US formatted date string "MM/DD/YYYY" to an
|
|
||||||
ISO 8601 Calendar date "YYYY-MM-DD" was added to snmp-ups.c [PR #1078]
|
|
||||||
|
|
||||||
- Master/Slave terminology was deprecated in favor of Primary/Secondary
|
|
||||||
modes of `upsmon` client:
|
|
||||||
* Respective keywords in the configuration files (`upsd.users` and
|
|
||||||
`upsmon.conf`) are supported as backwards-compatible settings,
|
|
||||||
but the obsoleted values are no longer documented.
|
|
||||||
* Protocol keyword support was similarly updated, with `upsmon` now
|
|
||||||
first trying to elevate privileges with `PRIMARY <ups>` request,
|
|
||||||
and falling back to `MASTER <ups>` just in case it talks to an
|
|
||||||
older build of an `upsd` server.
|
|
||||||
* For the principle of least surprise, NUT codebase still exposes the
|
|
||||||
`net_master()` (as handler for `MASTER` net command) in header and
|
|
||||||
C code for the sake of existing linked binaries, and returns the
|
|
||||||
`OK MASTER-GRANTED` line to the older client that invoked it.
|
|
||||||
* Newly introduced `net_primary()` (as handler for `PRIMARY` net command)
|
|
||||||
calls the exact same application logic, but returns `OK PRIMARY-GRANTED`
|
|
||||||
line to the client.
|
|
||||||
* Python binding updated to handle both cases, as the only found in-tree
|
|
||||||
protocol consumer of the full-line text.
|
|
||||||
* For more details see issue #840 and several pull requests referenced
|
|
||||||
from it, and discussions on NUT mailing lists.
|
|
||||||
|
|
||||||
- Build fixes:
|
|
||||||
* In general, numerous fixes were applied to ensure portability and avoid
|
|
||||||
warnings (fixing a number of real bugs that caused them); CI was extended
|
|
||||||
to keep the codebase free of those types of warnings which we have got
|
|
||||||
rid of, requiring builds to succeed cleanly in several dozen combinations
|
|
||||||
of compiler versions, C standard revisions (C99 upwards, though on many
|
|
||||||
OSes with GNU99+ extensions), operating systems and CPU architectures.
|
|
||||||
* Public CI introduced to automatically test every contribution (PR) and
|
|
||||||
resulting increment of main NUT codebase, including Travis CI and LGTM.com
|
|
||||||
services, and a Jenkins farm on virtual hardware donated by Fosshost.org;
|
|
||||||
this augments testing earlier provided for some branches by Buildbot.
|
|
||||||
* Added cppunit testing with valgrind for the C++ client library
|
|
||||||
* Make targets added for shell script syntax checks for helper and service
|
|
||||||
scripts
|
|
||||||
* Make targets added for spellcheck and for maintenance of the dictionary,
|
|
||||||
including incremental spellcheck to only parse recently edited text files
|
|
||||||
* The AsciiDoc detection has been reworked to allow NUT to be built from
|
|
||||||
source without requiring asciidoc/a2x (using pre-built man pages from
|
|
||||||
the distribution tarball, for instance)
|
|
||||||
* Makefile contents rearranged for more resilient out-of-tree and in-tree
|
|
||||||
builds beside those made from the root workspace directory
|
|
||||||
* Makefiles are tested with GNU Make and BSD Make to ensure portable recipes
|
|
||||||
* More use of `pkg-config` to detect dependencies at configure time, as
|
|
||||||
well as fail-safe detection of presence of pkg-config (and its macros)
|
|
||||||
to survive and build without it too
|
|
||||||
* "slibtool" pedantic nuances now supported, allowing an alternative to
|
|
||||||
GNU libtool
|
|
||||||
* Build scripts updated to remove obsoleted calls to cleanly work with
|
|
||||||
autoconf-2.70 releases in 2020 (also works with 2.69 which was the
|
|
||||||
earlier release since 2012)
|
|
||||||
* Dynamic library loading used in certain programs and use-cases improved,
|
|
||||||
especially for 64-bit vs 32-bit builds on multiple-bitness OSes
|
|
||||||
* Logging routines like `upsdebugx()` were refactored as macros so there
|
|
||||||
is slightly less overhead when logging is disabled [PRs #685 and #1100]
|
|
||||||
* Numerous classes of compilation warnings eradicated, many of those being
|
|
||||||
potential issues with implicit data type conversions and varied numeric
|
|
||||||
type width, signedness, string buffer size, uninitialized variables or
|
|
||||||
structure fields; some more in progress
|
|
||||||
* Several logical errors found and fixed during this walk over codebase.
|
|
||||||
* Cases where compilers were overly zealous and particular code was written
|
|
||||||
the way wit was intentionally, including some comparisons that help with
|
|
||||||
different-bitness builds but indeed seem superfluous in a certain single
|
|
||||||
bitness, were commented and encased in pragmas to disable the warnings
|
|
||||||
* Basic coding style (indentations, lack of trailing white space) applied
|
|
||||||
per developer guide, but not automatically enforced/checked yet.
|
|
||||||
|
|
||||||
- Due to changes needed to resolve build warnings, mostly about mismatching
|
|
||||||
data types for some variables, some structure definitions and API signatures
|
|
||||||
of several routines had to be changed for argument types, return types,
|
|
||||||
or both. Primarily this change concerns internal implementation details
|
|
||||||
(may impact update of NUT forks with custom drivers using those), but a
|
|
||||||
few changes also happened in header files installed for builds configured
|
|
||||||
`--with-dev` and so may impact `upsclient` and `nutclient` (C++) consumers.
|
|
||||||
At the very least, binaries for those consumers should be rebuilt to remain
|
|
||||||
stable with NUT 2.8.0 and not mismatch int-type sizes and other arguments.
|
|
||||||
|
|
||||||
- As usual, more bugfixes, cleanup and improvements, on both source code
|
|
||||||
and documentation.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.7.4 - what's new since 2.7.3:
|
Release notes for NUT 2.7.4 - what's new since 2.7.3:
|
||||||
|
@ -570,7 +164,7 @@ Release notes for NUT 2.7.3 - what's new since 2.7.2:
|
||||||
- all drivers: a new 'synchronous' driver flag is available for very verbose
|
- all drivers: a new 'synchronous' driver flag is available for very verbose
|
||||||
units, such as some ePDUs
|
units, such as some ePDUs
|
||||||
|
|
||||||
- Eaton:
|
- Eaton:
|
||||||
* Add support for EnergySaving features for Eaton UPSs (HID USB/SHUT and
|
* Add support for EnergySaving features for Eaton UPSs (HID USB/SHUT and
|
||||||
XCP USB/serial)
|
XCP USB/serial)
|
||||||
* Fix and complete Eaton ePDUs G2/G3 support
|
* Fix and complete Eaton ePDUs G2/G3 support
|
||||||
|
@ -594,7 +188,7 @@ Release notes for NUT 2.7.3 - what's new since 2.7.2:
|
||||||
NHS Sistemas de Energia Expert S Online 6000/8000/10000
|
NHS Sistemas de Energia Expert S Online 6000/8000/10000
|
||||||
Powercom BNT-xxxAP (USB product id: 0001)
|
Powercom BNT-xxxAP (USB product id: 0001)
|
||||||
Rucelf UPOII-3000-96-EL
|
Rucelf UPOII-3000-96-EL
|
||||||
Tripp Lite OMNIVSINT800
|
Tripp Lite OMNIVSINT800
|
||||||
Voltronic Power Apex 1KVA and Imperial 1KVA
|
Voltronic Power Apex 1KVA and Imperial 1KVA
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
@ -624,7 +218,7 @@ Release notes for NUT 2.7.2 - what's new since 2.7.1:
|
||||||
|
|
||||||
- snmp-ups: add support for XPPC-MIB and Tripp Lite SU10KRT3/1X.
|
- snmp-ups: add support for XPPC-MIB and Tripp Lite SU10KRT3/1X.
|
||||||
Also fix erroneous status in HP/Compaq SNMP MIB (with the most recent HP
|
Also fix erroneous status in HP/Compaq SNMP MIB (with the most recent HP
|
||||||
firmware (1.76) ; improved various MIBs (APC, HP/Compaq, ...)
|
firmware (1.76) ; improved various MIBs (APC, HP/Compaq, ...)
|
||||||
|
|
||||||
- nutdrv_qx: add new 'fallback' Q1 subdriver, with minimal 'Q1' support.
|
- nutdrv_qx: add new 'fallback' Q1 subdriver, with minimal 'Q1' support.
|
||||||
General improvements on all subdrivers.
|
General improvements on all subdrivers.
|
||||||
|
@ -691,7 +285,7 @@ Release notes for NUT 2.7.1 - what's new since 2.6.5:
|
||||||
- libnutclient has been added as a C++ alternative to libupsclient.
|
- libnutclient has been added as a C++ alternative to libupsclient.
|
||||||
|
|
||||||
- Packaging files for Solaris and HP-UX (sponsored by Eaton)
|
- Packaging files for Solaris and HP-UX (sponsored by Eaton)
|
||||||
|
|
||||||
- Fix shutdown of Eaton HID, using usbhid-ups and mge-shut
|
- Fix shutdown of Eaton HID, using usbhid-ups and mge-shut
|
||||||
|
|
||||||
- usbhid-ups: final fix for APC Back UPS ES. APC Back UPS ES devices have
|
- usbhid-ups: final fix for APC Back UPS ES. APC Back UPS ES devices have
|
||||||
|
@ -714,11 +308,11 @@ Release notes for NUT 2.7.1 - what's new since 2.6.5:
|
||||||
related to power devices and management
|
related to power devices and management
|
||||||
|
|
||||||
- Improve systemd integration
|
- Improve systemd integration
|
||||||
|
|
||||||
- snmp-ups: Fixed a crash on outlet management, and added delta_ups MIB
|
- snmp-ups: Fixed a crash on outlet management, and added delta_ups MIB
|
||||||
support. Also fixed mappings for upsBypassVoltage, upsBypassCurrent, and
|
support. Also fixed mappings for upsBypassVoltage, upsBypassCurrent, and
|
||||||
upsBypassPower in three-phase IETF MIB.
|
upsBypassPower in three-phase IETF MIB.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.6.5 - what's new since 2.6.4:
|
Release notes for NUT 2.6.5 - what's new since 2.6.4:
|
||||||
|
|
||||||
|
@ -755,7 +349,7 @@ Release notes for NUT 2.6.5 - what's new since 2.6.4:
|
||||||
VMware ESXI 5.0, through a native VIB package. This is, for the time
|
VMware ESXI 5.0, through a native VIB package. This is, for the time
|
||||||
being, an external effort from René Garcia (refer to the Download section
|
being, an external effort from René Garcia (refer to the Download section
|
||||||
on NUT website). But work is underway to improve this integration, and
|
on NUT website). But work is underway to improve this integration, and
|
||||||
include it in the NUT source tree
|
include it in the NUT source tree
|
||||||
|
|
||||||
- IPMI support (nut-ipmipsu driver and nut-scanner): prepare for supporting
|
- IPMI support (nut-ipmipsu driver and nut-scanner): prepare for supporting
|
||||||
API changes in upcoming FreeIPMI versions 1.1.x and 1.2.x.
|
API changes in upcoming FreeIPMI versions 1.1.x and 1.2.x.
|
||||||
|
@ -780,7 +374,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3:
|
||||||
especially from the network. Non printable characters were missed
|
especially from the network. Non printable characters were missed
|
||||||
from strings operation (such as strlen), but still copied to the
|
from strings operation (such as strlen), but still copied to the
|
||||||
buffer, causing an overflow.
|
buffer, causing an overflow.
|
||||||
Thus, fix NUT parser, to only allow the subset of ASCII charset from
|
Thus, fix NUT parser, to only allow the subset Ascii charset from
|
||||||
Space to ~
|
Space to ~
|
||||||
(Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944)
|
(Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944)
|
||||||
|
|
||||||
|
@ -830,7 +424,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3:
|
||||||
PowerShield Defender 1200VA
|
PowerShield Defender 1200VA
|
||||||
PowerWalker Online VFI LCD, Line-Interactive VI LCD and Line-Interactive VI
|
PowerWalker Online VFI LCD, Line-Interactive VI LCD and Line-Interactive VI
|
||||||
Riello Netman Plus 102 SNMP Card
|
Riello Netman Plus 102 SNMP Card
|
||||||
Tripp-Lite OMNISMART500
|
Tripp-Lite OMNISMART500
|
||||||
|
|
||||||
- apcsmart has received some fixes to work better on Mac OS X, and in general
|
- apcsmart has received some fixes to work better on Mac OS X, and in general
|
||||||
|
|
||||||
|
@ -842,7 +436,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3:
|
||||||
- blazer_ser and blazer_usb now try to automatically estimate high and low
|
- blazer_ser and blazer_usb now try to automatically estimate high and low
|
||||||
voltages, to be able to calculate battery charge ; support for online
|
voltages, to be able to calculate battery charge ; support for online
|
||||||
Innova UPS (T, RT and 3/1 T) has been added ; Best UPS support has been
|
Innova UPS (T, RT and 3/1 T) has been added ; Best UPS support has been
|
||||||
improved, to prepare for superseding bestups driver
|
improved, to prepare for superseeding bestups driver
|
||||||
|
|
||||||
- bestups has also received some care, though users are encouraged to switch
|
- bestups has also received some care, though users are encouraged to switch
|
||||||
to blazer_ser, since bestups will soon be deprecated.
|
to blazer_ser, since bestups will soon be deprecated.
|
||||||
|
@ -874,19 +468,19 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3:
|
||||||
|
|
||||||
- Riello protocols have been officially published in NUT protocols library:
|
- Riello protocols have been officially published in NUT protocols library:
|
||||||
http://www.networkupstools.org/ups-protocols.html#_riello
|
http://www.networkupstools.org/ups-protocols.html#_riello
|
||||||
|
|
||||||
- Duplicate instances of upsd / upsmon are now detected upon startup
|
- Duplicate instances of upsd / upsmon are now detected upon startup
|
||||||
|
|
||||||
- NUT variables namespace has been completed with missing variables and
|
- NUT variables namespace has been completed with missing variables and
|
||||||
commands that are already known and standard
|
commands that are already known and standard
|
||||||
|
|
||||||
- upslog now comes with a companion file, for logrotate configuration
|
- upslog now comes with a companion file, for logrotate configuration
|
||||||
|
|
||||||
- more devices embed NUT for power protection, now including Thecus NAS range
|
- more devices embed NUT for power protection, now including Thecus NAS range
|
||||||
|
|
||||||
- more bugfixes, cleanup and improvements, on both source code and
|
- more bugfixes, cleanup and improvements, on both source code and
|
||||||
documentation, with a good bunch from Greg A. Woods.
|
documentation, with a good bunch from Greg A. Woods.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.6.3 - what's new since 2.6.2:
|
Release notes for NUT 2.6.3 - what's new since 2.6.2:
|
||||||
|
|
||||||
|
@ -933,7 +527,7 @@ Release notes for NUT 2.6.3 - what's new since 2.6.2:
|
||||||
- Base files for HPUX packaging have been added. This is still a work in
|
- Base files for HPUX packaging have been added. This is still a work in
|
||||||
progress.
|
progress.
|
||||||
|
|
||||||
- Compilation on IBM AIX has been fixed (namespace conflict with ctypes).
|
- Compilation on IBM Aix has been fixed (namespace conflict with ctypes).
|
||||||
|
|
||||||
- more bugfixes, cleanup and improvements, on both source code and
|
- more bugfixes, cleanup and improvements, on both source code and
|
||||||
documentation.
|
documentation.
|
||||||
|
@ -956,7 +550,7 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1:
|
||||||
* SNMP,
|
* SNMP,
|
||||||
* XML/HTTP (from Eaton),
|
* XML/HTTP (from Eaton),
|
||||||
* NUT servers, using the classic connect or Avahi / mDNS methods.
|
* NUT servers, using the classic connect or Avahi / mDNS methods.
|
||||||
|
|
||||||
IPMI support will be added in the next release.
|
IPMI support will be added in the next release.
|
||||||
A separate library, called 'libnutscan', is also available to provide these
|
A separate library, called 'libnutscan', is also available to provide these
|
||||||
feature. Future NUT releases will provides binding for the supported
|
feature. Future NUT releases will provides binding for the supported
|
||||||
|
@ -968,10 +562,10 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1:
|
||||||
the future.
|
the future.
|
||||||
For more info, refer to nut/scripts/java/README, or the developer guide
|
For more info, refer to nut/scripts/java/README, or the developer guide
|
||||||
(chapter 'Creating new client'). Javadoc documentation is also provided,
|
(chapter 'Creating new client'). Javadoc documentation is also provided,
|
||||||
along with Java archives (.jar) in the Download section.
|
along with Java archives (.jar) in the Download section.
|
||||||
|
|
||||||
- support for new devices: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ;
|
- support for new devices: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ;
|
||||||
various APC models equipped with APC AP9618 management card, including APC
|
various APC models equiped with APC AP9618 management card, including APC
|
||||||
Smart-UPS RT XL ; Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker
|
Smart-UPS RT XL ; Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker
|
||||||
VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000).
|
VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000).
|
||||||
|
|
||||||
|
@ -996,9 +590,9 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1:
|
||||||
the default 3 seconds.
|
the default 3 seconds.
|
||||||
|
|
||||||
- snmp-ups.c has a new initialization method, that uses sysObjectID, which is
|
- snmp-ups.c has a new initialization method, that uses sysObjectID, which is
|
||||||
a pointer to the preferred MIB of the device, to detect supported devices.
|
a pointer to the prefered MIB of the device, to detect supported devices.
|
||||||
This speeds up even more init stage and should render void the use of 'mib'
|
This speeds up even more init stage and should render void the use of 'mib'
|
||||||
option. SNMP v3 session initialization has also been fixed, and Eaton PDU
|
option. SNMP v3 session initialisation has also been fixed, and Eaton PDU
|
||||||
support has been completed.
|
support has been completed.
|
||||||
|
|
||||||
- Initial support has been added for systemd, the System and Service Manager
|
- Initial support has been added for systemd, the System and Service Manager
|
||||||
|
@ -1010,7 +604,7 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1:
|
||||||
|
|
||||||
- Finally, after years of dedication to NUT, Arjen de Korte is now retired.
|
- Finally, after years of dedication to NUT, Arjen de Korte is now retired.
|
||||||
Sincere thanks to you Arjen from us all.
|
Sincere thanks to you Arjen from us all.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.6.1 - what's new since 2.6.0:
|
Release notes for NUT 2.6.1 - what's new since 2.6.0:
|
||||||
|
|
||||||
|
@ -1041,9 +635,9 @@ Release notes for NUT 2.6.1 - what's new since 2.6.0:
|
||||||
|
|
||||||
- usbhid-ups has completed a bit supported variables for APC and Eaton / MGE.
|
- usbhid-ups has completed a bit supported variables for APC and Eaton / MGE.
|
||||||
|
|
||||||
- on the quality assurance side, Eaton has worked on fixing a few
|
- on the quality assurance side, Eaton has worked on fixing a few non
|
||||||
non-conformance issues, like C++ style comments and warnings, using
|
conformances, like C++ style comments and warnings, using a newly developed
|
||||||
a newly developed verification tool (Prachi Gandhi).
|
verification tool (Prachi Gandhi).
|
||||||
|
|
||||||
- fix remaining references to LIBSSL_LDFLAGS, instead of LIBSSL_LIBS,
|
- fix remaining references to LIBSSL_LDFLAGS, instead of LIBSSL_LIBS,
|
||||||
which cause unresolved symbol on libupsclient users (Fabrice Coutadeur).
|
which cause unresolved symbol on libupsclient users (Fabrice Coutadeur).
|
||||||
|
@ -1102,7 +696,7 @@ Release notes for NUT 2.6.0 - what's new since 2.4.3:
|
||||||
|
|
||||||
- improve configure time dependencies checking and processing.
|
- improve configure time dependencies checking and processing.
|
||||||
|
|
||||||
- improve older Unix systems support (HP-UX, AIX, ...) for missing functions.
|
- improve older Unix systems support (HP-UX, Aix, ...) for missing functions.
|
||||||
|
|
||||||
- refresh and improve USB helper files (udev and UPower).
|
- refresh and improve USB helper files (udev and UPower).
|
||||||
|
|
||||||
|
@ -1173,8 +767,8 @@ Release notes for NUT 2.4.1 - what's new since 2.4.0:
|
||||||
version 1.1.
|
version 1.1.
|
||||||
|
|
||||||
- the situation of the build toolchain has been fixed, with regard to the
|
- the situation of the build toolchain has been fixed, with regard to the
|
||||||
"make clean" target and the wrongly removed generated USB files. This broke
|
"make clean" target and the wrongly removed generated USB files. This brokes
|
||||||
further configure call.
|
further configure call.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.4.0 - what's new since 2.2.2:
|
Release notes for NUT 2.4.0 - what's new since 2.2.2:
|
||||||
|
@ -1185,7 +779,7 @@ Release notes for NUT 2.4.0 - what's new since 2.2.2:
|
||||||
including: Eaton ePDUs (Managed and Monitored), some Aphel models, some
|
including: Eaton ePDUs (Managed and Monitored), some Aphel models, some
|
||||||
Raritan PDUs, and the whole list of Powerman supported devices:
|
Raritan PDUs, and the whole list of Powerman supported devices:
|
||||||
http://powerman.sourceforge.net/supported.html
|
http://powerman.sourceforge.net/supported.html
|
||||||
|
|
||||||
- support for new devices: the various PDUs cited above, Chloride Desk Power
|
- support for new devices: the various PDUs cited above, Chloride Desk Power
|
||||||
650, Cyber Power Systems Value 400E/600E/800E (USB models), Delta GES602N,
|
650, Cyber Power Systems Value 400E/600E/800E (USB models), Delta GES602N,
|
||||||
Digitus DN-170020, the whole Eaton ranges (mostly composed of MGE Office
|
Digitus DN-170020, the whole Eaton ranges (mostly composed of MGE Office
|
||||||
|
@ -1215,8 +809,8 @@ Release notes for NUT 2.4.0 - what's new since 2.2.2:
|
||||||
|
|
||||||
- NUT now ships a bash completion function for 'upsc' command
|
- NUT now ships a bash completion function for 'upsc' command
|
||||||
(scripts/misc/nut.bash_completion). Simply copy it to /etc/bash_completion.d
|
(scripts/misc/nut.bash_completion). Simply copy it to /etc/bash_completion.d
|
||||||
|
|
||||||
- many internal changes to improve maintainability, while lowering the
|
- many internal changes to improve maintenability, while lowering the
|
||||||
maintenance cost (thus allowing developers to focus on what matters: the
|
maintenance cost (thus allowing developers to focus on what matters: the
|
||||||
code!). Examples of this are:
|
code!). Examples of this are:
|
||||||
- the USB information automatic extraction to generate the various USB helper
|
- the USB information automatic extraction to generate the various USB helper
|
||||||
|
@ -1233,7 +827,7 @@ Release notes for NUT 2.2.2 - what's new since 2.2.1:
|
||||||
- support for new devices: APC BACK-UPS XS LCD, Atlantis Land,
|
- support for new devices: APC BACK-UPS XS LCD, Atlantis Land,
|
||||||
Mustek Powermust Office 650, Oneac XAU models, Powerware PW5115 and
|
Mustek Powermust Office 650, Oneac XAU models, Powerware PW5115 and
|
||||||
PW9120 (USB), Nitram Elite 2005
|
PW9120 (USB), Nitram Elite 2005
|
||||||
|
|
||||||
- Integrated Power Management (NUT HAL integration) has reached a
|
- Integrated Power Management (NUT HAL integration) has reached a
|
||||||
major milestone: it is now the most advanced UPS integration into
|
major milestone: it is now the most advanced UPS integration into
|
||||||
Power Management layer known in existing OSs. It has received many
|
Power Management layer known in existing OSs. It has received many
|
||||||
|
@ -1252,15 +846,15 @@ Release notes for NUT 2.2.2 - what's new since 2.2.1:
|
||||||
|
|
||||||
- the netxml-ups driver has appeared to support MGE* network HTTP/XML
|
- the netxml-ups driver has appeared to support MGE* network HTTP/XML
|
||||||
cards.
|
cards.
|
||||||
|
|
||||||
- NUT now distributes by default the shared version of libupsclient
|
- NUT now distributes by default the shared version of libupsclient
|
||||||
(version 1.0.0), and use this for the provided clients (upsmon, upsc,
|
(version 1.0.0), and use this for the provided clients (upsmon, upsc,
|
||||||
upsrw, upscmd). This is part of an effort to reduce NUT's footprint,
|
upsrw, upscmd). This is part of an effort to reduce NUT's footprint,
|
||||||
both on disk and in memory.
|
both on disk and in memory.
|
||||||
|
|
||||||
- powerpanel has reach a new step toward the replacement of nitram and
|
- powerpanel has reach a new step toward the replacement of nitram and
|
||||||
cpsups drivers. The final step is scheduled for NUT 2.4.
|
cpsups drivers. The final step is scheduled for NUT 2.4.
|
||||||
|
|
||||||
- many changes, cleanup and fixes to the NUT core and various drivers.
|
- many changes, cleanup and fixes to the NUT core and various drivers.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
@ -1280,7 +874,7 @@ Release notes for NUT 2.2.1 - what's new since 2.2.0:
|
||||||
|
|
||||||
- the megatec and megatec_usb drivers have also been backported from the
|
- the megatec and megatec_usb drivers have also been backported from the
|
||||||
development (trunk) version.
|
development (trunk) version.
|
||||||
|
|
||||||
- the client development files have also received some care:
|
- the client development files have also received some care:
|
||||||
the upsclient pkg-config file has been fixed, and the upsclient.h
|
the upsclient pkg-config file has been fixed, and the upsclient.h
|
||||||
file allows older NUT clients to continue using the UPSCONN structure.
|
file allows older NUT clients to continue using the UPSCONN structure.
|
||||||
|
@ -1332,7 +926,7 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4:
|
||||||
|
|
||||||
This release is a backport of the development version. Many changes
|
This release is a backport of the development version. Many changes
|
||||||
have already been backported previously. Thus it is more a
|
have already been backported previously. Thus it is more a
|
||||||
synchronization release, though it includes many bugfixes and support
|
synchronisation release, though it includes many bugfixes and support
|
||||||
for new models.
|
for new models.
|
||||||
|
|
||||||
- support for new devices: APC Smart-UPS with 6TI firmware; Belkin
|
- support for new devices: APC Smart-UPS with 6TI firmware; Belkin
|
||||||
|
@ -1355,7 +949,7 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4:
|
||||||
|
|
||||||
- solis: shutdown programming, support new cables, Solaris support
|
- solis: shutdown programming, support new cables, Solaris support
|
||||||
|
|
||||||
- tripplite_usb: updated SMARTPRO support, fixed OL/OB reporting,
|
- tripplite_usb: updated SMARTPRO support, fixed OL/OB reporting,
|
||||||
better error handling, some memory bugs
|
better error handling, some memory bugs
|
||||||
|
|
||||||
- new dummy-ups driver simulator
|
- new dummy-ups driver simulator
|
||||||
|
@ -1366,12 +960,12 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4:
|
||||||
Release notes for NUT 2.0.4 - what's new since 2.0.3:
|
Release notes for NUT 2.0.4 - what's new since 2.0.3:
|
||||||
|
|
||||||
- The newhidups critical bug (segmentation fault) has been fixed. It has
|
- The newhidups critical bug (segmentation fault) has been fixed. It has
|
||||||
also received some more care, like bugfixes and new models support and
|
also received some more care, like buxfixes and new models support and
|
||||||
enhancement for Solaris.
|
enhancement for Solaris.
|
||||||
[Peter Selinger and Arnaud Quette]
|
[Peter Selinger and Arnaud Quette]
|
||||||
|
|
||||||
- A bug has been fixed in NUT core to support resuming from suspend-to-disk.
|
- A bug has been fixed in NUT core to support resuming from suspend-to-disk.
|
||||||
This should also fix other similar issues, like time synchronization
|
This should also fix other similar issues, like time synchronisation
|
||||||
through the NTP - Network Time Protocol.
|
through the NTP - Network Time Protocol.
|
||||||
[Arjen de Korte]
|
[Arjen de Korte]
|
||||||
|
|
||||||
|
@ -1394,7 +988,7 @@ Release notes for NUT 2.0.4 - what's new since 2.0.3:
|
||||||
[Carlos Rodrigues]
|
[Carlos Rodrigues]
|
||||||
|
|
||||||
- The new rhino driver was added to support Microsol Rhino UPS hardware
|
- The new rhino driver was added to support Microsol Rhino UPS hardware
|
||||||
The solis has also been improved for Solaris compatibility, and
|
The solis has also been improved for solaris compatibility, and
|
||||||
internal / external shutdown programming. solis can now save external
|
internal / external shutdown programming. solis can now save external
|
||||||
shutdown programming to ups, and support new cables for solis 3
|
shutdown programming to ups, and support new cables for solis 3
|
||||||
[Silvino B. Magalhães]
|
[Silvino B. Magalhães]
|
||||||
|
@ -1434,7 +1028,7 @@ Release notes for NUT 2.0.3 - what's new since 2.0.2:
|
||||||
ups.model retrieval for some specific case (release 0.65)
|
ups.model retrieval for some specific case (release 0.65)
|
||||||
|
|
||||||
- The drivers don't change to the "statepath" directory anymore at
|
- The drivers don't change to the "statepath" directory anymore at
|
||||||
initialization time if called using -k. This avoid unneeded
|
initialisation time if called using -k. This avoid unneeded
|
||||||
failure to poweroff the UPS if /var is already unmounted.
|
failure to poweroff the UPS if /var is already unmounted.
|
||||||
[Gaspar Bakos]
|
[Gaspar Bakos]
|
||||||
|
|
||||||
|
@ -1454,7 +1048,7 @@ Release notes for NUT 2.0.3 - what's new since 2.0.2:
|
||||||
- The packaging files for Red Hat have received various fixes
|
- The packaging files for Red Hat have received various fixes
|
||||||
[Thomas Jarosch]
|
[Thomas Jarosch]
|
||||||
|
|
||||||
- The solis driver has been fixed to avoid a naming collision and
|
- The solis driver has been fixed to avoid a naming colision and
|
||||||
compile on Solaris
|
compile on Solaris
|
||||||
[Paweł Kierdelewicz]
|
[Paweł Kierdelewicz]
|
||||||
|
|
||||||
|
@ -1496,7 +1090,7 @@ Release notes for NUT 2.0.2 - what's new since 2.0.1:
|
||||||
[Thanos Chatziathanassiou, Olli Salvia]
|
[Thanos Chatziathanassiou, Olli Salvia]
|
||||||
|
|
||||||
- The bcmxcp driver is back with support for Powerware UPSs.
|
- The bcmxcp driver is back with support for Powerware UPSs.
|
||||||
[Tore Ørpetveit, Kjell Claesson]
|
[Tore Øpetveit, Kjell Claesson]
|
||||||
|
|
||||||
- The cyberpower driver now supports CyberPower 1000AVR.
|
- The cyberpower driver now supports CyberPower 1000AVR.
|
||||||
[Dave Huang]
|
[Dave Huang]
|
||||||
|
@ -1507,7 +1101,7 @@ Release notes for NUT 2.0.2 - what's new since 2.0.1:
|
||||||
|
|
||||||
- The apcsmart driver has fixed APC600 support.
|
- The apcsmart driver has fixed APC600 support.
|
||||||
|
|
||||||
- The etapro driver fixes brokenness due to ser_get_line use
|
- The etapro driver fixes brokeness due to ser_get_line use
|
||||||
[Marek Michalkiewicz]
|
[Marek Michalkiewicz]
|
||||||
|
|
||||||
- The new upscode2 driver supports Fiskars, Compaq and Powerware
|
- The new upscode2 driver supports Fiskars, Compaq and Powerware
|
||||||
|
@ -1546,7 +1140,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0:
|
||||||
- The everups driver now supports types 73-76 (NET 700/1000/1400/500-DPC)
|
- The everups driver now supports types 73-76 (NET 700/1000/1400/500-DPC)
|
||||||
[hunter]
|
[hunter]
|
||||||
|
|
||||||
- The new metasys driver supports Meta System models: Line,
|
- The new metasys driver supports Meta System models: Line,
|
||||||
HF Millennium, HF Top Line, ECO Network, ECO, Ally HF, Megaline
|
HF Millennium, HF Top Line, ECO Network, ECO, Ally HF, Megaline
|
||||||
[BlaXwan]
|
[BlaXwan]
|
||||||
|
|
||||||
|
@ -1559,7 +1153,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0:
|
||||||
and bypass control.
|
and bypass control.
|
||||||
[Gert Lynge]
|
[Gert Lynge]
|
||||||
|
|
||||||
- The tripplite driver has received a major overhaul to bring it up to
|
- The tripplite driver has recieved a major overhaul to bring it up to
|
||||||
working condition for the 2.0 tree, including code cleanups, several
|
working condition for the 2.0 tree, including code cleanups, several
|
||||||
new variables, commands, and user-definable parameters. See
|
new variables, commands, and user-definable parameters. See
|
||||||
ChangeLog for more.
|
ChangeLog for more.
|
||||||
|
@ -1598,7 +1192,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0:
|
||||||
[Arnaud Quette]
|
[Arnaud Quette]
|
||||||
|
|
||||||
- The fentonups driver now recognizes several more Megatec protocol
|
- The fentonups driver now recognizes several more Megatec protocol
|
||||||
units:
|
units:
|
||||||
|
|
||||||
SuperPower HP360, Hope-550 [Denis Zaika]
|
SuperPower HP360, Hope-550 [Denis Zaika]
|
||||||
Unitek Alpha 1000is [Antoine Cuvellard]
|
Unitek Alpha 1000is [Antoine Cuvellard]
|
||||||
|
@ -1612,7 +1206,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0:
|
||||||
|
|
||||||
- upssched's CANCEL events were broken following the change to
|
- upssched's CANCEL events were broken following the change to
|
||||||
text-based socket messages in 1.5 and have been fixed.
|
text-based socket messages in 1.5 and have been fixed.
|
||||||
[Steven Schoch]
|
[Steven Schoch]
|
||||||
|
|
||||||
- Calls to varargs functions with raw strings from the config files
|
- Calls to varargs functions with raw strings from the config files
|
||||||
without an intervening "%s" have been fixed in upsmon, upssched,
|
without an intervening "%s" have been fixed in upsmon, upssched,
|
||||||
|
@ -1631,8 +1225,8 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x:
|
||||||
interim compatibility hacks have been removed.
|
interim compatibility hacks have been removed.
|
||||||
|
|
||||||
- New serial handling code has been added, with greatly simplified
|
- New serial handling code has been added, with greatly simplified
|
||||||
operations. The old mess involving repeated calls to sigaction,
|
operations. The old mess involving repeated calls to sigaction,
|
||||||
alarm, and read has been condensed to a select-read loop.
|
alarm, and read has been condensed to a select-read loop.
|
||||||
|
|
||||||
This change allows drivers which don't do any serial communications
|
This change allows drivers which don't do any serial communications
|
||||||
at all (hidups, snmp-ups) to drop that baggage, so they are a bit
|
at all (hidups, snmp-ups) to drop that baggage, so they are a bit
|
||||||
|
@ -1683,13 +1277,13 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x:
|
||||||
[Viktor T. Toth]
|
[Viktor T. Toth]
|
||||||
|
|
||||||
- The newhidups driver has been merged as the first step towards
|
- The newhidups driver has been merged as the first step towards
|
||||||
portable USB UPS support. This will eventually replace the old
|
portable USB UPS support. This will eventually replace the old
|
||||||
Linux-only hidups driver. The newhidups driver is tagged
|
Linux-only hidups driver. The newhidups driver is tagged
|
||||||
experimental since it is under active development.
|
experimental since it is under active development.
|
||||||
[Arnaud Quette, Charles Lepple]
|
[Arnaud Quette, Charles Lepple]
|
||||||
|
|
||||||
- The newapc driver has been renamed to apcsmart, replacing the old
|
- The newapc driver has been renamed to apcsmart, replacing the old
|
||||||
driver with that name. If you used the newapc driver, be sure to
|
driver with that name. If you used the newapc driver, be sure to
|
||||||
delete the old binary and fix your ups.conf.
|
delete the old binary and fix your ups.conf.
|
||||||
|
|
||||||
- The apcsmart driver now supports asynchronous notification data
|
- The apcsmart driver now supports asynchronous notification data
|
||||||
|
@ -1718,7 +1312,7 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x:
|
||||||
instcmds.
|
instcmds.
|
||||||
|
|
||||||
- Effekta MT 2000 RM hardware is now supported by the fentonups driver.
|
- Effekta MT 2000 RM hardware is now supported by the fentonups driver.
|
||||||
[Christoph Moar]
|
[christoph moar]
|
||||||
|
|
||||||
- The new safenet driver supports UPS hardware that uses the protocol
|
- The new safenet driver supports UPS hardware that uses the protocol
|
||||||
of the same name. This includes models from many manufacturers,
|
of the same name. This includes models from many manufacturers,
|
||||||
|
@ -1782,20 +1376,20 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
|
|
||||||
- upssched now explicitly confirms reception of timer commands before
|
- upssched now explicitly confirms reception of timer commands before
|
||||||
exiting. This was done to avoid a race where one process would
|
exiting. This was done to avoid a race where one process would
|
||||||
exit right when another one was starting. The second one would
|
exit right when another one was starting. The second one would
|
||||||
believe its command had been handled when it had been lost.
|
believe its command had been handled when it had been lost.
|
||||||
|
|
||||||
- upslog has been reworked to use standard getopt parsing to provide
|
- upslog has been reworked to use standard getopt parsing to provide
|
||||||
the monitoring settings. The old way of specifying arguments is
|
the monitoring settings. The old way of specifying arguments is
|
||||||
still supported for backwards compatibility.
|
still supported for backwards compatibility.
|
||||||
|
|
||||||
upslog has also been changed to only parse the format string once,
|
upslog has also been changed to only parse the format string once,
|
||||||
rather than doing it every time through the loop. This should
|
rather than doing it every time through the loop. This should
|
||||||
provide a minuscule drop in CPU utilization.
|
provide a minuscule drop in CPU utilization.
|
||||||
|
|
||||||
- Usernames are now required in upsmon and upsd. This means that you
|
- Usernames are now required in upsmon and upsd. This means that you
|
||||||
must add a username to your MONITOR lines in upsmon.conf and then
|
must add a username to your MONITOR lines in upsmon.conf and then
|
||||||
create a matching user in upsd.users.
|
create a matching user in upsd.users.
|
||||||
|
|
||||||
Installations from the 1.2 era probably already use usernames, so
|
Installations from the 1.2 era probably already use usernames, so
|
||||||
this mostly affects those from 1.0 and before.
|
this mostly affects those from 1.0 and before.
|
||||||
|
@ -1832,14 +1426,14 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
|
|
||||||
- Signal handlers no longer do any significant amount of work. Some of
|
- Signal handlers no longer do any significant amount of work. Some of
|
||||||
the programs used to do numerous things in there, raising concerns
|
the programs used to do numerous things in there, raising concerns
|
||||||
about reentrancy. They now set flags and allow the main loop to do
|
about reentrancy. They now set flags and allow the main loop to do
|
||||||
the actual work from there.
|
the actual work from there.
|
||||||
|
|
||||||
- A bug in upsmon where NOTIFYFLAG settings could be ignored was fixed.
|
- A bug in upsmon where NOTIFYFLAG settings could be ignored was fixed.
|
||||||
|
|
||||||
- Group handling has been changed. configure no longer accepts
|
- Group handling has been changed. configure no longer accepts
|
||||||
--with-group, and the programs no longer setgid() to a hardcoded
|
--with-group, and the programs no longer setgid() to a hardcoded
|
||||||
value. They now setgid() to the primary group of whatever the
|
value. They now setgid() to the primary group of whatever the
|
||||||
user value may be.
|
user value may be.
|
||||||
|
|
||||||
This may be compiled in with --with-user as before, and many programs
|
This may be compiled in with --with-user as before, and many programs
|
||||||
|
@ -1866,7 +1460,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
battery tests were also added.
|
battery tests were also added.
|
||||||
|
|
||||||
- The dummyups testing driver has been removed. The dummycons testing
|
- The dummyups testing driver has been removed. The dummycons testing
|
||||||
driver can do everything that dummyups once did and much more.
|
driver can do everything that dummyups once did and much more.
|
||||||
dummycons is also now built by default for easier testing.
|
dummycons is also now built by default for easier testing.
|
||||||
|
|
||||||
- The newapc driver has been reworked to take advantage of the new
|
- The newapc driver has been reworked to take advantage of the new
|
||||||
|
@ -1881,7 +1475,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
a shutdown sequence, and more.
|
a shutdown sequence, and more.
|
||||||
[Arnaud Quette]
|
[Arnaud Quette]
|
||||||
|
|
||||||
- The mge-utalk driver had trouble establishing communications in
|
- The mge-utalk driver had trouble establishing communications in
|
||||||
some cases due to the RTS line being set. This has been fixed.
|
some cases due to the RTS line being set. This has been fixed.
|
||||||
|
|
||||||
The mge-shut driver has been added to the tree, and has replaced
|
The mge-shut driver has been added to the tree, and has replaced
|
||||||
|
@ -1897,7 +1491,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
others before long.
|
others before long.
|
||||||
[Arnaud Quette]
|
[Arnaud Quette]
|
||||||
|
|
||||||
- KIN-2200AP hardware is now recognized by the powercom driver.
|
- KIN-2200AP hardware is now recognized by the powercom driver.
|
||||||
This change may also support other KIN-xxxxAP equipment.
|
This change may also support other KIN-xxxxAP equipment.
|
||||||
[Preston A. Elder]
|
[Preston A. Elder]
|
||||||
|
|
||||||
|
@ -1975,7 +1569,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x:
|
||||||
- The inline keyword is now handled properly on systems which do not
|
- The inline keyword is now handled properly on systems which do not
|
||||||
support it or have it specified as another name. This was breaking
|
support it or have it specified as another name. This was breaking
|
||||||
compiles on some systems.
|
compiles on some systems.
|
||||||
[Petter Reinholdtsen]
|
[Petter Reinholdtsen]
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 1.2.2 - what's new since 1.2.1:
|
Release notes for NUT 1.2.2 - what's new since 1.2.1:
|
||||||
|
@ -2013,7 +1607,7 @@ Release notes for NUT 1.2.2 - what's new since 1.2.1:
|
||||||
[Alex Cichowski]
|
[Alex Cichowski]
|
||||||
|
|
||||||
- The liebert driver also now uses debouncing logic on the status
|
- The liebert driver also now uses debouncing logic on the status
|
||||||
lines. It was possible to get false readings that would start a
|
lines. It was possible to get false readings that would start a
|
||||||
shutdown or just annoy users with excessive onbatt/online notify
|
shutdown or just annoy users with excessive onbatt/online notify
|
||||||
messages. The new code forces the status to settle down for 3 polls
|
messages. The new code forces the status to settle down for 3 polls
|
||||||
before accepting the new value.
|
before accepting the new value.
|
||||||
|
@ -2060,7 +1654,7 @@ Release notes for NUT 1.2.2 - what's new since 1.2.1:
|
||||||
|
|
||||||
- upsd no longer tries to reference a deleted client structure if the
|
- upsd no longer tries to reference a deleted client structure if the
|
||||||
client disconnects at the wrong time. Previously, it tried to use
|
client disconnects at the wrong time. Previously, it tried to use
|
||||||
that pointer after the sendback() function had already failed on
|
that pointer after the sendback() function had already failed on
|
||||||
write and deleted the client. This could cause upsd to segfault
|
write and deleted the client. This could cause upsd to segfault
|
||||||
depending on what areas were accessed.
|
depending on what areas were accessed.
|
||||||
[Patrik Schindler]
|
[Patrik Schindler]
|
||||||
|
@ -2082,7 +1676,7 @@ Release notes for NUT 1.2.1 - what's new since 1.2.0:
|
||||||
- The old multilink driver is back with a new name: liebert. It
|
- The old multilink driver is back with a new name: liebert. It
|
||||||
supports Liebert UPStation GXE hardware with the contact-closure
|
supports Liebert UPStation GXE hardware with the contact-closure
|
||||||
cable. This is currently an experimental driver as there is no
|
cable. This is currently an experimental driver as there is no
|
||||||
way to power down the load.
|
way to power down the load.
|
||||||
|
|
||||||
- configure now picks up the right flags for gd automatically if gd
|
- configure now picks up the right flags for gd automatically if gd
|
||||||
2.0.8 or higher is installed. This greatly simplifies the CGI build
|
2.0.8 or higher is installed. This greatly simplifies the CGI build
|
||||||
|
|
90
README
90
README
|
@ -102,7 +102,7 @@ This package is broken down into several categories:
|
||||||
- *clients* - They talk to upsd and do things with the status data.
|
- *clients* - They talk to upsd and do things with the status data.
|
||||||
- *cgi-bin* - Special class of clients that you can use with your web server.
|
- *cgi-bin* - Special class of clients that you can use with your web server.
|
||||||
- *scripts* - Contains various scripts, like the Perl and Python binding,
|
- *scripts* - Contains various scripts, like the Perl and Python binding,
|
||||||
integration bits and applications.
|
integration bits and applications.
|
||||||
|
|
||||||
Drivers
|
Drivers
|
||||||
-------
|
-------
|
||||||
|
@ -120,9 +120,8 @@ The entry in `ups.conf` looks like this:
|
||||||
driver = apcsmart
|
driver = apcsmart
|
||||||
port = /dev/ttyS1
|
port = /dev/ttyS1
|
||||||
|
|
||||||
To start and stop drivers, use upsdrvctl of upsdrvsvcctl (installed on
|
To start and stop drivers, use upsdrvctl. By default, it will start or
|
||||||
operating systems with a service management framework supported by NUT).
|
stop every UPS in the config file:
|
||||||
By default, it will start or stop every UPS in the config file:
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsdrvctl start
|
/usr/local/ups/sbin/upsdrvctl start
|
||||||
/usr/local/ups/sbin/upsdrvctl stop
|
/usr/local/ups/sbin/upsdrvctl stop
|
||||||
|
@ -132,17 +131,6 @@ However, you can also just start or stop one by adding its name:
|
||||||
/usr/local/ups/sbin/upsdrvctl start sparky
|
/usr/local/ups/sbin/upsdrvctl start sparky
|
||||||
/usr/local/ups/sbin/upsdrvctl stop sparky
|
/usr/local/ups/sbin/upsdrvctl stop sparky
|
||||||
|
|
||||||
On operating systems with a supported service management framework,
|
|
||||||
you might wrap your NUT drivers into individual services instances
|
|
||||||
with:
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsdrvsvcctl resync
|
|
||||||
|
|
||||||
and then manage those service instances with commands like:
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsdrvsvcctl start sparky
|
|
||||||
/usr/local/ups/sbin/upsdrvsvcctl stop sparky
|
|
||||||
|
|
||||||
To find the driver name for your device, refer to the section below
|
To find the driver name for your device, refer to the section below
|
||||||
called "HARDWARE SUPPORT TABLE".
|
called "HARDWARE SUPPORT TABLE".
|
||||||
|
|
||||||
|
@ -248,8 +236,8 @@ Power distribution unit management
|
||||||
|
|
||||||
NUT also provides an advanced support for power distribution units.
|
NUT also provides an advanced support for power distribution units.
|
||||||
|
|
||||||
You should read the <<outlet_management,NUT outlets management and PDU notes>>
|
You should read the <<Outlets_PDU_notes,Configuring automatic UPS shutdowns>>
|
||||||
chapter to learn more about when to use this feature.
|
chapter to learn more about when to use this feature.
|
||||||
|
|
||||||
Network Server
|
Network Server
|
||||||
--------------
|
--------------
|
||||||
|
@ -273,52 +261,32 @@ separate section in the documentation since it is so important.
|
||||||
|
|
||||||
You configure it by telling it about UPSes that you want to monitor in
|
You configure it by telling it about UPSes that you want to monitor in
|
||||||
upsmon.conf. Each UPS can be defined as one of two possible types:
|
upsmon.conf. Each UPS can be defined as one of two possible types:
|
||||||
a "primary" or "secondary".
|
|
||||||
|
|
||||||
Primary
|
Master
|
||||||
~~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
The monitored UPS possibly supplies power to this system running `upsmon`,
|
This UPS supplies power to the system running `upsmon`, and this system is also
|
||||||
but more importantly -- this system can manage the UPS (typically, this
|
responsible for shutting it down when the battery is depleted. This occurs
|
||||||
instance of `upsmon` runs on the same system as the `upsd` and driver(s)):
|
after any slave systems have disconnected safely.
|
||||||
it is capable and responsible for shutting it down when the battery is
|
|
||||||
depleted (or in another approach, lingering to deplete it or to tell the
|
|
||||||
UPS to reboot its load after too much time has elapsed and this system
|
|
||||||
is still alive -- meaning wall power returned at a "wrong" moment).
|
|
||||||
|
|
||||||
The shutdown of this (primary) system itself, as well as eventually an
|
If your UPS is plugged directly into a system's serial port, the `upsmon`
|
||||||
UPS shutdown, occurs after any secondary systems ordered to shut down
|
process on that system should define that UPS as a master.
|
||||||
first have disconnected, or a critical urgency threshold was passed.
|
|
||||||
|
|
||||||
If your UPS is plugged directly into a system's serial or USB port, the
|
|
||||||
`upsmon` process on that system should define its relation to that UPS
|
|
||||||
as a primary. It may be more complicated for higher-end UPSes with a
|
|
||||||
shared network management capability (typically via SNMP) or several
|
|
||||||
serial/USB ports that can be used simultaneously, and depends on what
|
|
||||||
vendors and drivers implement. Setups with several competing primaries
|
|
||||||
(for redundancy) are technically possible, if each one runs its own
|
|
||||||
full stack of NUT, but results can be random (currently NUT does not
|
|
||||||
provide a way to coordinate several entities managing the same device).
|
|
||||||
|
|
||||||
For a typical home user, there's one computer connected to one UPS.
|
For a typical home user, there's one computer connected to one UPS.
|
||||||
That means you would run on the same computer the whole NUT stack --
|
That means you run a driver, `upsd`, and `upsmon` in master mode.
|
||||||
a suitable driver, `upsd`, and `upsmon` in primary mode.
|
|
||||||
|
|
||||||
Secondary
|
Slave
|
||||||
~~~~~~~~~
|
~~~~~
|
||||||
|
|
||||||
The monitored UPS may supply power to the system running `upsmon` (or
|
This UPS may supply power to the system running `upsmon`, but this system can't
|
||||||
alternatively, it may be a monitoring station with zero PSUs fed by
|
shut it down directly.
|
||||||
that UPS), but more importantly, this system can't manage the UPS --
|
|
||||||
e.g. shut it down directly (through a locally running NUT driver).
|
|
||||||
|
|
||||||
Use this mode when you run multiple computers on the same UPS.
|
Use this mode when you run multiple computers on the same UPS. Obviously, only
|
||||||
Obviously, only one can be connected to the serial or USB port
|
one can be connected to the serial port on the UPS, and that system is the
|
||||||
on a typical UPS, and that system is the primary. Everything
|
master. Everything else is a slave.
|
||||||
else is a secondary.
|
|
||||||
|
|
||||||
For a typical home user, there's one computer connected to one UPS.
|
For a typical home user, there's one computer connected to one UPS.
|
||||||
That means you run a driver, `upsd`, and `upsmon` in primary mode.
|
That means you run a driver, upsd, and upsmon in master mode.
|
||||||
|
|
||||||
Additional Information
|
Additional Information
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -508,11 +476,7 @@ The past stable trees were 1.0, 1.2, 1.4, 2.0, 2.2 and 2.4, with the
|
||||||
latest stable tree designated 2.6. The development trees were 1.1, 1.3,
|
latest stable tree designated 2.6. The development trees were 1.1, 1.3,
|
||||||
1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development
|
1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development
|
||||||
branch anymore since the code is available through a revision control
|
branch anymore since the code is available through a revision control
|
||||||
system (namely Subversion) and snapshots. Since 2.7 line of releases,
|
system (namely Subversion) and snapshots.
|
||||||
sources are tracked in Git revision control system, with the project
|
|
||||||
ecosystem being hosted on GitHub, and improvements or other contributions
|
|
||||||
merged through common pull request approach and custom NUT CI testing
|
|
||||||
on multiple platforms.
|
|
||||||
|
|
||||||
Major release jumps are mostly due to large changes to the features
|
Major release jumps are mostly due to large changes to the features
|
||||||
list. There have also been a number of architectural changes which
|
list. There have also been a number of architectural changes which
|
||||||
|
@ -522,11 +486,11 @@ may not be noticeable to most users, but which can impact developers.
|
||||||
Backwards and Forwards Compatibility
|
Backwards and Forwards Compatibility
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
The old network code spans a range from about 0.41.1 when TCP support
|
The old network code spans a range from about 0.41.1 when TCP support
|
||||||
was introduced up to the recent 1.4 series. It used variable names
|
was introduced up to the recent 1.4 series. It used variable names
|
||||||
like STATUS, UTILITY, and LOADPCT. Many of these names go back to the
|
like STATUS, UTILITY, and LOADPCT. Many of these names go back to the
|
||||||
earliest prototypes of this software from 1997. At that point there
|
earliest prototypes of this software from 1997. At that point there
|
||||||
was no way to know that so many drivers would come along and introduce
|
was no way to know that so many drivers would come along and introduce
|
||||||
so many new variables and commands. The resulting mess grew out of
|
so many new variables and commands. The resulting mess grew out of
|
||||||
control over the years.
|
control over the years.
|
||||||
|
|
||||||
|
@ -558,9 +522,9 @@ Here's a table to make it easier to visualize:
|
||||||
|=============================================
|
|=============================================
|
||||||
|
|
||||||
Version 2.0, and more recent, do not contain backwards compatibility for
|
Version 2.0, and more recent, do not contain backwards compatibility for
|
||||||
the old protocol and variable/command names. As a result, 2.0 clients can't
|
the old protocol and variable/command names. As a result, 2.0 clients can't
|
||||||
talk to anything older than a 1.4 server. If you ask a 2.0 client to
|
talk to anything older than a 1.4 server. If you ask a 2.0 client to
|
||||||
fetch "STATUS", it will fail. You'll have to ask for "ups.status"
|
fetch "STATUS", it will fail. You'll have to ask for "ups.status"
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
Authors of separate monitoring programs should have used the 1.4 series
|
Authors of separate monitoring programs should have used the 1.4 series
|
||||||
|
|
4
TODO
4
TODO
|
@ -13,7 +13,7 @@ Roadmap
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
This release is focused on the website and documentation rewrite, using
|
This release is focused on the website and documentation rewrite, using
|
||||||
the excellent link:https://asciidoc.org/[AsciiDoc].
|
the excellent link:http://www.methods.co.nz/asciidoc[AsciiDoc].
|
||||||
|
|
||||||
2.8
|
2.8
|
||||||
^^^
|
^^^
|
||||||
|
@ -113,6 +113,6 @@ and https://alioth.debian.org/tracker/?atid=411545&group_id=30602&func=browse[fe
|
||||||
solar panel driver, and the powerman internal approach of a generic engine with
|
solar panel driver, and the powerman internal approach of a generic engine with
|
||||||
a scripting interface is a cool idea.
|
a scripting interface is a cool idea.
|
||||||
Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup
|
Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup
|
||||||
- integrate the (future) new powerman LUA engine (maybe/must-be used for the driver above?)
|
- integrate the (future) new powerman LUA engine (maybe/mustbe used for the driver above?)
|
||||||
for native PDU support
|
for native PDU support
|
||||||
- see how we can help and collaborate with DeviceKit-power
|
- see how we can help and collaborate with DeviceKit-power
|
||||||
|
|
130
UPGRADING
130
UPGRADING
|
@ -7,132 +7,6 @@ This file lists changes that affect users who installed older versions
|
||||||
of this software. When upgrading from an older version, be sure to
|
of this software. When upgrading from an older version, be sure to
|
||||||
check this file to see if you need to make changes to your system.
|
check this file to see if you need to make changes to your system.
|
||||||
|
|
||||||
Changes from 2.7.4 to 2.8.0
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
- Note to distribution packagers: this version hopefully learns from many
|
|
||||||
past mistakes, so many custom patches may be no longer needed. If some
|
|
||||||
remain, please consider making pull requests for upstream NUT codebase
|
|
||||||
to share the fixes consistently across the ecosystem. Also note that
|
|
||||||
some new types of drivers (so package groups with unique dependencies)
|
|
||||||
could have appeared since your packaging was written (e.g. with modbus),
|
|
||||||
as well as new features in systemd integration (`nut-driver@instances`
|
|
||||||
and the `nut-driver-enumerator` to manage their population), as well as
|
|
||||||
updated Python 2 and Python 3 support (again, maybe dictating different
|
|
||||||
package groups) as detailed below.
|
|
||||||
|
|
||||||
- Due to changes needed to resolve build warnings, mostly about mismatching
|
|
||||||
data types for some variables, some structure definitions and API signatures
|
|
||||||
of several routines had to be changed for argument types, return types,
|
|
||||||
or both. Primarily this change concerns internal implementation details
|
|
||||||
(may impact update of NUT forks with custom drivers using those), but a
|
|
||||||
few changes also happened in header files installed for builds configured
|
|
||||||
`--with-dev` and so may impact `upsclient` and `nutclient` (C++) consumers.
|
|
||||||
At the very least, binaries for those consumers should be rebuilt to remain
|
|
||||||
stable with NUT 2.8.0 and not mismatch int-type sizes and other arguments.
|
|
||||||
|
|
||||||
- libusb-1.0: NUT now defaults to building against libusb-1.0 API version
|
|
||||||
if the configure script finds the development headers, falling back to
|
|
||||||
libusb-0.1 if not. Please report any regressions.
|
|
||||||
|
|
||||||
- apcupsd-ups: When monitoring a remote apcupsd server, interpret "SHUTTING
|
|
||||||
DOWN" as a NUT "LB" status. If you were relying on the previous behavior
|
|
||||||
(for instance, in a monitor-only situation), please adjust your upsmon
|
|
||||||
settings. Reference: https://github.com/networkupstools/nut/issues/460
|
|
||||||
|
|
||||||
- Packagers: the AsciiDoc detection has been reworked to allow NUT to be built
|
|
||||||
from source without requiring asciidoc/a2x (using pre-built man pages from
|
|
||||||
the distribution tarball, for instance). Please double-check that we did not
|
|
||||||
break anything (see docs/configure.txt for options).
|
|
||||||
|
|
||||||
- Driver core: options added for standalone mode (scanning for devices without
|
|
||||||
requiring ups.conf) - see docs/man/nutupsdrv.txt for details.
|
|
||||||
|
|
||||||
- oldmge-shut has been removed, and replaced by mge-shut.
|
|
||||||
|
|
||||||
- New drivers for devices with "Qx" (also known as "Megatec Q*") family of
|
|
||||||
protocols should be developed as sub-drivers in the `nutdrv_qx` framework
|
|
||||||
for USB and Serial connected devices, not as updates/clones of older e.g.
|
|
||||||
`blazer` family and `bestups`. Sources, man pages and start-up messages
|
|
||||||
of such older drivers were marked with "OBSOLETION WARNING".
|
|
||||||
|
|
||||||
- liebert-esp2: some multi-phase variable names have been updated to match the
|
|
||||||
rest of NUT.
|
|
||||||
|
|
||||||
- netxml-ups: if you have old firmware, or were relying on values being off by
|
|
||||||
a factor of 10, consider the `do_convert_deci` flag. See
|
|
||||||
docs/man/netxml-ups.txt for details.
|
|
||||||
|
|
||||||
- snmp-ups: detection of Net-SNMP has been updated to use `pkg-config` by
|
|
||||||
default (if present), rather than `net-snmp-config(-32|-64)` script(s) as
|
|
||||||
the only option available previously. The scripts tend to specify a lot
|
|
||||||
of options (sometimes platform-specific) in suggested `CFLAGS` and `LIBS`
|
|
||||||
compared to the packaged `pkg-config` information which also works and is
|
|
||||||
more portable. If this change bites your distribution, please bring it up
|
|
||||||
in https://github.com/networkupstools/nut/issues or better yet, post a PR.
|
|
||||||
Also note that `./configure --with-netsnmp-config(=yes)` should set up the
|
|
||||||
preference of the detected script over `pkg-config` information, if both
|
|
||||||
are available, and `--with-netsnmp-config=/path/name` would as well.
|
|
||||||
|
|
||||||
- snmp-ups: bit mask values for flags in earlier codebase were defined in a
|
|
||||||
way that caused logically different items to have same numeric values.
|
|
||||||
This was fixed to surely use different definitions (so changing numbers
|
|
||||||
behind some of those macro symbols), and testing with UPS, ePDU and ATS
|
|
||||||
hardware which was available did not expose any practical differences.
|
|
||||||
|
|
||||||
- usbhid-ups: numeric data conversion from wire protocol to CPU representation
|
|
||||||
in GetValue() was completely reworked, aiming to be correct on all CPU types.
|
|
||||||
That said, regressions are possible and feedback is welcome.
|
|
||||||
|
|
||||||
- nut-scanner: Packagers, take note of the changes to the library
|
|
||||||
search code in common/common.c. Please file an issue if this does not work
|
|
||||||
with your platform.
|
|
||||||
|
|
||||||
- dummy-ups can now specify `mode` as a driver argument, and separates the
|
|
||||||
notion of `dummy-once` (new default for `*.dev` files that do not change)
|
|
||||||
vs. `dummy-loop` (legacy default for `*.seq` and others) [issue #1385]
|
|
||||||
|
|
||||||
* Note this can break third-party test scripts which expected `*.dev`
|
|
||||||
files to work as a looping sequence with a `TIMER` keywords to change
|
|
||||||
values slowly; now such files should get processed to the end once.
|
|
||||||
Specify `mode=dummy-loop` driver option or rename the data file used
|
|
||||||
in the `port` option for legacy behavior.
|
|
||||||
Use/Test-cases which modified such files content externally should
|
|
||||||
not be impacted.
|
|
||||||
|
|
||||||
- Python: scripts have been updated to work with Python 3 as well as 2.
|
|
||||||
|
|
||||||
* PyNUT module (protocol binding) supports both Python generations.
|
|
||||||
|
|
||||||
* NUT-Monitor (desktop UI client) got separated into two projects:
|
|
||||||
one with support for Python2 and GTK2, and another for Python3 and Qt5.
|
|
||||||
On operating systems that serve both environments, either of these
|
|
||||||
implementation should be usable. For distributions that deprecated
|
|
||||||
and removed Python2 support, it is a point to consider in NUT packages
|
|
||||||
and their build-time and installation dependencies.
|
|
||||||
The historic filenames for desktop integration (`NUT-Monitor` script
|
|
||||||
and `nut-monitor.desktop`) are still delivered, but now cover a wrapper
|
|
||||||
script which detects the environment capabilities and launches the best
|
|
||||||
suitable UI implementation (if both are available).
|
|
||||||
|
|
||||||
- apcsmart: updates to CS "hack" (see docs/man/apcsmart.txt for details)
|
|
||||||
|
|
||||||
- upsdebugx(): added `[D#]` prefix to log entries with level > 0
|
|
||||||
so if any scripts or other tools relied on parsing those messages
|
|
||||||
making some assumptions, they should be updated
|
|
||||||
|
|
||||||
- upsdebugx() and related methods are now macros, optionally calling similarly
|
|
||||||
named implementations like s_upsdebugx() as a slight optimization; this may
|
|
||||||
show up in linking of binaries for some customized build scenarios
|
|
||||||
|
|
||||||
- libraries, tools and protocol now support a `TRACKING` ID to be used with
|
|
||||||
an `INSTCMD` or `SET VAR` requests; for details see docs/net-protocol.txt
|
|
||||||
and docs/sock-protocol.txt
|
|
||||||
|
|
||||||
- upsrw: display the variable type beside ENUM / RANGE
|
|
||||||
|
|
||||||
- Augeas: new `--with-augeas-lenses-dir` configure option.
|
|
||||||
|
|
||||||
Changes from 2.7.3 to 2.7.4
|
Changes from 2.7.3 to 2.7.4
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
@ -297,7 +171,7 @@ Changes from 2.2.1 to 2.2.2
|
||||||
This enable the additional build and distribution of the static
|
This enable the additional build and distribution of the static
|
||||||
version of libupsclient, along with the pkg-config helper and manual
|
version of libupsclient, along with the pkg-config helper and manual
|
||||||
pages. The default configure option is to distribute only the shared
|
pages. The default configure option is to distribute only the shared
|
||||||
version of libupsclient. This can be overridden by using the
|
version of libupsclient. This can be overriden by using the
|
||||||
"--disable-shared" configure option (distribute static only binaries).
|
"--disable-shared" configure option (distribute static only binaries).
|
||||||
- The UPS poweroff handling of the usbhid-ups driver has been reworked.
|
- The UPS poweroff handling of the usbhid-ups driver has been reworked.
|
||||||
Though regression is not expected, users of this driver are
|
Though regression is not expected, users of this driver are
|
||||||
|
@ -308,7 +182,7 @@ Changes from 2.2.0 to 2.2.1
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
- nothing that affects upgraded systems.
|
- nothing that affects upgraded systems.
|
||||||
(The below message is repeated due to previous omission)
|
(The below message is repetead due to previous omission)
|
||||||
- Developers of external client application using libupsclient are
|
- Developers of external client application using libupsclient are
|
||||||
encouraged to rename their "UPSCONN" client structure to "UPSCONN_t"
|
encouraged to rename their "UPSCONN" client structure to "UPSCONN_t"
|
||||||
since the former will disappear by the release of NUT 2.4.
|
since the former will disappear by the release of NUT 2.4.
|
||||||
|
|
548
aclocal.m4
vendored
548
aclocal.m4
vendored
|
@ -1,6 +1,6 @@
|
||||||
# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
|
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -20,63 +20,146 @@ You have another version of autoconf. It may work, but is not guaranteed to.
|
||||||
If you have problems, you may need to regenerate the build system entirely.
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||||
|
|
||||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
# longlong.m4 serial 17
|
||||||
# serial 12 (pkg-config-0.29.2)
|
dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
dnl From Paul Eggert.
|
||||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
|
||||||
dnl
|
|
||||||
dnl This program is free software; you can redistribute it and/or modify
|
|
||||||
dnl it under the terms of the GNU General Public License as published by
|
|
||||||
dnl the Free Software Foundation; either version 2 of the License, or
|
|
||||||
dnl (at your option) any later version.
|
|
||||||
dnl
|
|
||||||
dnl This program is distributed in the hope that it will be useful, but
|
|
||||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
dnl General Public License for more details.
|
|
||||||
dnl
|
|
||||||
dnl You should have received a copy of the GNU General Public License
|
|
||||||
dnl along with this program; if not, write to the Free Software
|
|
||||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
dnl 02111-1307, USA.
|
|
||||||
dnl
|
|
||||||
dnl As a special exception to the GNU General Public License, if you
|
|
||||||
dnl distribute this file as part of a program that contains a
|
|
||||||
dnl configuration script generated by Autoconf, you may include it under
|
|
||||||
dnl the same distribution terms that you use for the rest of that
|
|
||||||
dnl program.
|
|
||||||
|
|
||||||
dnl PKG_PREREQ(MIN-VERSION)
|
# Define HAVE_LONG_LONG_INT if 'long long int' works.
|
||||||
dnl -----------------------
|
# This fixes a bug in Autoconf 2.61, and can be faster
|
||||||
dnl Since: 0.29
|
# than what's in Autoconf 2.62 through 2.68.
|
||||||
dnl
|
|
||||||
dnl Verify that the version of the pkg-config macros are at least
|
|
||||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
|
||||||
dnl installed version of pkg-config, this checks the developer's version
|
|
||||||
dnl of pkg.m4 when generating configure.
|
|
||||||
dnl
|
|
||||||
dnl To ensure that this macro is defined, also add:
|
|
||||||
dnl m4_ifndef([PKG_PREREQ],
|
|
||||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
|
||||||
dnl
|
|
||||||
dnl See the "Since" comment for each macro you use to see what version
|
|
||||||
dnl of the macros you require.
|
|
||||||
m4_defun([PKG_PREREQ],
|
|
||||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
|
||||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
|
||||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
|
||||||
])dnl PKG_PREREQ
|
|
||||||
|
|
||||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
# Note: If the type 'long long int' exists but is only 32 bits large
|
||||||
dnl ----------------------------------
|
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
|
||||||
dnl Since: 0.16
|
# defined. In this case you can treat 'long long int' like 'long int'.
|
||||||
dnl
|
|
||||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
|
||||||
dnl first found in the path. Checks that the version of pkg-config found
|
[
|
||||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
|
||||||
dnl used since that's the first version where most current features of
|
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
|
||||||
dnl pkg-config existed.
|
[ac_cv_type_long_long_int=yes
|
||||||
|
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||||
|
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
|
||||||
|
if test $ac_cv_type_long_long_int = yes; then
|
||||||
|
dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
|
||||||
|
dnl If cross compiling, assume the bug is not important, since
|
||||||
|
dnl nobody cross compiles for this platform as far as we know.
|
||||||
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM(
|
||||||
|
[[@%:@include <limits.h>
|
||||||
|
@%:@ifndef LLONG_MAX
|
||||||
|
@%:@ define HALF \
|
||||||
|
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
|
||||||
|
@%:@ define LLONG_MAX (HALF - 1 + HALF)
|
||||||
|
@%:@endif]],
|
||||||
|
[[long long int n = 1;
|
||||||
|
int i;
|
||||||
|
for (i = 0; ; i++)
|
||||||
|
{
|
||||||
|
long long int m = n << i;
|
||||||
|
if (m >> i != n)
|
||||||
|
return 1;
|
||||||
|
if (LLONG_MAX / 2 < m)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;]])],
|
||||||
|
[],
|
||||||
|
[ac_cv_type_long_long_int=no],
|
||||||
|
[:])
|
||||||
|
fi
|
||||||
|
fi])
|
||||||
|
if test $ac_cv_type_long_long_int = yes; then
|
||||||
|
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
|
||||||
|
[Define to 1 if the system has the type 'long long int'.])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
|
||||||
|
# This fixes a bug in Autoconf 2.61, and can be faster
|
||||||
|
# than what's in Autoconf 2.62 through 2.68.
|
||||||
|
|
||||||
|
# Note: If the type 'unsigned long long int' exists but is only 32 bits
|
||||||
|
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
|
||||||
|
# will not be defined. In this case you can treat 'unsigned long long int'
|
||||||
|
# like 'unsigned long int'.
|
||||||
|
|
||||||
|
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([for unsigned long long int],
|
||||||
|
[ac_cv_type_unsigned_long_long_int],
|
||||||
|
[ac_cv_type_unsigned_long_long_int=yes
|
||||||
|
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[_AC_TYPE_LONG_LONG_SNIPPET],
|
||||||
|
[],
|
||||||
|
[ac_cv_type_unsigned_long_long_int=no])
|
||||||
|
fi])
|
||||||
|
if test $ac_cv_type_unsigned_long_long_int = yes; then
|
||||||
|
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
|
||||||
|
[Define to 1 if the system has the type 'unsigned long long int'.])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Expands to a C program that can be used to test for simultaneous support
|
||||||
|
# of 'long long' and 'unsigned long long'. We don't want to say that
|
||||||
|
# 'long long' is available if 'unsigned long long' is not, or vice versa,
|
||||||
|
# because too many programs rely on the symmetry between signed and unsigned
|
||||||
|
# integer types (excluding 'bool').
|
||||||
|
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
|
||||||
|
[
|
||||||
|
AC_LANG_PROGRAM(
|
||||||
|
[[/* For now, do not test the preprocessor; as of 2007 there are too many
|
||||||
|
implementations with broken preprocessors. Perhaps this can
|
||||||
|
be revisited in 2012. In the meantime, code should not expect
|
||||||
|
#if to work with literals wider than 32 bits. */
|
||||||
|
/* Test literals. */
|
||||||
|
long long int ll = 9223372036854775807ll;
|
||||||
|
long long int nll = -9223372036854775807LL;
|
||||||
|
unsigned long long int ull = 18446744073709551615ULL;
|
||||||
|
/* Test constant expressions. */
|
||||||
|
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
|
||||||
|
? 1 : -1)];
|
||||||
|
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
|
||||||
|
? 1 : -1)];
|
||||||
|
int i = 63;]],
|
||||||
|
[[/* Test availability of runtime routines for shift and division. */
|
||||||
|
long long int llmax = 9223372036854775807ll;
|
||||||
|
unsigned long long int ullmax = 18446744073709551615ull;
|
||||||
|
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
|
||||||
|
| (llmax / ll) | (llmax % ll)
|
||||||
|
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
|
||||||
|
| (ullmax / ull) | (ullmax % ull));]])
|
||||||
|
])
|
||||||
|
|
||||||
|
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||||
|
# serial 1 (pkg-config-0.24)
|
||||||
|
#
|
||||||
|
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||||
|
#
|
||||||
|
# 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 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, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||||
|
# ----------------------------------
|
||||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||||
|
@ -98,19 +181,18 @@ if test -n "$PKG_CONFIG"; then
|
||||||
PKG_CONFIG=""
|
PKG_CONFIG=""
|
||||||
fi
|
fi
|
||||||
fi[]dnl
|
fi[]dnl
|
||||||
])dnl PKG_PROG_PKG_CONFIG
|
])# PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
dnl -------------------------------------------------------------------
|
#
|
||||||
dnl Since: 0.18
|
# Check to see whether a particular set of modules exists. Similar
|
||||||
dnl
|
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||||
dnl Check to see whether a particular set of modules exists. Similar to
|
#
|
||||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
dnl
|
# only at the first occurence in configure.ac, so if the first place
|
||||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
# it's called might be skipped (such as if it is within an "if", you
|
||||||
dnl only at the first occurence in configure.ac, so if the first place
|
# have to call PKG_CHECK_EXISTS manually
|
||||||
dnl it's called might be skipped (such as if it is within an "if", you
|
# --------------------------------------------------------------
|
||||||
dnl have to call PKG_CHECK_EXISTS manually
|
|
||||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
if test -n "$PKG_CONFIG" && \
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
@ -120,10 +202,8 @@ m4_ifvaln([$3], [else
|
||||||
$3])dnl
|
$3])dnl
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||||
dnl ---------------------------------------------
|
# ---------------------------------------------
|
||||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
|
||||||
dnl pkg_failed based on the result.
|
|
||||||
m4_define([_PKG_CONFIG],
|
m4_define([_PKG_CONFIG],
|
||||||
[if test -n "$$1"; then
|
[if test -n "$$1"; then
|
||||||
pkg_cv_[]$1="$$1"
|
pkg_cv_[]$1="$$1"
|
||||||
|
@ -135,11 +215,10 @@ m4_define([_PKG_CONFIG],
|
||||||
else
|
else
|
||||||
pkg_failed=untried
|
pkg_failed=untried
|
||||||
fi[]dnl
|
fi[]dnl
|
||||||
])dnl _PKG_CONFIG
|
])# _PKG_CONFIG
|
||||||
|
|
||||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
# _PKG_SHORT_ERRORS_SUPPORTED
|
||||||
dnl ---------------------------
|
# -----------------------------
|
||||||
dnl Internal check to see if pkg-config supports short errors.
|
|
||||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
@ -147,24 +226,26 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
else
|
else
|
||||||
_pkg_short_errors_supported=no
|
_pkg_short_errors_supported=no
|
||||||
fi[]dnl
|
fi[]dnl
|
||||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
])# _PKG_SHORT_ERRORS_SUPPORTED
|
||||||
|
|
||||||
|
|
||||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||||
dnl [ACTION-IF-NOT-FOUND])
|
# [ACTION-IF-NOT-FOUND])
|
||||||
dnl --------------------------------------------------------------
|
#
|
||||||
dnl Since: 0.4.0
|
#
|
||||||
dnl
|
# Note that if there is a possibility the first call to
|
||||||
dnl Note that if there is a possibility the first call to
|
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
#
|
||||||
|
#
|
||||||
|
# --------------------------------------------------------------
|
||||||
AC_DEFUN([PKG_CHECK_MODULES],
|
AC_DEFUN([PKG_CHECK_MODULES],
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||||
|
|
||||||
pkg_failed=no
|
pkg_failed=no
|
||||||
AC_MSG_CHECKING([for $2])
|
AC_MSG_CHECKING([for $1])
|
||||||
|
|
||||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||||
|
@ -174,11 +255,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
||||||
See the pkg-config man page for more details.])
|
See the pkg-config man page for more details.])
|
||||||
|
|
||||||
if test $pkg_failed = yes; then
|
if test $pkg_failed = yes; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
_PKG_SHORT_ERRORS_SUPPORTED
|
_PKG_SHORT_ERRORS_SUPPORTED
|
||||||
if test $_pkg_short_errors_supported = yes; then
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||||
else
|
else
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||||
fi
|
fi
|
||||||
# Put the nasty error message in config.log where it belongs
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
@ -195,7 +276,7 @@ installed software in a non-standard prefix.
|
||||||
_PKG_TEXT])[]dnl
|
_PKG_TEXT])[]dnl
|
||||||
])
|
])
|
||||||
elif test $pkg_failed = untried; then
|
elif test $pkg_failed = untried; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
m4_default([$4], [AC_MSG_FAILURE(
|
m4_default([$4], [AC_MSG_FAILURE(
|
||||||
[The pkg-config script could not be found or is too old. Make sure it
|
[The pkg-config script could not be found or is too old. Make sure it
|
||||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||||
|
@ -211,40 +292,16 @@ else
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
$3
|
$3
|
||||||
fi[]dnl
|
fi[]dnl
|
||||||
])dnl PKG_CHECK_MODULES
|
])# PKG_CHECK_MODULES
|
||||||
|
|
||||||
|
|
||||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
# PKG_INSTALLDIR(DIRECTORY)
|
||||||
dnl [ACTION-IF-NOT-FOUND])
|
# -------------------------
|
||||||
dnl ---------------------------------------------------------------------
|
# Substitutes the variable pkgconfigdir as the location where a module
|
||||||
dnl Since: 0.29
|
# should install pkg-config .pc files. By default the directory is
|
||||||
dnl
|
# $libdir/pkgconfig, but the default can be changed by passing
|
||||||
dnl Checks for existence of MODULES and gathers its build flags with
|
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
# parameter.
|
||||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
|
||||||
dnl
|
|
||||||
dnl Note that if there is a possibility the first call to
|
|
||||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
|
||||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
|
||||||
dnl configure.ac.
|
|
||||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
||||||
_save_PKG_CONFIG=$PKG_CONFIG
|
|
||||||
PKG_CONFIG="$PKG_CONFIG --static"
|
|
||||||
PKG_CHECK_MODULES($@)
|
|
||||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
|
||||||
])dnl PKG_CHECK_MODULES_STATIC
|
|
||||||
|
|
||||||
|
|
||||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
|
||||||
dnl -------------------------
|
|
||||||
dnl Since: 0.27
|
|
||||||
dnl
|
|
||||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
|
||||||
dnl should install pkg-config .pc files. By default the directory is
|
|
||||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
|
||||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
|
||||||
dnl parameter.
|
|
||||||
AC_DEFUN([PKG_INSTALLDIR],
|
AC_DEFUN([PKG_INSTALLDIR],
|
||||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||||
m4_pushdef([pkg_description],
|
m4_pushdef([pkg_description],
|
||||||
|
@ -255,18 +312,16 @@ AC_ARG_WITH([pkgconfigdir],
|
||||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||||
m4_popdef([pkg_default])
|
m4_popdef([pkg_default])
|
||||||
m4_popdef([pkg_description])
|
m4_popdef([pkg_description])
|
||||||
])dnl PKG_INSTALLDIR
|
]) dnl PKG_INSTALLDIR
|
||||||
|
|
||||||
|
|
||||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||||
dnl --------------------------------
|
# -------------------------
|
||||||
dnl Since: 0.27
|
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||||
dnl
|
# module should install arch-independent pkg-config .pc files. By
|
||||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
# default the directory is $datadir/pkgconfig, but the default can be
|
||||||
dnl module should install arch-independent pkg-config .pc files. By
|
# changed by passing DIRECTORY. The user can override through the
|
||||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
# --with-noarch-pkgconfigdir parameter.
|
||||||
dnl changed by passing DIRECTORY. The user can override through the
|
|
||||||
dnl --with-noarch-pkgconfigdir parameter.
|
|
||||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||||
m4_pushdef([pkg_description],
|
m4_pushdef([pkg_description],
|
||||||
|
@ -277,15 +332,13 @@ AC_ARG_WITH([noarch-pkgconfigdir],
|
||||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||||
m4_popdef([pkg_default])
|
m4_popdef([pkg_default])
|
||||||
m4_popdef([pkg_description])
|
m4_popdef([pkg_description])
|
||||||
])dnl PKG_NOARCH_INSTALLDIR
|
]) dnl PKG_NOARCH_INSTALLDIR
|
||||||
|
|
||||||
|
|
||||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
dnl -------------------------------------------
|
# -------------------------------------------
|
||||||
dnl Since: 0.28
|
# Retrieves the value of the pkg-config variable for the given module.
|
||||||
dnl
|
|
||||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
|
||||||
AC_DEFUN([PKG_CHECK_VAR],
|
AC_DEFUN([PKG_CHECK_VAR],
|
||||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||||
|
@ -294,9 +347,9 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||||
|
|
||||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||||
])dnl PKG_CHECK_VAR
|
])# PKG_CHECK_VAR
|
||||||
|
|
||||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -308,10 +361,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||||
# generated from the m4 files accompanying Automake X.Y.
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
# (This private macro should not be called outside this file.)
|
# (This private macro should not be called outside this file.)
|
||||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.16'
|
[am__api_version='1.14'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||||
dnl require some minimum version. Point them to the right macro.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.16.3], [],
|
m4_if([$1], [1.14.1], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -327,14 +380,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.16.3])dnl
|
[AM_AUTOMAKE_VERSION([1.14.1])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -386,7 +439,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -417,7 +470,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||||
Usually this means the macro was only invoked conditionally.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -608,12 +661,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
|
||||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
@ -621,43 +675,49 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
# Older Autoconf quotes --file arguments for eval, but not when files
|
# Older Autoconf quotes --file arguments for eval, but not when files
|
||||||
# are listed without --file. Let's play safe and only enable the eval
|
# are listed without --file. Let's play safe and only enable the eval
|
||||||
# if we detect the quoting.
|
# if we detect the quoting.
|
||||||
# TODO: see whether this extra hack can be removed once we start
|
case $CONFIG_FILES in
|
||||||
# requiring Autoconf 2.70 or later.
|
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||||
AS_CASE([$CONFIG_FILES],
|
*) set x $CONFIG_FILES ;;
|
||||||
[*\'*], [eval set x "$CONFIG_FILES"],
|
esac
|
||||||
[*], [set x $CONFIG_FILES])
|
|
||||||
shift
|
shift
|
||||||
# Used to flag and report bootstrapping failures.
|
for mf
|
||||||
am_rc=0
|
|
||||||
for am_mf
|
|
||||||
do
|
do
|
||||||
# Strip MF so we end up with the name of the file.
|
# Strip MF so we end up with the name of the file.
|
||||||
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||||
# Check whether this is an Automake generated Makefile which includes
|
# Check whether this is an Automake generated Makefile or not.
|
||||||
# dependency-tracking related rules and includes.
|
# We used to match only the files named 'Makefile.in', but
|
||||||
# Grep'ing the whole file directly is not great: AIX grep has a line
|
# some people rename them; so instead we look at the file content.
|
||||||
|
# Grep'ing the first line is not enough: some people post-process
|
||||||
|
# each Makefile.in and add a new line on top of each file to say so.
|
||||||
|
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||||
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||||
|| continue
|
dirpart=`AS_DIRNAME("$mf")`
|
||||||
am_dirpart=`AS_DIRNAME(["$am_mf"])`
|
else
|
||||||
am_filepart=`AS_BASENAME(["$am_mf"])`
|
continue
|
||||||
AM_RUN_LOG([cd "$am_dirpart" \
|
fi
|
||||||
&& sed -e '/# am--include-marker/d' "$am_filepart" \
|
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||||
| $MAKE -f - am--depfiles]) || am_rc=$?
|
# from the Makefile without running 'make'.
|
||||||
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
|
test -z "$DEPDIR" && continue
|
||||||
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
|
test -z "$am__include" && continue
|
||||||
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
|
# Find all dependency output files, they are included files with
|
||||||
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||||
|
# expansion.
|
||||||
|
for file in `sed -n "
|
||||||
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||||
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
|
||||||
|
# Make sure the directory exists.
|
||||||
|
test -f "$dirpart/$file" && continue
|
||||||
|
fdir=`AS_DIRNAME(["$file"])`
|
||||||
|
AS_MKDIR_P([$dirpart/$fdir])
|
||||||
|
# echo "creating $dirpart/$file"
|
||||||
|
echo '# dummy' > "$dirpart/$file"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
if test $am_rc -ne 0; then
|
|
||||||
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
|
|
||||||
for automatic dependency tracking. If GNU make was not used, consider
|
|
||||||
re-running the configure script with MAKE="gmake" (or whatever is
|
|
||||||
necessary). You can also try re-running configure with the
|
|
||||||
'--disable-dependency-tracking' option to at least be able to build
|
|
||||||
the package (albeit without support for automatic dependency tracking).])
|
|
||||||
fi
|
|
||||||
AS_UNSET([am_dirpart])
|
|
||||||
AS_UNSET([am_filepart])
|
|
||||||
AS_UNSET([am_mf])
|
|
||||||
AS_UNSET([am_rc])
|
|
||||||
rm -f conftest-deps.mk
|
|
||||||
}
|
}
|
||||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||||
|
|
||||||
|
@ -666,17 +726,18 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||||
#
|
#
|
||||||
# This code is only required when automatic dependency tracking is enabled.
|
# This code is only required when automatic dependency tracking
|
||||||
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
|
# is enabled. FIXME. This creates each '.P' file that we will
|
||||||
# order to bootstrap the dependency handling code.
|
# need in order to bootstrap the dependency handling code.
|
||||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
[AC_CONFIG_COMMANDS([depfiles],
|
[AC_CONFIG_COMMANDS([depfiles],
|
||||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||||
|
])
|
||||||
|
|
||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -763,11 +824,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||||
# dies out for good. For more background, see:
|
# dies out for good. For more background, see:
|
||||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||||
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||||
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
# We need awk for the "check" target. The system "awk" is bad on
|
||||||
# system "awk" is bad on some platforms.
|
# some platforms.
|
||||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||||
|
@ -831,7 +892,7 @@ END
|
||||||
Aborting the configuration process, to ensure you take notice of the issue.
|
Aborting the configuration process, to ensure you take notice of the issue.
|
||||||
|
|
||||||
You can download and install GNU coreutils to get an 'rm' implementation
|
You can download and install GNU coreutils to get an 'rm' implementation
|
||||||
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
||||||
|
|
||||||
If you want to complete the configuration process using your problematic
|
If you want to complete the configuration process using your problematic
|
||||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||||
|
@ -841,9 +902,6 @@ END
|
||||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
dnl The trailing newline in this macro's definition is deliberate, for
|
|
||||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
|
||||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||||
|
@ -873,7 +931,7 @@ for _am_header in $config_headers :; do
|
||||||
done
|
done
|
||||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -884,7 +942,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
|
||||||
# Define $install_sh.
|
# Define $install_sh.
|
||||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
if test x"${install_sh+set}" != xset; then
|
if test x"${install_sh}" != xset; then
|
||||||
case $am_aux_dir in
|
case $am_aux_dir in
|
||||||
*\ * | *\ *)
|
*\ * | *\ *)
|
||||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||||
|
@ -894,7 +952,7 @@ if test x"${install_sh+set}" != xset; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST([install_sh])])
|
AC_SUBST([install_sh])])
|
||||||
|
|
||||||
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -916,7 +974,7 @@ AC_SUBST([am__leading_dot])])
|
||||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||||
# From Jim Meyering
|
# From Jim Meyering
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -951,7 +1009,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -959,42 +1017,49 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||||
|
|
||||||
# AM_MAKE_INCLUDE()
|
# AM_MAKE_INCLUDE()
|
||||||
# -----------------
|
# -----------------
|
||||||
# Check whether make has an 'include' directive that can support all
|
# Check to see how make treats includes.
|
||||||
# the idioms we need for our automatic dependency tracking code.
|
|
||||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||||
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
|
[am_make=${MAKE-make}
|
||||||
cat > confinc.mk << 'END'
|
cat > confinc << 'END'
|
||||||
am__doit:
|
am__doit:
|
||||||
@echo this is the am__doit target >confinc.out
|
@echo this is the am__doit target
|
||||||
.PHONY: am__doit
|
.PHONY: am__doit
|
||||||
END
|
END
|
||||||
|
# If we don't find an include directive, just comment out the code.
|
||||||
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||||
am__include="#"
|
am__include="#"
|
||||||
am__quote=
|
am__quote=
|
||||||
# BSD make does it like this.
|
_am_result=none
|
||||||
echo '.include "confinc.mk" # ignored' > confmf.BSD
|
# First try GNU make style include.
|
||||||
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
|
echo "include confinc" > confmf
|
||||||
echo 'include confinc.mk # ignored' > confmf.GNU
|
# Ignore all kinds of additional output from 'make'.
|
||||||
_am_result=no
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
for s in GNU BSD; do
|
*the\ am__doit\ target*)
|
||||||
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
|
am__include=include
|
||||||
AS_CASE([$?:`cat confinc.out 2>/dev/null`],
|
am__quote=
|
||||||
['0:this is the am__doit target'],
|
_am_result=GNU
|
||||||
[AS_CASE([$s],
|
;;
|
||||||
[BSD], [am__include='.include' am__quote='"'],
|
esac
|
||||||
[am__include='include' am__quote=''])])
|
# Now try BSD make style include.
|
||||||
if test "$am__include" != "#"; then
|
if test "$am__include" = "#"; then
|
||||||
_am_result="yes ($s style)"
|
echo '.include "confinc"' > confmf
|
||||||
break
|
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||||
fi
|
*the\ am__doit\ target*)
|
||||||
done
|
am__include=.include
|
||||||
rm -f confinc.* confmf.*
|
am__quote="\""
|
||||||
AC_MSG_RESULT([${_am_result}])
|
_am_result=BSD
|
||||||
AC_SUBST([am__include])])
|
;;
|
||||||
AC_SUBST([am__quote])])
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST([am__include])
|
||||||
|
AC_SUBST([am__quote])
|
||||||
|
AC_MSG_RESULT([$_am_result])
|
||||||
|
rm -f confinc confmf
|
||||||
|
])
|
||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1015,7 +1080,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||||
if test x"${MISSING+set}" != xset; then
|
if test x"${MISSING+set}" != xset; then
|
||||||
MISSING="\${SHELL} '$am_aux_dir/missing'"
|
case $am_aux_dir in
|
||||||
|
*\ * | *\ *)
|
||||||
|
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||||
|
*)
|
||||||
|
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
# Use eval to expand $SHELL
|
# Use eval to expand $SHELL
|
||||||
if eval "$MISSING --is-lightweight"; then
|
if eval "$MISSING --is-lightweight"; then
|
||||||
|
@ -1028,7 +1098,7 @@ fi
|
||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1057,7 +1127,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
AC_DEFUN([_AM_IF_OPTION],
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1104,7 +1174,7 @@ AC_LANG_POP([C])])
|
||||||
# For backward compatibility.
|
# For backward compatibility.
|
||||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1123,7 +1193,7 @@ AC_DEFUN([AM_RUN_LOG],
|
||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1204,7 +1274,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1264,7 +1334,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
||||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1292,7 +1362,7 @@ fi
|
||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1311,7 +1381,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1442,11 +1512,7 @@ AC_SUBST([am__tar])
|
||||||
AC_SUBST([am__untar])
|
AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
m4_include([m4/ax_c___attribute__.m4])
|
|
||||||
m4_include([m4/ax_c_pragmas.m4])
|
|
||||||
m4_include([m4/ax_check_compile_flag.m4])
|
|
||||||
m4_include([m4/ax_compare_version.m4])
|
m4_include([m4/ax_compare_version.m4])
|
||||||
m4_include([m4/ax_run_or_link_ifelse.m4])
|
|
||||||
m4_include([m4/libtool.m4])
|
m4_include([m4/libtool.m4])
|
||||||
m4_include([m4/ltoptions.m4])
|
m4_include([m4/ltoptions.m4])
|
||||||
m4_include([m4/ltsugar.m4])
|
m4_include([m4/ltsugar.m4])
|
||||||
|
@ -1454,13 +1520,10 @@ m4_include([m4/ltversion.m4])
|
||||||
m4_include([m4/lt~obsolete.m4])
|
m4_include([m4/lt~obsolete.m4])
|
||||||
m4_include([m4/nut_arg_with.m4])
|
m4_include([m4/nut_arg_with.m4])
|
||||||
m4_include([m4/nut_check_asciidoc.m4])
|
m4_include([m4/nut_check_asciidoc.m4])
|
||||||
m4_include([m4/nut_check_cppcheck.m4])
|
|
||||||
m4_include([m4/nut_check_headers_windows.m4])
|
|
||||||
m4_include([m4/nut_check_libavahi.m4])
|
m4_include([m4/nut_check_libavahi.m4])
|
||||||
m4_include([m4/nut_check_libfreeipmi.m4])
|
m4_include([m4/nut_check_libfreeipmi.m4])
|
||||||
m4_include([m4/nut_check_libgd.m4])
|
m4_include([m4/nut_check_libgd.m4])
|
||||||
m4_include([m4/nut_check_libltdl.m4])
|
m4_include([m4/nut_check_libltdl.m4])
|
||||||
m4_include([m4/nut_check_libmodbus.m4])
|
|
||||||
m4_include([m4/nut_check_libneon.m4])
|
m4_include([m4/nut_check_libneon.m4])
|
||||||
m4_include([m4/nut_check_libnetsnmp.m4])
|
m4_include([m4/nut_check_libnetsnmp.m4])
|
||||||
m4_include([m4/nut_check_libnss.m4])
|
m4_include([m4/nut_check_libnss.m4])
|
||||||
|
@ -1469,10 +1532,5 @@ m4_include([m4/nut_check_libpowerman.m4])
|
||||||
m4_include([m4/nut_check_libusb.m4])
|
m4_include([m4/nut_check_libusb.m4])
|
||||||
m4_include([m4/nut_check_libwrap.m4])
|
m4_include([m4/nut_check_libwrap.m4])
|
||||||
m4_include([m4/nut_check_os.m4])
|
m4_include([m4/nut_check_os.m4])
|
||||||
m4_include([m4/nut_check_pkgconfig.m4])
|
|
||||||
m4_include([m4/nut_check_python.m4])
|
|
||||||
m4_include([m4/nut_compiler_family.m4])
|
|
||||||
m4_include([m4/nut_func_getnameinfo_argtypes.m4])
|
|
||||||
m4_include([m4/nut_report_feature.m4])
|
m4_include([m4/nut_report_feature.m4])
|
||||||
m4_include([m4/nut_stash_warnings.m4])
|
|
||||||
m4_include([m4/nut_type_socklen_t.m4])
|
m4_include([m4/nut_type_socklen_t.m4])
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
# Network UPS Tools: clients
|
# Network UPS Tools: clients
|
||||||
EXTRA_DIST =
|
|
||||||
|
|
||||||
# nutclient.cpp for some legacy reason (maybe initial detached development?)
|
|
||||||
# optionally includes "common.h" with the NUT build setup - and this option
|
|
||||||
# was never triggered in fact, not until pushed through command line like this:
|
|
||||||
AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_srcdir)/include
|
|
||||||
|
|
||||||
# Make sure out-of-dir dependencies exist (especially when dev-building parts):
|
|
||||||
$(top_builddir)/common/libcommon.la \
|
|
||||||
$(top_builddir)/common/libcommonclient.la \
|
|
||||||
$(top_builddir)/common/libparseconf.la: dummy
|
|
||||||
@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
|
|
||||||
|
|
||||||
# by default, link programs in this directory with libcommon.a
|
# by default, link programs in this directory with libcommon.a
|
||||||
LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS)
|
LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS)
|
||||||
if WITH_SSL
|
if WITH_SSL
|
||||||
LDADD += $(LIBSSL_LIBS)
|
LDADD += $(LIBSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
@ -32,13 +20,9 @@ endif
|
||||||
bin_PROGRAMS = upsc upslog upsrw upscmd
|
bin_PROGRAMS = upsc upslog upsrw upscmd
|
||||||
dist_bin_SCRIPTS = upssched-cmd
|
dist_bin_SCRIPTS = upssched-cmd
|
||||||
sbin_PROGRAMS = upsmon upssched
|
sbin_PROGRAMS = upsmon upssched
|
||||||
lib_LTLIBRARIES = libupsclient.la
|
lib_LTLIBRARIES = libupsclient.la libnutclient.la
|
||||||
if HAVE_CXX11
|
|
||||||
lib_LTLIBRARIES += libnutclient.la
|
|
||||||
lib_LTLIBRARIES += libnutclientstub.la
|
|
||||||
endif
|
|
||||||
if WITH_DEV
|
if WITH_DEV
|
||||||
include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h nutclientmem.h
|
include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h
|
||||||
endif
|
endif
|
||||||
if WITH_CGI
|
if WITH_CGI
|
||||||
cgiexec_PROGRAMS = upsstats.cgi upsimage.cgi upsset.cgi
|
cgiexec_PROGRAMS = upsstats.cgi upsimage.cgi upsset.cgi
|
||||||
|
@ -51,7 +35,7 @@ upslog_SOURCES = upslog.c upsclient.h upslog.h
|
||||||
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||||
|
|
||||||
upssched_SOURCES = upssched.c upssched.h
|
upssched_SOURCES = upssched.c upssched.h
|
||||||
upssched_LDADD = $(top_builddir)/common/libcommon.la $(top_builddir)/common/libparseconf.la $(NETLIBS)
|
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
|
||||||
|
|
||||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||||
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
||||||
|
@ -62,44 +46,15 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \
|
||||||
|
|
||||||
# not LDADD.
|
# not LDADD.
|
||||||
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
||||||
libupsclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la
|
libupsclient_la_LIBADD = ../common/libcommonclient.la
|
||||||
if WITH_SSL
|
if WITH_SSL
|
||||||
libupsclient_la_LIBADD += $(LIBSSL_LIBS)
|
libupsclient_la_LIBADD += $(LIBSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Below we set API versions of public libraries
|
|
||||||
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
|
||||||
# Note that changes here may have to be reflected in packaging (the shared
|
|
||||||
# object .so names would differ)
|
|
||||||
|
|
||||||
# libupsclient version information
|
# libupsclient version information
|
||||||
libupsclient_la_LDFLAGS = -version-info 6:0:0 -export-symbols-regex ^upscli_
|
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||||
|
libupsclient_la_LDFLAGS = -version-info 4:0:0
|
||||||
|
|
||||||
if HAVE_CXX11
|
|
||||||
# libnutclient version information and build
|
|
||||||
libnutclient_la_SOURCES = nutclient.h nutclient.cpp
|
libnutclient_la_SOURCES = nutclient.h nutclient.cpp
|
||||||
libnutclient_la_LDFLAGS = -version-info 2:0:0
|
libnutclient_la_LDFLAGS = -version-info 0:0:0
|
||||||
# Needed in not-standalone builds with -DHAVE_NUTCOMMON=1
|
|
||||||
# which is defined for in-tree CXX builds above:
|
|
||||||
libnutclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la
|
|
||||||
else
|
|
||||||
EXTRA_DIST += nutclient.h nutclient.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
if HAVE_CXX11
|
|
||||||
# libnutclientstub version information and build
|
|
||||||
libnutclientstub_la_SOURCES = nutclientmem.h nutclientmem.cpp
|
|
||||||
libnutclientstub_la_LDFLAGS = -version-info 1:0:0
|
|
||||||
libnutclientstub_la_LIBADD = libnutclient.la
|
|
||||||
else
|
|
||||||
EXTRA_DIST += nutclientmem.h nutclientmem.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
dummy:
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
|
|
||||||
# NOTE: Do not clean ".deps" in SUBDIRS of the main project,
|
|
||||||
# the root Makefile.am takes care of that!
|
|
||||||
#clean-local:
|
|
||||||
# rm -rf $(builddir)/.deps
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -14,21 +14,13 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Network UPS Tools: clients
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -98,31 +90,24 @@ target_triplet = @target@
|
||||||
bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \
|
bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \
|
||||||
upscmd$(EXEEXT)
|
upscmd$(EXEEXT)
|
||||||
sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT)
|
sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT)
|
||||||
@HAVE_CXX11_TRUE@am__append_4 = libnutclient.la libnutclientstub.la
|
|
||||||
@WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \
|
@WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \
|
||||||
@WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT)
|
@WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT)
|
||||||
@WITH_SSL_TRUE@am__append_5 = $(LIBSSL_LIBS)
|
@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS)
|
||||||
@HAVE_CXX11_FALSE@am__append_6 = nutclient.h nutclient.cpp \
|
|
||||||
@HAVE_CXX11_FALSE@ nutclientmem.h nutclientmem.cpp
|
|
||||||
subdir = clients
|
subdir = clients
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(dist_bin_SCRIPTS) $(top_srcdir)/depcomp \
|
||||||
|
$(am__include_HEADERS_DIST)
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -131,26 +116,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \
|
|
||||||
$(am__include_HEADERS_DIST) $(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" \
|
|
||||||
"$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" \
|
|
||||||
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"
|
|
||||||
PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS)
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
am__vpath_adj = case $$p in \
|
am__vpath_adj = case $$p in \
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
@ -178,11 +152,12 @@ am__uninstall_files_from_dir = { \
|
||||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
}
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
||||||
|
"$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" \
|
||||||
|
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"
|
||||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||||
@HAVE_CXX11_TRUE@libnutclient_la_DEPENDENCIES = \
|
libnutclient_la_LIBADD =
|
||||||
@HAVE_CXX11_TRUE@ $(top_builddir)/common/libcommonclient.la
|
am_libnutclient_la_OBJECTS = nutclient.lo
|
||||||
am__libnutclient_la_SOURCES_DIST = nutclient.h nutclient.cpp
|
|
||||||
@HAVE_CXX11_TRUE@am_libnutclient_la_OBJECTS = nutclient.lo
|
|
||||||
libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS)
|
libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS)
|
||||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||||
|
@ -192,20 +167,9 @@ libnutclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
|
||||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||||
$(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclient_la_LDFLAGS) \
|
$(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclient_la_LDFLAGS) \
|
||||||
$(LDFLAGS) -o $@
|
$(LDFLAGS) -o $@
|
||||||
@HAVE_CXX11_TRUE@am_libnutclient_la_rpath = -rpath $(libdir)
|
|
||||||
@HAVE_CXX11_TRUE@libnutclientstub_la_DEPENDENCIES = libnutclient.la
|
|
||||||
am__libnutclientstub_la_SOURCES_DIST = nutclientmem.h nutclientmem.cpp
|
|
||||||
@HAVE_CXX11_TRUE@am_libnutclientstub_la_OBJECTS = nutclientmem.lo
|
|
||||||
libnutclientstub_la_OBJECTS = $(am_libnutclientstub_la_OBJECTS)
|
|
||||||
libnutclientstub_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
|
|
||||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
|
||||||
$(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclientstub_la_LDFLAGS) \
|
|
||||||
$(LDFLAGS) -o $@
|
|
||||||
@HAVE_CXX11_TRUE@am_libnutclientstub_la_rpath = -rpath $(libdir)
|
|
||||||
am__DEPENDENCIES_1 =
|
am__DEPENDENCIES_1 =
|
||||||
@WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
@WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||||
libupsclient_la_DEPENDENCIES = \
|
libupsclient_la_DEPENDENCIES = ../common/libcommonclient.la \
|
||||||
$(top_builddir)/common/libcommonclient.la \
|
|
||||||
$(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_2)
|
||||||
am_libupsclient_la_OBJECTS = upsclient.lo
|
am_libupsclient_la_OBJECTS = upsclient.lo
|
||||||
libupsclient_la_OBJECTS = $(am_libupsclient_la_OBJECTS)
|
libupsclient_la_OBJECTS = $(am_libupsclient_la_OBJECTS)
|
||||||
|
@ -213,51 +177,52 @@ libupsclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||||
$(AM_CFLAGS) $(CFLAGS) $(libupsclient_la_LDFLAGS) $(LDFLAGS) \
|
$(AM_CFLAGS) $(CFLAGS) $(libupsclient_la_LDFLAGS) $(LDFLAGS) \
|
||||||
-o $@
|
-o $@
|
||||||
|
PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS)
|
||||||
am_upsc_OBJECTS = upsc.$(OBJEXT)
|
am_upsc_OBJECTS = upsc.$(OBJEXT)
|
||||||
upsc_OBJECTS = $(am_upsc_OBJECTS)
|
upsc_OBJECTS = $(am_upsc_OBJECTS)
|
||||||
upsc_LDADD = $(LDADD)
|
upsc_LDADD = $(LDADD)
|
||||||
upsc_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upsc_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upscmd_OBJECTS = upscmd.$(OBJEXT)
|
am_upscmd_OBJECTS = upscmd.$(OBJEXT)
|
||||||
upscmd_OBJECTS = $(am_upscmd_OBJECTS)
|
upscmd_OBJECTS = $(am_upscmd_OBJECTS)
|
||||||
upscmd_LDADD = $(LDADD)
|
upscmd_LDADD = $(LDADD)
|
||||||
upscmd_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upscmd_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS)
|
upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS)
|
||||||
am__DEPENDENCIES_3 = $(top_builddir)/common/libcommon.la \
|
am__DEPENDENCIES_3 = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \
|
upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \
|
||||||
$(am__DEPENDENCIES_1)
|
$(am__DEPENDENCIES_1)
|
||||||
am_upslog_OBJECTS = upslog.$(OBJEXT)
|
am_upslog_OBJECTS = upslog.$(OBJEXT)
|
||||||
upslog_OBJECTS = $(am_upslog_OBJECTS)
|
upslog_OBJECTS = $(am_upslog_OBJECTS)
|
||||||
upslog_LDADD = $(LDADD)
|
upslog_LDADD = $(LDADD)
|
||||||
upslog_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upslog_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsmon_OBJECTS = upsmon.$(OBJEXT)
|
am_upsmon_OBJECTS = upsmon.$(OBJEXT)
|
||||||
upsmon_OBJECTS = $(am_upsmon_OBJECTS)
|
upsmon_OBJECTS = $(am_upsmon_OBJECTS)
|
||||||
upsmon_LDADD = $(LDADD)
|
upsmon_LDADD = $(LDADD)
|
||||||
upsmon_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upsmon_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsrw_OBJECTS = upsrw.$(OBJEXT)
|
am_upsrw_OBJECTS = upsrw.$(OBJEXT)
|
||||||
upsrw_OBJECTS = $(am_upsrw_OBJECTS)
|
upsrw_OBJECTS = $(am_upsrw_OBJECTS)
|
||||||
upsrw_LDADD = $(LDADD)
|
upsrw_LDADD = $(LDADD)
|
||||||
upsrw_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upsrw_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upssched_OBJECTS = upssched.$(OBJEXT)
|
am_upssched_OBJECTS = upssched.$(OBJEXT)
|
||||||
upssched_OBJECTS = $(am_upssched_OBJECTS)
|
upssched_OBJECTS = $(am_upssched_OBJECTS)
|
||||||
upssched_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upssched_DEPENDENCIES = ../common/libcommon.la \
|
||||||
$(top_builddir)/common/libparseconf.la $(am__DEPENDENCIES_1)
|
../common/libparseconf.la $(am__DEPENDENCIES_1)
|
||||||
am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS)
|
upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS)
|
||||||
upsset_cgi_LDADD = $(LDADD)
|
upsset_cgi_LDADD = $(LDADD)
|
||||||
upsset_cgi_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upsset_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS)
|
upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS)
|
||||||
upsstats_cgi_LDADD = $(LDADD)
|
upsstats_cgi_LDADD = $(LDADD)
|
||||||
upsstats_cgi_DEPENDENCIES = $(top_builddir)/common/libcommon.la \
|
upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
SCRIPTS = $(dist_bin_SCRIPTS)
|
SCRIPTS = $(dist_bin_SCRIPTS)
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
@ -273,14 +238,7 @@ am__v_at_0 = @
|
||||||
am__v_at_1 =
|
am__v_at_1 =
|
||||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__maybe_remake_depfiles = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
am__depfiles_remade = ./$(DEPDIR)/cgilib.Po ./$(DEPDIR)/nutclient.Plo \
|
|
||||||
./$(DEPDIR)/nutclientmem.Plo ./$(DEPDIR)/upsc.Po \
|
|
||||||
./$(DEPDIR)/upsclient.Plo ./$(DEPDIR)/upscmd.Po \
|
|
||||||
./$(DEPDIR)/upsimage.Po ./$(DEPDIR)/upslog.Po \
|
|
||||||
./$(DEPDIR)/upsmon.Po ./$(DEPDIR)/upsrw.Po \
|
|
||||||
./$(DEPDIR)/upssched.Po ./$(DEPDIR)/upsset.Po \
|
|
||||||
./$(DEPDIR)/upsstats.Po
|
|
||||||
am__mv = mv -f
|
am__mv = mv -f
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
@ -318,16 +276,15 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||||
am__v_CXXLD_1 =
|
am__v_CXXLD_1 =
|
||||||
SOURCES = $(libnutclient_la_SOURCES) $(libnutclientstub_la_SOURCES) \
|
SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \
|
||||||
$(libupsclient_la_SOURCES) $(upsc_SOURCES) $(upscmd_SOURCES) \
|
$(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \
|
||||||
$(upsimage_cgi_SOURCES) $(upslog_SOURCES) $(upsmon_SOURCES) \
|
$(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \
|
||||||
$(upsrw_SOURCES) $(upssched_SOURCES) $(upsset_cgi_SOURCES) \
|
$(upssched_SOURCES) $(upsset_cgi_SOURCES) \
|
||||||
$(upsstats_cgi_SOURCES)
|
$(upsstats_cgi_SOURCES)
|
||||||
DIST_SOURCES = $(am__libnutclient_la_SOURCES_DIST) \
|
DIST_SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \
|
||||||
$(am__libnutclientstub_la_SOURCES_DIST) \
|
$(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \
|
||||||
$(libupsclient_la_SOURCES) $(upsc_SOURCES) $(upscmd_SOURCES) \
|
$(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \
|
||||||
$(upsimage_cgi_SOURCES) $(upslog_SOURCES) $(upsmon_SOURCES) \
|
$(upssched_SOURCES) $(upsset_cgi_SOURCES) \
|
||||||
$(upsrw_SOURCES) $(upssched_SOURCES) $(upsset_cgi_SOURCES) \
|
|
||||||
$(upsstats_cgi_SOURCES)
|
$(upsstats_cgi_SOURCES)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
@ -335,7 +292,7 @@ am__can_run_installinfo = \
|
||||||
*) (install-info --version) >/dev/null 2>&1;; \
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
esac
|
esac
|
||||||
am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \
|
am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \
|
||||||
nutclient.h nutclientmem.h
|
nutclient.h
|
||||||
HEADERS = $(include_HEADERS)
|
HEADERS = $(include_HEADERS)
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
# Read a list of newline-separated strings from the standard input,
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
@ -356,7 +313,6 @@ am__define_uniq_tagged_files = \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
A2X = @A2X@
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
|
@ -365,7 +321,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -376,7 +331,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -390,7 +344,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -403,7 +356,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -421,8 +373,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -433,29 +383,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -475,9 +417,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -491,7 +430,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -509,7 +447,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -523,9 +460,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -551,14 +485,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -569,16 +501,8 @@ top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
|
|
||||||
# Network UPS Tools: clients
|
|
||||||
EXTRA_DIST = $(am__append_6)
|
|
||||||
|
|
||||||
# nutclient.cpp for some legacy reason (maybe initial detached development?)
|
|
||||||
# optionally includes "common.h" with the NUT build setup - and this option
|
|
||||||
# was never triggered in fact, not until pushed through command line like this:
|
|
||||||
AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_srcdir)/include
|
|
||||||
|
|
||||||
# by default, link programs in this directory with libcommon.a
|
# by default, link programs in this directory with libcommon.a
|
||||||
LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) \
|
LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \
|
||||||
$(am__append_1)
|
$(am__append_1)
|
||||||
|
|
||||||
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
||||||
|
@ -586,15 +510,15 @@ LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) \
|
||||||
# but only add them if we really use the target.
|
# but only add them if we really use the target.
|
||||||
AM_CFLAGS = -I$(top_srcdir)/include $(am__append_2) $(am__append_3)
|
AM_CFLAGS = -I$(top_srcdir)/include $(am__append_2) $(am__append_3)
|
||||||
dist_bin_SCRIPTS = upssched-cmd
|
dist_bin_SCRIPTS = upssched-cmd
|
||||||
lib_LTLIBRARIES = libupsclient.la $(am__append_4)
|
lib_LTLIBRARIES = libupsclient.la libnutclient.la
|
||||||
@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h nutclientmem.h
|
@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h
|
||||||
upsc_SOURCES = upsc.c upsclient.h
|
upsc_SOURCES = upsc.c upsclient.h
|
||||||
upscmd_SOURCES = upscmd.c upsclient.h
|
upscmd_SOURCES = upscmd.c upsclient.h
|
||||||
upsrw_SOURCES = upsrw.c upsclient.h
|
upsrw_SOURCES = upsrw.c upsclient.h
|
||||||
upslog_SOURCES = upslog.c upsclient.h upslog.h
|
upslog_SOURCES = upslog.c upsclient.h upslog.h
|
||||||
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||||
upssched_SOURCES = upssched.c upssched.h
|
upssched_SOURCES = upssched.c upssched.h
|
||||||
upssched_LDADD = $(top_builddir)/common/libcommon.la $(top_builddir)/common/libparseconf.la $(NETLIBS)
|
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
|
||||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||||
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
||||||
upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
|
upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
|
||||||
|
@ -604,29 +528,13 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \
|
||||||
|
|
||||||
# not LDADD.
|
# not LDADD.
|
||||||
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
||||||
libupsclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la \
|
libupsclient_la_LIBADD = ../common/libcommonclient.la $(am__append_4)
|
||||||
$(am__append_5)
|
|
||||||
|
|
||||||
# Below we set API versions of public libraries
|
|
||||||
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
|
||||||
# Note that changes here may have to be reflected in packaging (the shared
|
|
||||||
# object .so names would differ)
|
|
||||||
|
|
||||||
# libupsclient version information
|
# libupsclient version information
|
||||||
libupsclient_la_LDFLAGS = -version-info 6:0:0 -export-symbols-regex ^upscli_
|
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||||
|
libupsclient_la_LDFLAGS = -version-info 4:0:0
|
||||||
# libnutclient version information and build
|
libnutclient_la_SOURCES = nutclient.h nutclient.cpp
|
||||||
@HAVE_CXX11_TRUE@libnutclient_la_SOURCES = nutclient.h nutclient.cpp
|
libnutclient_la_LDFLAGS = -version-info 0:0:0
|
||||||
@HAVE_CXX11_TRUE@libnutclient_la_LDFLAGS = -version-info 2:0:0
|
|
||||||
# Needed in not-standalone builds with -DHAVE_NUTCOMMON=1
|
|
||||||
# which is defined for in-tree CXX builds above:
|
|
||||||
@HAVE_CXX11_TRUE@libnutclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la
|
|
||||||
|
|
||||||
# libnutclientstub version information and build
|
|
||||||
@HAVE_CXX11_TRUE@libnutclientstub_la_SOURCES = nutclientmem.h nutclientmem.cpp
|
|
||||||
@HAVE_CXX11_TRUE@libnutclientstub_la_LDFLAGS = -version-info 1:0:0
|
|
||||||
@HAVE_CXX11_TRUE@libnutclientstub_la_LIBADD = libnutclient.la
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -643,13 +551,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clients/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clients/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu clients/Makefile
|
$(AUTOMAKE) --gnu clients/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -660,6 +569,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
list2=; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
list2="$$list2 $$p"; \
|
||||||
|
else :; fi; \
|
||||||
|
done; \
|
||||||
|
test -z "$$list2" || { \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall-libLTLIBRARIES:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
$(am__strip_dir) \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
clean-libLTLIBRARIES:
|
||||||
|
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||||
|
@list='$(lib_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}; \
|
||||||
|
}
|
||||||
|
|
||||||
|
libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES)
|
||||||
|
$(AM_V_CXXLD)$(libnutclient_la_LINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES)
|
||||||
|
$(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS)
|
||||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||||
|
@ -808,50 +758,6 @@ clean-sbinPROGRAMS:
|
||||||
echo " rm -f" $$list; \
|
echo " rm -f" $$list; \
|
||||||
rm -f $$list
|
rm -f $$list
|
||||||
|
|
||||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
|
||||||
list2=; for p in $$list; do \
|
|
||||||
if test -f $$p; then \
|
|
||||||
list2="$$list2 $$p"; \
|
|
||||||
else :; fi; \
|
|
||||||
done; \
|
|
||||||
test -z "$$list2" || { \
|
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
|
||||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
|
||||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
|
||||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
|
||||||
}
|
|
||||||
|
|
||||||
uninstall-libLTLIBRARIES:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
$(am__strip_dir) \
|
|
||||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
|
||||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
clean-libLTLIBRARIES:
|
|
||||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
|
||||||
@list='$(lib_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}; \
|
|
||||||
}
|
|
||||||
|
|
||||||
libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES)
|
|
||||||
$(AM_V_CXXLD)$(libnutclient_la_LINK) $(am_libnutclient_la_rpath) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS)
|
|
||||||
|
|
||||||
libnutclientstub.la: $(libnutclientstub_la_OBJECTS) $(libnutclientstub_la_DEPENDENCIES) $(EXTRA_libnutclientstub_la_DEPENDENCIES)
|
|
||||||
$(AM_V_CXXLD)$(libnutclientstub_la_LINK) $(am_libnutclientstub_la_rpath) $(libnutclientstub_la_OBJECTS) $(libnutclientstub_la_LIBADD) $(LIBS)
|
|
||||||
|
|
||||||
libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES)
|
|
||||||
$(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS)
|
|
||||||
|
|
||||||
upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES) $(EXTRA_upsc_DEPENDENCIES)
|
upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES) $(EXTRA_upsc_DEPENDENCIES)
|
||||||
@rm -f upsc$(EXEEXT)
|
@rm -f upsc$(EXEEXT)
|
||||||
$(AM_V_CCLD)$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS)
|
$(AM_V_CCLD)$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS)
|
||||||
|
@ -929,25 +835,18 @@ mostlyclean-compile:
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgilib.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgilib.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclient.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclient.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclientmem.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsc.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsc.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsclient.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsclient.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upscmd.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upscmd.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsimage.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsimage.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upslog.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upslog.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsmon.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsmon.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsrw.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsrw.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upssched.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upssched.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsset.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsset.Po@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.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:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
|
@ -1076,10 +975,7 @@ cscopelist-am: $(am__tagged_files)
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
@ -1111,11 +1007,11 @@ distdir-am: $(DISTFILES)
|
||||||
done
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(HEADERS)
|
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS)
|
||||||
install-binPROGRAMS: install-libLTLIBRARIES
|
install-binPROGRAMS: install-libLTLIBRARIES
|
||||||
|
|
||||||
installdirs:
|
installdirs:
|
||||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
|
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
done
|
done
|
||||||
install: install-am
|
install: install-am
|
||||||
|
@ -1148,7 +1044,6 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \
|
clean-am: clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \
|
||||||
|
@ -1156,19 +1051,7 @@ clean-am: clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \
|
||||||
mostlyclean-am
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f ./$(DEPDIR)/cgilib.Po
|
-rm -rf ./$(DEPDIR)
|
||||||
-rm -f ./$(DEPDIR)/nutclient.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/nutclientmem.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upsc.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsclient.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upscmd.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsimage.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upslog.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsmon.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsrw.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upssched.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsset.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsstats.Po
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-tags
|
distclean-tags
|
||||||
|
@ -1216,19 +1099,7 @@ install-ps-am:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -f ./$(DEPDIR)/cgilib.Po
|
-rm -rf ./$(DEPDIR)
|
||||||
-rm -f ./$(DEPDIR)/nutclient.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/nutclientmem.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upsc.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsclient.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upscmd.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsimage.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upslog.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsmon.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsrw.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upssched.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsset.Po
|
|
||||||
-rm -f ./$(DEPDIR)/upsstats.Po
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
@ -1251,7 +1122,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||||
clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \
|
clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \
|
||||||
clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS \
|
clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS \
|
||||||
cscopelist-am ctags ctags-am distclean distclean-compile \
|
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||||
|
@ -1271,21 +1142,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \
|
||||||
uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
|
uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
|
||||||
uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS
|
uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure out-of-dir dependencies exist (especially when dev-building parts):
|
|
||||||
$(top_builddir)/common/libcommon.la \
|
|
||||||
$(top_builddir)/common/libcommonclient.la \
|
|
||||||
$(top_builddir)/common/libparseconf.la: dummy
|
|
||||||
@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
|
|
||||||
|
|
||||||
dummy:
|
|
||||||
|
|
||||||
# NOTE: Do not clean ".deps" in SUBDIRS of the main project,
|
|
||||||
# the root Makefile.am takes care of that!
|
|
||||||
#clean-local:
|
|
||||||
# rm -rf $(builddir)/.deps
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -46,12 +46,9 @@ static char *unescape(char *buf)
|
||||||
hex[1] = buf[++i];
|
hex[1] = buf[++i];
|
||||||
hex[2] = '\0';
|
hex[2] = '\0';
|
||||||
if (!isxdigit((unsigned char) hex[0])
|
if (!isxdigit((unsigned char) hex[0])
|
||||||
|| !isxdigit((unsigned char) hex[1]))
|
|| !isxdigit((unsigned char) hex[0]))
|
||||||
fatalx(EXIT_FAILURE, "bad escape char");
|
fatalx(EXIT_FAILURE, "bad escape char");
|
||||||
long l = strtol(hex, NULL, 16);
|
ch = strtol(hex, NULL, 16);
|
||||||
assert(l>=0);
|
|
||||||
assert(l<=255);
|
|
||||||
ch = (char)l; /* FIXME: Loophole about non-ASCII symbols in top 128 values, or negatives for signed char... */
|
|
||||||
|
|
||||||
if ((ch == 10) || (ch == 13))
|
if ((ch == 10) || (ch == 13))
|
||||||
ch = ' ';
|
ch = ' ';
|
||||||
|
@ -92,7 +89,7 @@ void extractcgiargs(void)
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
*eq = '\0';
|
*eq = '\0';
|
||||||
value = eq + 1;
|
value = eq + 1;
|
||||||
amp = strchr(value, '&');
|
amp = strchr(value, '&');
|
||||||
|
@ -104,7 +101,7 @@ void extractcgiargs(void)
|
||||||
ptr = NULL;
|
ptr = NULL;
|
||||||
|
|
||||||
cleanvar = unescape(varname);
|
cleanvar = unescape(varname);
|
||||||
cleanval = unescape(value);
|
cleanval = unescape(value);
|
||||||
parsearg(cleanvar, cleanval);
|
parsearg(cleanvar, cleanval);
|
||||||
free(cleanvar);
|
free(cleanvar);
|
||||||
free(cleanval);
|
free(cleanval);
|
||||||
|
@ -202,4 +199,4 @@ int checkhost(const char *host, char **desc)
|
||||||
pconf_finish(&ctx);
|
pconf_finish(&ctx);
|
||||||
|
|
||||||
return 0; /* not found: access denied */
|
return 0; /* not found: access denied */
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NUT_CGILIB_H_SEEN
|
|
||||||
#define NUT_CGILIB_H_SEEN 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -44,4 +41,3 @@ int checkhost(const char *host, char **desc);
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_CGILIB_H_SEEN */
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,13 +28,6 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <cstdint>
|
|
||||||
#include <ctime>
|
|
||||||
|
|
||||||
/* See include/common.h for details behind this */
|
|
||||||
#ifndef NUT_UNUSED_VARIABLE
|
|
||||||
#define NUT_UNUSED_VARIABLE(x) (void)(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace nut
|
namespace nut
|
||||||
{
|
{
|
||||||
|
@ -58,11 +51,9 @@ class NutException : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NutException(const std::string& msg):_msg(msg){}
|
NutException(const std::string& msg):_msg(msg){}
|
||||||
NutException(const NutException&) = default;
|
virtual ~NutException() throw() {}
|
||||||
NutException& operator=(NutException& rhs) = default;
|
virtual const char * what() const throw() {return this->_msg.c_str();}
|
||||||
virtual ~NutException() override;
|
virtual std::string str() const throw() {return this->_msg;}
|
||||||
virtual const char * what() const noexcept override {return this->_msg.c_str();}
|
|
||||||
virtual std::string str() const noexcept {return this->_msg;}
|
|
||||||
private:
|
private:
|
||||||
std::string _msg;
|
std::string _msg;
|
||||||
};
|
};
|
||||||
|
@ -74,9 +65,7 @@ class SystemException : public NutException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SystemException();
|
SystemException();
|
||||||
SystemException(const SystemException&) = default;
|
virtual ~SystemException() throw() {}
|
||||||
SystemException& operator=(SystemException& rhs) = default;
|
|
||||||
virtual ~SystemException() override;
|
|
||||||
private:
|
private:
|
||||||
static std::string err();
|
static std::string err();
|
||||||
};
|
};
|
||||||
|
@ -89,9 +78,7 @@ class IOException : public NutException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IOException(const std::string& msg):NutException(msg){}
|
IOException(const std::string& msg):NutException(msg){}
|
||||||
IOException(const IOException&) = default;
|
virtual ~IOException() throw() {}
|
||||||
IOException& operator=(IOException& rhs) = default;
|
|
||||||
virtual ~IOException() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,9 +88,7 @@ class UnknownHostException : public IOException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UnknownHostException():IOException("Unknown host"){}
|
UnknownHostException():IOException("Unknown host"){}
|
||||||
UnknownHostException(const UnknownHostException&) = default;
|
virtual ~UnknownHostException() throw() {}
|
||||||
UnknownHostException& operator=(UnknownHostException& rhs) = default;
|
|
||||||
virtual ~UnknownHostException() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -113,9 +98,7 @@ class NotConnectedException : public IOException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NotConnectedException():IOException("Not connected"){}
|
NotConnectedException():IOException("Not connected"){}
|
||||||
NotConnectedException(const NotConnectedException&) = default;
|
virtual ~NotConnectedException() throw() {}
|
||||||
NotConnectedException& operator=(NotConnectedException& rhs) = default;
|
|
||||||
virtual ~NotConnectedException() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,30 +108,9 @@ class TimeoutException : public IOException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TimeoutException():IOException("Timeout"){}
|
TimeoutException():IOException("Timeout"){}
|
||||||
TimeoutException(const TimeoutException&) = default;
|
virtual ~TimeoutException() throw() {}
|
||||||
TimeoutException& operator=(TimeoutException& rhs) = default;
|
|
||||||
virtual ~TimeoutException() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Cookie given when performing async action, used to redeem result at a later date.
|
|
||||||
*/
|
|
||||||
typedef std::string TrackingID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Result of an async action.
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
UNKNOWN,
|
|
||||||
PENDING,
|
|
||||||
SUCCESS,
|
|
||||||
INVALID_ARGUMENT,
|
|
||||||
FAILURE,
|
|
||||||
} TrackingResult;
|
|
||||||
|
|
||||||
typedef std::string Feature;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A nut client is the starting point to dialog to NUTD.
|
* A nut client is the starting point to dialog to NUTD.
|
||||||
* It can connect to an NUTD then retrieve its device list.
|
* It can connect to an NUTD then retrieve its device list.
|
||||||
|
@ -160,7 +122,7 @@ class Client
|
||||||
friend class Variable;
|
friend class Variable;
|
||||||
friend class Command;
|
friend class Command;
|
||||||
public:
|
public:
|
||||||
virtual ~Client();
|
~Client();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intend to authenticate to a NUTD server.
|
* Intend to authenticate to a NUTD server.
|
||||||
|
@ -170,13 +132,13 @@ public:
|
||||||
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
|
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
|
||||||
* \note Actually, authentication fails only if already set, not if bad values are sent.
|
* \note Actually, authentication fails only if already set, not if bad values are sent.
|
||||||
*/
|
*/
|
||||||
virtual void authenticate(const std::string& user, const std::string& passwd) = 0;
|
virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from the NUTD server.
|
* Disconnect from the NUTD server.
|
||||||
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
|
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
|
||||||
*/
|
*/
|
||||||
virtual void logout() = 0;
|
virtual void logout()throw(NutException)=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device manipulations.
|
* Device manipulations.
|
||||||
|
@ -189,29 +151,29 @@ public:
|
||||||
* \param name Name of the device.
|
* \param name Name of the device.
|
||||||
* \return The device.
|
* \return The device.
|
||||||
*/
|
*/
|
||||||
virtual Device getDevice(const std::string& name);
|
virtual Device getDevice(const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve the list of all devices supported by UPSD server.
|
* Retrieve the list of all devices supported by UPSD server.
|
||||||
* \return The set of supported devices.
|
* \return The set of supported devices.
|
||||||
*/
|
*/
|
||||||
virtual std::set<Device> getDevices();
|
virtual std::set<Device> getDevices()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Test if a device is supported by the NUTD server.
|
* Test if a device is supported by the NUTD server.
|
||||||
* \param dev Device name.
|
* \param dev Device name.
|
||||||
* \return true if supported, false otherwise.
|
* \return true if supported, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool hasDevice(const std::string& dev);
|
virtual bool hasDevice(const std::string& dev)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve names of devices supported by NUTD server.
|
* Retrieve names of devices supported by NUTD server.
|
||||||
* \return The set of names of supported devices.
|
* \return The set of names of supported devices.
|
||||||
*/
|
*/
|
||||||
virtual std::set<std::string> getDeviceNames() = 0;
|
virtual std::set<std::string> getDeviceNames()throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Retrieve the description of a device.
|
* Retrieve the description of a device.
|
||||||
* \param name Device name.
|
* \param name Device name.
|
||||||
* \return Device description.
|
* \return Device description.
|
||||||
*/
|
*/
|
||||||
virtual std::string getDeviceDescription(const std::string& name) = 0;
|
virtual std::string getDeviceDescription(const std::string& name)throw(NutException)=0;
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -224,60 +186,54 @@ public:
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \return Variable names
|
* \return Variable names
|
||||||
*/
|
*/
|
||||||
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev) = 0;
|
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Retrieve names of read/write variables supported by a device.
|
* Retrieve names of read/write variables supported by a device.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \return RW variable names
|
* \return RW variable names
|
||||||
*/
|
*/
|
||||||
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev) = 0;
|
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Test if a variable is supported by a device.
|
* Test if a variable is supported by a device.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Variable name
|
* \param name Variable name
|
||||||
* \return true if the variable is supported.
|
* \return true if the variable is supported.
|
||||||
*/
|
*/
|
||||||
virtual bool hasDeviceVariable(const std::string& dev, const std::string& name);
|
virtual bool hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve the description of a variable.
|
* Retrieve the description of a variable.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Variable name
|
* \param name Variable name
|
||||||
* \return Variable description if provided.
|
* \return Variable description if provided.
|
||||||
*/
|
*/
|
||||||
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) = 0;
|
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Retrieve values of a variable.
|
* Retrieve values of a variable.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Variable name
|
* \param name Variable name
|
||||||
* \return Variable values (usually one) if available.
|
* \return Variable values (usually one) if available.
|
||||||
*/
|
*/
|
||||||
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name) = 0;
|
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Retrieve values of all variables of a device.
|
* Retrieve values of all variables of a device.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \return Variable values indexed by variable names.
|
* \return Variable values indexed by variable names.
|
||||||
*/
|
*/
|
||||||
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev);
|
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
|
||||||
/**
|
|
||||||
* Retrieve values of all variables of a set of devices.
|
|
||||||
* \param devs Device names
|
|
||||||
* \return Variable values indexed by variable names, indexed by device names.
|
|
||||||
*/
|
|
||||||
virtual std::map<std::string,std::map<std::string,std::vector<std::string> > > getDevicesVariableValues(const std::set<std::string>& devs);
|
|
||||||
/**
|
/**
|
||||||
* Intend to set the value of a variable.
|
* Intend to set the value of a variable.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Variable name
|
* \param name Variable name
|
||||||
* \param value Variable value
|
* \param value Variable value
|
||||||
*/
|
*/
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) = 0;
|
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Intend to set the value of a variable.
|
* Intend to set the value of a variable.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Variable name
|
* \param name Variable name
|
||||||
* \param values Vector of variable values
|
* \param value Variable value
|
||||||
*/
|
*/
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values) = 0;
|
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException)=0;
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -290,28 +246,27 @@ public:
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \return Command names
|
* \return Command names
|
||||||
*/
|
*/
|
||||||
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev) = 0;
|
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Test if a command is supported by a device.
|
* Test if a command is supported by a device.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Command name
|
* \param name Command name
|
||||||
* \return true if the command is supported.
|
* \return true if the command is supported.
|
||||||
*/
|
*/
|
||||||
virtual bool hasDeviceCommand(const std::string& dev, const std::string& name);
|
virtual bool hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve the description of a command.
|
* Retrieve the description of a command.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Command name
|
* \param name Command name
|
||||||
* \return Command description if provided.
|
* \return Command description if provided.
|
||||||
*/
|
*/
|
||||||
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) = 0;
|
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Intend to execute a command.
|
* Intend to execute a command.
|
||||||
* \param dev Device name
|
* \param dev Device name
|
||||||
* \param name Command name
|
* \param name Command name
|
||||||
* \param param Additional command parameter
|
|
||||||
*/
|
*/
|
||||||
virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") = 0;
|
virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)=0;
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -322,33 +277,15 @@ public:
|
||||||
* Log the current user (if authenticated) for a device.
|
* Log the current user (if authenticated) for a device.
|
||||||
* \param dev Device name.
|
* \param dev Device name.
|
||||||
*/
|
*/
|
||||||
virtual void deviceLogin(const std::string& dev) = 0;
|
virtual void deviceLogin(const std::string& dev)throw(NutException)=0;
|
||||||
/**
|
/**
|
||||||
* Retrieve the number of user logged-in for the specified device.
|
* Retrieve the number of user longged in the specified device.
|
||||||
* \param dev Device name.
|
* \param dev Device name.
|
||||||
* \return Number of logged-in users.
|
* \return Number of logged-in users.
|
||||||
*/
|
*/
|
||||||
virtual int deviceGetNumLogins(const std::string& dev) = 0;
|
virtual int deviceGetNumLogins(const std::string& dev)throw(NutException)=0;
|
||||||
/* NOTE: "master" is deprecated since NUT v2.8.0 in favor of "primary".
|
virtual void deviceMaster(const std::string& dev)throw(NutException)=0;
|
||||||
* For the sake of old/new server/client interoperability,
|
virtual void deviceForcedShutdown(const std::string& dev)throw(NutException)=0;
|
||||||
* practical implementations should try to use one and fall
|
|
||||||
* back to the other, and only fail if both return "ERR".
|
|
||||||
*/
|
|
||||||
virtual void deviceMaster(const std::string& dev) = 0;
|
|
||||||
virtual void devicePrimary(const std::string& dev) = 0;
|
|
||||||
virtual void deviceForcedShutdown(const std::string& dev) = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve the result of a tracking ID.
|
|
||||||
* \param id Tracking ID.
|
|
||||||
*/
|
|
||||||
virtual TrackingResult getTrackingResult(const TrackingID& id) = 0;
|
|
||||||
|
|
||||||
virtual bool hasFeature(const Feature& feature);
|
|
||||||
virtual bool isFeatureEnabled(const Feature& feature) = 0;
|
|
||||||
virtual void setFeature(const Feature& feature, bool status) = 0;
|
|
||||||
|
|
||||||
static const Feature TRACKING;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Client();
|
Client();
|
||||||
|
@ -360,11 +297,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
class TcpClient : public Client
|
class TcpClient : public Client
|
||||||
{
|
{
|
||||||
/* We have a number of direct-call methods we do not expose
|
|
||||||
* generally, but still want covered with integration tests
|
|
||||||
*/
|
|
||||||
friend class NutActiveClientTest;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Construct a nut TcpClient object.
|
* Construct a nut TcpClient object.
|
||||||
|
@ -377,21 +309,21 @@ public:
|
||||||
* \param host Server host name.
|
* \param host Server host name.
|
||||||
* \param port Server port.
|
* \param port Server port.
|
||||||
*/
|
*/
|
||||||
TcpClient(const std::string& host, uint16_t port = 3493);
|
TcpClient(const std::string& host, int port = 3493)throw(nut::IOException);
|
||||||
~TcpClient() override;
|
~TcpClient();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect it to the specified server.
|
* Connect it to the specified server.
|
||||||
* \param host Server host name.
|
* \param host Server host name.
|
||||||
* \param port Server port.
|
* \param port Server port.
|
||||||
*/
|
*/
|
||||||
void connect(const std::string& host, uint16_t port = 3493);
|
void connect(const std::string& host, int port = 3493)throw(nut::IOException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the server.
|
* Connect to the server.
|
||||||
* Host name and ports must have already set (usefull for reconnection).
|
* Host name and ports must have already set (usefull for reconnection).
|
||||||
*/
|
*/
|
||||||
void connect();
|
void connect()throw(nut::IOException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if the connection is active.
|
* Test if the connection is active.
|
||||||
|
@ -407,13 +339,13 @@ public:
|
||||||
* Set the timeout in seconds.
|
* Set the timeout in seconds.
|
||||||
* \param timeout Timeout n seconds, negative to block operations.
|
* \param timeout Timeout n seconds, negative to block operations.
|
||||||
*/
|
*/
|
||||||
void setTimeout(time_t timeout);
|
void setTimeout(long timeout);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the timeout.
|
* Retrieve the timeout.
|
||||||
* \returns Current timeout in seconds.
|
* \returns Current timeout in seconds.
|
||||||
*/
|
*/
|
||||||
time_t getTimeout()const;
|
long getTimeout()const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retriueve the host name of the server the client is connected to.
|
* Retriueve the host name of the server the client is connected to.
|
||||||
|
@ -424,64 +356,53 @@ public:
|
||||||
* Retriueve the port of host of the server the client is connected to.
|
* Retriueve the port of host of the server the client is connected to.
|
||||||
* \return Server port
|
* \return Server port
|
||||||
*/
|
*/
|
||||||
uint16_t getPort()const;
|
int getPort()const;
|
||||||
|
|
||||||
virtual void authenticate(const std::string& user, const std::string& passwd) override;
|
virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException);
|
||||||
virtual void logout() override;
|
virtual void logout()throw(NutException);
|
||||||
|
|
||||||
|
virtual Device getDevice(const std::string& name)throw(NutException);
|
||||||
|
virtual std::set<std::string> getDeviceNames()throw(NutException);
|
||||||
|
virtual std::string getDeviceDescription(const std::string& name)throw(NutException);
|
||||||
|
|
||||||
virtual Device getDevice(const std::string& name) override;
|
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException);
|
||||||
virtual std::set<std::string> getDeviceNames() override;
|
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException);
|
||||||
virtual std::string getDeviceDescription(const std::string& name) override;
|
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
|
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
|
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
|
||||||
|
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException);
|
||||||
|
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException);
|
||||||
|
|
||||||
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev) override;
|
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException);
|
||||||
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev) override;
|
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) override;
|
virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
|
||||||
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name) override;
|
|
||||||
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev) override;
|
|
||||||
virtual std::map<std::string,std::map<std::string,std::vector<std::string> > > getDevicesVariableValues(const std::set<std::string>& devs) override;
|
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) override;
|
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values) override;
|
|
||||||
|
|
||||||
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev) override;
|
virtual void deviceLogin(const std::string& dev)throw(NutException);
|
||||||
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) override;
|
virtual void deviceMaster(const std::string& dev)throw(NutException);
|
||||||
virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") override;
|
virtual void deviceForcedShutdown(const std::string& dev)throw(NutException);
|
||||||
|
virtual int deviceGetNumLogins(const std::string& dev)throw(NutException);
|
||||||
virtual void deviceLogin(const std::string& dev) override;
|
|
||||||
/* FIXME: Protocol update needed to handle master/primary alias
|
|
||||||
* and probably an API bump also, to rename/alias the routine.
|
|
||||||
*/
|
|
||||||
virtual void deviceMaster(const std::string& dev) override;
|
|
||||||
virtual void devicePrimary(const std::string& dev) override;
|
|
||||||
virtual void deviceForcedShutdown(const std::string& dev) override;
|
|
||||||
virtual int deviceGetNumLogins(const std::string& dev) override;
|
|
||||||
|
|
||||||
virtual TrackingResult getTrackingResult(const TrackingID& id) override;
|
|
||||||
|
|
||||||
virtual bool isFeatureEnabled(const Feature& feature) override;
|
|
||||||
virtual void setFeature(const Feature& feature, bool status) override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string sendQuery(const std::string& req);
|
std::string sendQuery(const std::string& req)throw(nut::IOException);
|
||||||
void sendAsyncQueries(const std::vector<std::string>& req);
|
static void detectError(const std::string& req)throw(nut::NutException);
|
||||||
static void detectError(const std::string& req);
|
|
||||||
TrackingID sendTrackingQuery(const std::string& req);
|
|
||||||
|
|
||||||
std::vector<std::string> get(const std::string& subcmd, const std::string& params = "");
|
std::vector<std::string> get(const std::string& subcmd, const std::string& params = "")
|
||||||
|
throw(nut::NutException);
|
||||||
|
|
||||||
std::vector<std::vector<std::string> > list(const std::string& subcmd, const std::string& params = "");
|
std::vector<std::vector<std::string> > list(const std::string& subcmd, const std::string& params = "")
|
||||||
|
throw(nut::NutException);
|
||||||
std::vector<std::vector<std::string> > parseList(const std::string& req);
|
|
||||||
|
|
||||||
static std::vector<std::string> explode(const std::string& str, size_t begin=0);
|
static std::vector<std::string> explode(const std::string& str, size_t begin=0);
|
||||||
static std::string escape(const std::string& str);
|
static std::string escape(const std::string& str);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _host;
|
std::string _host;
|
||||||
uint16_t _port;
|
int _port;
|
||||||
time_t _timeout;
|
long _timeout;
|
||||||
internal::Socket* _socket;
|
internal::Socket* _socket;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device attached to a client.
|
* Device attached to a client.
|
||||||
* Device is a lightweight class which can be copied easily.
|
* Device is a lightweight class which can be copied easily.
|
||||||
|
@ -490,14 +411,9 @@ class Device
|
||||||
{
|
{
|
||||||
friend class Client;
|
friend class Client;
|
||||||
friend class TcpClient;
|
friend class TcpClient;
|
||||||
friend class TcpClientMock;
|
|
||||||
#ifdef _NUTCLIENTTEST_BUILD
|
|
||||||
friend class NutClientTest;
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
~Device();
|
~Device();
|
||||||
Device(const Device& dev);
|
Device(const Device& dev);
|
||||||
Device& operator=(const Device& dev);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the name of the device.
|
* Retrieve the name of the device.
|
||||||
|
@ -519,117 +435,112 @@ public:
|
||||||
bool isOk()const;
|
bool isOk()const;
|
||||||
/**
|
/**
|
||||||
* Test if the device is valid (has a name and is attached to a client).
|
* Test if the device is valid (has a name and is attached to a client).
|
||||||
* @see Device::isOk()
|
* @see Device::isOk()
|
||||||
*/
|
*/
|
||||||
operator bool()const;
|
operator bool()const;
|
||||||
/**
|
/**
|
||||||
* Test if the device is not valid (has no name or is not attached to any client).
|
* Test if the device is not valid (has no name or is not attached to any client).
|
||||||
* @see Device::isOk()
|
* @see Device::isOk()
|
||||||
*/
|
*/
|
||||||
bool operator!()const;
|
bool operator!()const;
|
||||||
/**
|
/**
|
||||||
* Test if the two devices are sames (same name ad same client attached to).
|
* Test if the two devices are sames (same name ad same client attached to).
|
||||||
*/
|
*/
|
||||||
bool operator==(const Device& dev)const;
|
bool operator==(const Device& dev)const;
|
||||||
/**
|
/**
|
||||||
* Comparison operator.
|
* Comparison operator.
|
||||||
*/
|
*/
|
||||||
bool operator<(const Device& dev)const;
|
bool operator<(const Device& dev)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the description of the devce if specified.
|
* Retrieve the description of the devce if specified.
|
||||||
*/
|
*/
|
||||||
std::string getDescription();
|
std::string getDescription()throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intend to retrieve the value of a variable of the device.
|
* Intend to retrieve the value of a variable of the device.
|
||||||
* \param name Name of the variable to get.
|
* \param name Name of the variable to get.
|
||||||
* \return Value of the variable, if available.
|
* \return Value of the variable, if available.
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> getVariableValue(const std::string& name);
|
std::vector<std::string> getVariableValue(const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to retrieve values of all variables of the devices.
|
* Intend to retrieve values of all variables of the devices.
|
||||||
* \return Map of all variables values indexed by their names.
|
* \return Map of all variables values indexed by their names.
|
||||||
*/
|
*/
|
||||||
std::map<std::string,std::vector<std::string> > getVariableValues();
|
std::map<std::string,std::vector<std::string> > getVariableValues()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve all variables names supported by the device.
|
* Retrieve all variables names supported by the device.
|
||||||
* \return Set of available variable names.
|
* \return Set of available variable names.
|
||||||
*/
|
*/
|
||||||
std::set<std::string> getVariableNames();
|
std::set<std::string> getVariableNames()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve all Read/Write variables names supported by the device.
|
* Retrieve all Read/Write variables names supported by the device.
|
||||||
* \return Set of available Read/Write variable names.
|
* \return Set of available Read/Write variable names.
|
||||||
*/
|
*/
|
||||||
std::set<std::string> getRWVariableNames();
|
std::set<std::string> getRWVariableNames()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to set the value of a variable of the device.
|
* Intend to set the value of a variable of the device.
|
||||||
* \param name Variable name.
|
* \param name Variable name.
|
||||||
* \param value New variable value.
|
* \param value New variable value.
|
||||||
*/
|
*/
|
||||||
void setVariable(const std::string& name, const std::string& value);
|
void setVariable(const std::string& name, const std::string& value)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to set values of a variable of the device.
|
* Intend to set values of a variable of the device.
|
||||||
* \param name Variable name.
|
* \param name Variable name.
|
||||||
* \param values Vector of new variable values.
|
* \param value New variable values.
|
||||||
*/
|
*/
|
||||||
void setVariable(const std::string& name, const std::vector<std::string>& values);
|
void setVariable(const std::string& name, const std::vector<std::string>& values)throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a Variable object representing the specified variable.
|
* Retrieve a Variable object representing the specified variable.
|
||||||
* \param name Variable name.
|
* \param name Variable name.
|
||||||
* \return Variable object.
|
* \return Variable object.
|
||||||
*/
|
*/
|
||||||
Variable getVariable(const std::string& name);
|
Variable getVariable(const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve Variable objects representing all variables available for the device.
|
* Retrieve Variable objects representing all variables available for the device.
|
||||||
* \return Set of Variable objects.
|
* \return Set of Variable objects.
|
||||||
*/
|
*/
|
||||||
std::set<Variable> getVariables();
|
std::set<Variable> getVariables()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve Variable objects representing all Read/Write variables available for the device.
|
* Retrieve Variable objects representing all Read/Write variables available for the device.
|
||||||
* \return Set of Variable objects.
|
* \return Set of Variable objects.
|
||||||
*/
|
*/
|
||||||
std::set<Variable> getRWVariables();
|
std::set<Variable> getRWVariables()throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve names of all commands supported by the device.
|
* Retrieve names of all commands supported by the device.
|
||||||
* \return Set of available command names.
|
* \return Set of available command names.
|
||||||
*/
|
*/
|
||||||
std::set<std::string> getCommandNames();
|
std::set<std::string> getCommandNames()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve objects for all commands supported by the device.
|
* Retrieve objects for all commands supported by the device.
|
||||||
* \return Set of available Command objects.
|
* \return Set of available Command objects.
|
||||||
*/
|
*/
|
||||||
std::set<Command> getCommands();
|
std::set<Command> getCommands()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Retrieve an object representing a command of the device.
|
* Retrieve an object representing a command of the device.
|
||||||
* \param name Command name.
|
* \param name Command name.
|
||||||
* \return Command object.
|
* \return Command object.
|
||||||
*/
|
*/
|
||||||
Command getCommand(const std::string& name);
|
Command getCommand(const std::string& name)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to execute a command on the device.
|
* Intend to execute a command on the device.
|
||||||
* \param name Command name.
|
* \param name Command name.
|
||||||
* \param param Additional command parameter
|
|
||||||
*/
|
*/
|
||||||
TrackingID executeCommand(const std::string& name, const std::string& param="");
|
void executeCommand(const std::string& name)throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Login current client's user for the device.
|
* Login current client's user for the device.
|
||||||
*/
|
*/
|
||||||
void login();
|
void login()throw(NutException);
|
||||||
/* FIXME: Protocol update needed to handle master/primary alias
|
void master()throw(NutException);
|
||||||
* and probably an API bump also, to rename/alias the routine.
|
void forcedShutdown()throw(NutException);
|
||||||
*/
|
|
||||||
void master();
|
|
||||||
void primary();
|
|
||||||
void forcedShutdown();
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the number of logged user for the device.
|
* Retrieve the number of logged user for the device.
|
||||||
* \return Number of users.
|
* \return Number of users.
|
||||||
*/
|
*/
|
||||||
int getNumLogins();
|
int getNumLogins()throw(NutException);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Device(Client* client, const std::string& name);
|
Device(Client* client, const std::string& name);
|
||||||
|
@ -647,15 +558,10 @@ class Variable
|
||||||
{
|
{
|
||||||
friend class Device;
|
friend class Device;
|
||||||
friend class TcpClient;
|
friend class TcpClient;
|
||||||
friend class TcpClientMock;
|
|
||||||
#ifdef _NUTCLIENTTEST_BUILD
|
|
||||||
friend class NutClientTest;
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
~Variable();
|
~Variable();
|
||||||
|
|
||||||
Variable(const Variable& var);
|
Variable(const Variable& var);
|
||||||
Variable& operator=(const Variable& var);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve variable name.
|
* Retrieve variable name.
|
||||||
|
@ -697,23 +603,23 @@ public:
|
||||||
* Intend to retrieve variable value.
|
* Intend to retrieve variable value.
|
||||||
* \return Value of the variable.
|
* \return Value of the variable.
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> getValue();
|
std::vector<std::string> getValue()throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to retireve variable description.
|
* Intend to retireve variable description.
|
||||||
* \return Variable description if provided.
|
* \return Variable description if provided.
|
||||||
*/
|
*/
|
||||||
std::string getDescription();
|
std::string getDescription()throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intend to set a value to the variable.
|
* Intend to set a value to the variable.
|
||||||
* \param value New variable value.
|
* \param value New variable value.
|
||||||
*/
|
*/
|
||||||
void setValue(const std::string& value);
|
void setValue(const std::string& value)throw(NutException);
|
||||||
/**
|
/**
|
||||||
* Intend to set (multiple) values to the variable.
|
* Intend to set (multiple) values to the variable.
|
||||||
* \param values Vector of new variable values.
|
* \param value New variable values.
|
||||||
*/
|
*/
|
||||||
void setValues(const std::vector<std::string>& values);
|
void setValues(const std::vector<std::string>& values)throw(NutException);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Variable(Device* dev, const std::string& name);
|
Variable(Device* dev, const std::string& name);
|
||||||
|
@ -731,15 +637,10 @@ class Command
|
||||||
{
|
{
|
||||||
friend class Device;
|
friend class Device;
|
||||||
friend class TcpClient;
|
friend class TcpClient;
|
||||||
friend class TcpClientMock;
|
|
||||||
#ifdef _NUTCLIENTTEST_BUILD
|
|
||||||
friend class NutClientTest;
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
~Command();
|
~Command();
|
||||||
|
|
||||||
Command(const Command& cmd);
|
Command(const Command& cmd);
|
||||||
Command& operator=(const Command& cmd);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve command name.
|
* Retrieve command name.
|
||||||
|
@ -782,13 +683,13 @@ public:
|
||||||
* Intend to retireve command description.
|
* Intend to retireve command description.
|
||||||
* \return Command description if provided.
|
* \return Command description if provided.
|
||||||
*/
|
*/
|
||||||
std::string getDescription();
|
std::string getDescription()throw(NutException);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intend to execute the instant command on device.
|
* Intend to retrieve command description.
|
||||||
* \param param Optional additional command parameter
|
* \return Command description if provided.
|
||||||
*/
|
*/
|
||||||
void execute(const std::string& param="");
|
void execute()throw(NutException);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Command(Device* dev, const std::string& name);
|
Command(Device* dev, const std::string& name);
|
||||||
|
@ -821,19 +722,13 @@ typedef char** strarr;
|
||||||
/**
|
/**
|
||||||
* Alloc an array of string.
|
* Alloc an array of string.
|
||||||
*/
|
*/
|
||||||
strarr strarr_alloc(size_t count);
|
strarr strarr_alloc(unsigned short count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free an array of string.
|
* Free an array of string.
|
||||||
*/
|
*/
|
||||||
void strarr_free(strarr arr);
|
void strarr_free(strarr arr);
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert C++ types into an array of string.
|
|
||||||
*/
|
|
||||||
strarr stringvector_to_strarr(const std::vector<std::string>& strset);
|
|
||||||
strarr stringset_to_strarr(const std::set<std::string>& strset);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nut general client types and functions.
|
* Nut general client types and functions.
|
||||||
|
@ -843,7 +738,7 @@ strarr stringset_to_strarr(const std::set<std::string>& strset);
|
||||||
typedef void* NUTCLIENT_t;
|
typedef void* NUTCLIENT_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a client.
|
* Destroy a client.
|
||||||
* \param client Nut client handle.
|
* \param client Nut client handle.
|
||||||
*/
|
*/
|
||||||
void nutclient_destroy(NUTCLIENT_t client);
|
void nutclient_destroy(NUTCLIENT_t client);
|
||||||
|
@ -881,11 +776,7 @@ int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
|
||||||
* \param client Nut client handle.
|
* \param client Nut client handle.
|
||||||
* \param dev Device name to test.
|
* \param dev Device name to test.
|
||||||
*/
|
*/
|
||||||
/* FIXME: Protocol update needed to handle master/primary alias
|
|
||||||
* and probably an API bump also, to rename/alias the routine.
|
|
||||||
*/
|
|
||||||
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
|
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
|
||||||
void nutclient_device_primary(NUTCLIENT_t client, const char* dev);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the FSD flag for the device.
|
* Set the FSD flag for the device.
|
||||||
|
@ -1010,7 +901,7 @@ char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* d
|
||||||
* \param dev Device name.
|
* \param dev Device name.
|
||||||
* \param cmd Command name.
|
* \param cmd Command name.
|
||||||
*/
|
*/
|
||||||
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd, const char* param="");
|
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
@ -1020,7 +911,7 @@ void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const
|
||||||
* \{
|
* \{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Hidden structure representing a TCP connection to NUTD.
|
* Hidden structure representing a TCP connection to NUTD.
|
||||||
* NUTCLIENT_TCP_t is back compatible to NUTCLIENT_t.
|
* NUTCLIENT_TCP_t is back compatible to NUTCLIENT_t.
|
||||||
*/
|
*/
|
||||||
typedef NUTCLIENT_t NUTCLIENT_TCP_t;
|
typedef NUTCLIENT_t NUTCLIENT_TCP_t;
|
||||||
|
@ -1029,9 +920,9 @@ typedef NUTCLIENT_t NUTCLIENT_TCP_t;
|
||||||
* Create a client to NUTD using a TCP connection.
|
* Create a client to NUTD using a TCP connection.
|
||||||
* \param host Host name to connect to.
|
* \param host Host name to connect to.
|
||||||
* \param port Host port.
|
* \param port Host port.
|
||||||
* \return New client or nullptr if failed.
|
* \return New client or NULL if failed.
|
||||||
*/
|
*/
|
||||||
NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, uint16_t port);
|
NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port);
|
||||||
/**
|
/**
|
||||||
* Test if a nut TCP client is connected.
|
* Test if a nut TCP client is connected.
|
||||||
* \param client Nut TCP client handle.
|
* \param client Nut TCP client handle.
|
||||||
|
@ -1054,12 +945,12 @@ int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client);
|
||||||
* Set the timeout value for the TCP connection.
|
* Set the timeout value for the TCP connection.
|
||||||
* \param timeout Timeout in seconds, negative for blocking.
|
* \param timeout Timeout in seconds, negative for blocking.
|
||||||
*/
|
*/
|
||||||
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout);
|
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout);
|
||||||
/**
|
/**
|
||||||
* Retrieve the timeout value for the TCP connection.
|
* Retrieve the timeout value for the TCP connection.
|
||||||
* \return Timeout value in seconds.
|
* \return Timeout value in seconds.
|
||||||
*/
|
*/
|
||||||
time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
|
long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
|
|
|
@ -1,252 +0,0 @@
|
||||||
/* nutclientmem.cpp - nutclientmem C++ library implementation
|
|
||||||
|
|
||||||
Copyright (C) 2021 Eric Clappier <ericclappier@eaton.com>
|
|
||||||
|
|
||||||
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 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, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "nutclientmem.h"
|
|
||||||
#include <common.h>
|
|
||||||
|
|
||||||
namespace nut
|
|
||||||
{
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Memory Client stub implementation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
Device MemClientStub::getDevice(const std::string& name)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(name);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::set<std::string> MemClientStub::getDeviceNames()
|
|
||||||
{
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string MemClientStub::getDeviceDescription(const std::string& name)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(name);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::set<std::string> MemClientStub::getDeviceVariableNames(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::set<std::string> MemClientStub::getDeviceRWVariableNames(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string MemClientStub::getDeviceVariableDescription(const std::string& dev, const std::string& name)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
NUT_UNUSED_VARIABLE(name);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
ListValue MemClientStub::getDeviceVariableValue(const std::string& dev, const std::string& name)
|
|
||||||
{
|
|
||||||
ListValue res;
|
|
||||||
auto it_dev = _values.find(dev);
|
|
||||||
if (it_dev != _values.end())
|
|
||||||
{
|
|
||||||
auto map = it_dev->second;
|
|
||||||
auto it_map = map.find(name);
|
|
||||||
if (it_map != map.end())
|
|
||||||
{
|
|
||||||
res = it_map->second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
ListObject MemClientStub::getDeviceVariableValues(const std::string& dev)
|
|
||||||
{
|
|
||||||
ListObject res;
|
|
||||||
auto it_dev = _values.find(dev);
|
|
||||||
if (it_dev != _values.end())
|
|
||||||
{
|
|
||||||
res = it_dev->second;
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
ListDevice MemClientStub::getDevicesVariableValues(const std::set<std::string>& devs)
|
|
||||||
{
|
|
||||||
ListDevice res;
|
|
||||||
for (auto itr = devs.begin(); itr != devs.end(); itr++)
|
|
||||||
{
|
|
||||||
std::string dev = *itr;
|
|
||||||
auto it_dev = _values.find(dev);
|
|
||||||
if (it_dev != _values.end())
|
|
||||||
{
|
|
||||||
res.insert(std::pair<std::string, ListObject>(dev, it_dev->second));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackingID MemClientStub::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)
|
|
||||||
{
|
|
||||||
auto it_dev = _values.find(dev);
|
|
||||||
if (it_dev == _values.end())
|
|
||||||
{
|
|
||||||
ListObject list;
|
|
||||||
_values.emplace(dev, list);
|
|
||||||
it_dev = _values.find(dev);
|
|
||||||
}
|
|
||||||
if (it_dev != _values.end())
|
|
||||||
{
|
|
||||||
auto map = &(it_dev->second);
|
|
||||||
auto it_map = map->find(name);
|
|
||||||
if (it_map != map->end())
|
|
||||||
{
|
|
||||||
it_map->second[0] = value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ListValue list_value;
|
|
||||||
list_value.push_back(value);
|
|
||||||
map->emplace(name, list_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackingID MemClientStub::setDeviceVariable(const std::string& dev, const std::string& name, const ListValue& values)
|
|
||||||
{
|
|
||||||
auto it_dev = _values.find(dev);
|
|
||||||
if (it_dev != _values.end())
|
|
||||||
{
|
|
||||||
auto map = &(it_dev->second);
|
|
||||||
auto it_map = map->find(name);
|
|
||||||
if (it_map != map->end())
|
|
||||||
{
|
|
||||||
it_map->second = values;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map->emplace(name, values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::set<std::string> MemClientStub::getDeviceCommandNames(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string MemClientStub::getDeviceCommandDescription(const std::string& dev, const std::string& name)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
NUT_UNUSED_VARIABLE(name);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackingID MemClientStub::executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
NUT_UNUSED_VARIABLE(name);
|
|
||||||
NUT_UNUSED_VARIABLE(param);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemClientStub::deviceLogin(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: "master" is deprecated, but supported
|
|
||||||
* for mixing old/new client/server combos: */
|
|
||||||
void MemClientStub::deviceMaster(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemClientStub::devicePrimary(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemClientStub::deviceForcedShutdown(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
int MemClientStub::deviceGetNumLogins(const std::string& dev)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(dev);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackingResult MemClientStub::getTrackingResult(const TrackingID& id)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(id);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
//return TrackingResult::SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MemClientStub::isFeatureEnabled(const Feature& feature)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(feature);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemClientStub::setFeature(const Feature& feature, bool status)
|
|
||||||
{
|
|
||||||
NUT_UNUSED_VARIABLE(feature);
|
|
||||||
NUT_UNUSED_VARIABLE(status);
|
|
||||||
throw NutException("Not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
} /* namespace nut */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* C nutclient API.
|
|
||||||
*/
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
NUTCLIENT_MEM_t nutclient_mem_create_client()
|
|
||||||
{
|
|
||||||
nut::MemClientStub* client = new nut::MemClientStub;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return static_cast<NUTCLIENT_MEM_t>(client);
|
|
||||||
}
|
|
||||||
catch(nut::NutException& ex)
|
|
||||||
{
|
|
||||||
// TODO really catch it
|
|
||||||
NUT_UNUSED_VARIABLE(ex);
|
|
||||||
delete client;
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} /* extern "C" */
|
|
|
@ -1,118 +0,0 @@
|
||||||
/* nutclientmem.h - definitions for nutclientmem C/C++ library
|
|
||||||
|
|
||||||
Copyright (C) 2021 Eric Clappier <ericclappier@eaton.com>
|
|
||||||
|
|
||||||
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 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, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef NUTCLIENTMEM_HPP_SEEN
|
|
||||||
#define NUTCLIENTMEM_HPP_SEEN
|
|
||||||
|
|
||||||
/* Begin of C++ nutclient library declaration */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
|
|
||||||
#include "nutclient.h"
|
|
||||||
|
|
||||||
namespace nut
|
|
||||||
{
|
|
||||||
|
|
||||||
typedef std::vector<std::string> ListValue;
|
|
||||||
typedef std::map<std::string, ListValue> ListObject;
|
|
||||||
typedef std::map<std::string, ListObject> ListDevice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Memory client stub.
|
|
||||||
* Class to stub TCPClient for test (data store in local memory).
|
|
||||||
*/
|
|
||||||
class MemClientStub : public Client
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Construct a nut MemClientStub object.
|
|
||||||
*/
|
|
||||||
MemClientStub() {}
|
|
||||||
~MemClientStub() override {}
|
|
||||||
|
|
||||||
virtual void authenticate(const std::string& user, const std::string& passwd) override {
|
|
||||||
NUT_UNUSED_VARIABLE(user);
|
|
||||||
NUT_UNUSED_VARIABLE(passwd);
|
|
||||||
}
|
|
||||||
virtual void logout() override {}
|
|
||||||
|
|
||||||
virtual Device getDevice(const std::string& name) override;
|
|
||||||
virtual std::set<std::string> getDeviceNames() override;
|
|
||||||
virtual std::string getDeviceDescription(const std::string& name) override;
|
|
||||||
|
|
||||||
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev) override;
|
|
||||||
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev) override;
|
|
||||||
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) override;
|
|
||||||
virtual ListValue getDeviceVariableValue(const std::string& dev, const std::string& name) override;
|
|
||||||
virtual ListObject getDeviceVariableValues(const std::string& dev) override;
|
|
||||||
virtual ListDevice getDevicesVariableValues(const std::set<std::string>& devs) override;
|
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) override;
|
|
||||||
virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const ListValue& values) override;
|
|
||||||
|
|
||||||
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev) override;
|
|
||||||
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) override;
|
|
||||||
virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") override;
|
|
||||||
|
|
||||||
virtual void deviceLogin(const std::string& dev) override;
|
|
||||||
/* Note: "master" is deprecated, but supported
|
|
||||||
* for mixing old/new client/server combos: */
|
|
||||||
virtual void deviceMaster(const std::string& dev) override;
|
|
||||||
virtual void devicePrimary(const std::string& dev) override;
|
|
||||||
virtual void deviceForcedShutdown(const std::string& dev) override;
|
|
||||||
virtual int deviceGetNumLogins(const std::string& dev) override;
|
|
||||||
|
|
||||||
virtual TrackingResult getTrackingResult(const TrackingID& id) override;
|
|
||||||
|
|
||||||
virtual bool isFeatureEnabled(const Feature& feature) override;
|
|
||||||
virtual void setFeature(const Feature& feature, bool status) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
ListDevice _values;
|
|
||||||
};
|
|
||||||
|
|
||||||
} /* namespace nut */
|
|
||||||
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
/* End of C++ nutclient library declaration */
|
|
||||||
|
|
||||||
/* Begin of C nutclient library declaration */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Nut MEM client dedicated types and functions
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Hidden structure representing a MEM connection.
|
|
||||||
* NUTCLIENT_MEM_t is back compatible to NUTCLIENT_t.
|
|
||||||
*/
|
|
||||||
typedef NUTCLIENT_t NUTCLIENT_MEM_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a client to NUTD using memory.
|
|
||||||
* \return New client or nullptr if failed.
|
|
||||||
*/
|
|
||||||
NUTCLIENT_MEM_t nutclient_mem_create_client();
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
/* End of C nutclient library declaration */
|
|
||||||
|
|
||||||
#endif /* NUTCLIENTMOCK_HPP_SEEN */
|
|
|
@ -17,19 +17,13 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NUT_STATUS_H_SEEN
|
|
||||||
#define NUT_STATUS_H_SEEN 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is only used in upsstats.c, but might it also have external consumers?..
|
struct {
|
||||||
* To move or not to move?..
|
|
||||||
*/
|
|
||||||
static struct {
|
|
||||||
char *name;
|
char *name;
|
||||||
char *desc;
|
char *desc;
|
||||||
int severity;
|
int severity;
|
||||||
|
@ -54,4 +48,3 @@ static struct {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_STATUS_H_SEEN */
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* upsc - simple "client" to test communications
|
/* upsc - simple "client" to test communications
|
||||||
|
|
||||||
Copyright (C) 1999 Russell Kroll <rkroll@exploits.org>
|
Copyright (C) 1999 Russell Kroll <rkroll@exploits.org>
|
||||||
Copyright (C) 2012 Arnaud Quette <arnaud.quette@free.fr>
|
Copyright (C) 2012 Arnaud Quette <arnaud.quette@free.fr>
|
||||||
|
@ -25,7 +25,6 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
|
|
||||||
static char *upsname = NULL, *hostname = NULL;
|
static char *upsname = NULL, *hostname = NULL;
|
||||||
|
@ -59,7 +58,7 @@ static void usage(const char *prog)
|
||||||
static void printvar(const char *var)
|
static void printvar(const char *var)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -87,7 +86,7 @@ static void printvar(const char *var)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numa < numq) {
|
if (numa < numq) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least %zu)", numa, numq);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least %d)", numa, numq);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s\n", answer[3]);
|
printf("%s\n", answer[3]);
|
||||||
|
@ -96,7 +95,7 @@ static void printvar(const char *var)
|
||||||
static void list_vars(void)
|
static void list_vars(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -120,7 +119,7 @@ static void list_vars(void)
|
||||||
|
|
||||||
/* VAR <upsname> <varname> <val> */
|
/* VAR <upsname> <varname> <val> */
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s: %s\n", answer[2], answer[3]);
|
printf("%s: %s\n", answer[2], answer[3]);
|
||||||
|
@ -130,7 +129,7 @@ static void list_vars(void)
|
||||||
static void list_upses(int verbose)
|
static void list_upses(int verbose)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -138,7 +137,7 @@ static void list_upses(int verbose)
|
||||||
numq = 1;
|
numq = 1;
|
||||||
|
|
||||||
ret = upscli_list_start(ups, numq, query);
|
ret = upscli_list_start(ups, numq, query);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
/* check for an old upsd */
|
/* check for an old upsd */
|
||||||
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
||||||
|
@ -152,7 +151,7 @@ static void list_upses(int verbose)
|
||||||
|
|
||||||
/* UPS <upsname> <description> */
|
/* UPS <upsname> <description> */
|
||||||
if (numa < 3) {
|
if (numa < 3) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(verbose) {
|
if(verbose) {
|
||||||
|
@ -166,7 +165,7 @@ static void list_upses(int verbose)
|
||||||
static void list_clients(const char *devname)
|
static void list_clients(const char *devname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -189,7 +188,7 @@ static void list_clients(const char *devname)
|
||||||
|
|
||||||
/* CLIENT <upsname> <address> */
|
/* CLIENT <upsname> <address> */
|
||||||
if (numa < 3) {
|
if (numa < 3) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s\n", answer[2]);
|
printf("%s\n", answer[2]);
|
||||||
|
@ -209,8 +208,7 @@ static void clean_exit(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i, port;
|
||||||
uint16_t port;
|
|
||||||
int varlist = 0, clientlist = 0, verbose = 0;
|
int varlist = 0, clientlist = 0, verbose = 0;
|
||||||
const char *prog = xbasename(argv[0]);
|
const char *prog = xbasename(argv[0]);
|
||||||
|
|
||||||
|
@ -220,9 +218,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
case 'L':
|
case 'L':
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
goto fallthrough_case_l;
|
|
||||||
case 'l':
|
case 'l':
|
||||||
fallthrough_case_l:
|
|
||||||
varlist = 1;
|
varlist = 1;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
|
@ -231,9 +227,6 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION);
|
fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION);
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
|
||||||
exit(EXIT_SUCCESS); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#ifdef HAVE_PTHREAD
|
#ifdef HAVE_PTHREAD
|
||||||
/* this include is needed on AIX to have errno stored in thread local storage */
|
/* this include is needed on AIX to have errno stored in thread local storage */
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
@ -38,14 +38,13 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "timehead.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "timehead.h"
|
||||||
|
|
||||||
/* WA for Solaris/i386 bug: non-blocking connect sets errno to ENOENT */
|
/* WA for Solaris/i386 bug: non-blocking connect sets errno to ENOENT */
|
||||||
#if (defined NUT_PLATFORM_SOLARIS)
|
#if (defined NUT_PLATFORM_SOLARIS && CPU_TYPE == i386)
|
||||||
#define SOLARIS_i386_NBCONNECT_ENOENT(status) ( (!strcmp("i386", CPU_TYPE)) ? (ENOENT == (status)) : 0 )
|
#define SOLARIS_i386_NBCONNECT_ENOENT(status) (ENOENT == (status))
|
||||||
#else
|
#else
|
||||||
#define SOLARIS_i386_NBCONNECT_ENOENT(status) (0)
|
#define SOLARIS_i386_NBCONNECT_ENOENT(status) (0)
|
||||||
#endif /* end of Solaris/i386 WA for non-blocking connect */
|
#endif /* end of Solaris/i386 WA for non-blocking connect */
|
||||||
|
@ -76,7 +75,7 @@
|
||||||
#define shutdown_how 2
|
#define shutdown_how 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct {
|
struct {
|
||||||
int flags;
|
int flags;
|
||||||
const char *str;
|
const char *str;
|
||||||
} upscli_errlist[] =
|
} upscli_errlist[] =
|
||||||
|
@ -132,7 +131,7 @@ typedef struct HOST_CERT_s {
|
||||||
const char *certname;
|
const char *certname;
|
||||||
int certverify;
|
int certverify;
|
||||||
int forcessl;
|
int forcessl;
|
||||||
|
|
||||||
struct HOST_CERT_s *next;
|
struct HOST_CERT_s *next;
|
||||||
} HOST_CERT_t;
|
} HOST_CERT_t;
|
||||||
static HOST_CERT_t* upscli_find_host_cert(const char* hostname);
|
static HOST_CERT_t* upscli_find_host_cert(const char* hostname);
|
||||||
|
@ -154,7 +153,7 @@ static char* nsscertpasswd = NULL;
|
||||||
|
|
||||||
static void ssl_debug(void)
|
static void ssl_debug(void)
|
||||||
{
|
{
|
||||||
unsigned long e;
|
int e;
|
||||||
char errmsg[SMALLBUF];
|
char errmsg[SMALLBUF];
|
||||||
|
|
||||||
while ((e = ERR_get_error()) != 0) {
|
while ((e = ERR_get_error()) != 0) {
|
||||||
|
@ -163,36 +162,32 @@ static void ssl_debug(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ssl_error(SSL *ssl, ssize_t ret)
|
static int ssl_error(SSL *ssl, int ret)
|
||||||
{
|
{
|
||||||
int e;
|
int e;
|
||||||
|
|
||||||
if (ret >= INT_MAX) {
|
e = SSL_get_error(ssl, ret);
|
||||||
upslogx(LOG_ERR, "ssl_error() ret=%zd would not fit in an int", ret);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
e = SSL_get_error(ssl, (int)ret);
|
|
||||||
|
|
||||||
switch (e)
|
switch (e)
|
||||||
{
|
{
|
||||||
case SSL_ERROR_WANT_READ:
|
case SSL_ERROR_WANT_READ:
|
||||||
upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_WANT_READ", ret);
|
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_READ", ret);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SSL_ERROR_WANT_WRITE:
|
case SSL_ERROR_WANT_WRITE:
|
||||||
upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_WANT_WRITE", ret);
|
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_WRITE", ret);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SSL_ERROR_SYSCALL:
|
case SSL_ERROR_SYSCALL:
|
||||||
if (ret == 0 && ERR_peek_error() == 0) {
|
if (ret == 0 && ERR_peek_error() == 0) {
|
||||||
upslogx(LOG_ERR, "ssl_error() EOF from client");
|
upslogx(LOG_ERR, "ssl_error() EOF from client");
|
||||||
} else {
|
} else {
|
||||||
upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_SYSCALL", ret);
|
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_SYSCALL", ret);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR %d", ret, e);
|
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR %d", ret, e);
|
||||||
ssl_debug();
|
ssl_debug();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,12 +196,9 @@ static int ssl_error(SSL *ssl, ssize_t ret)
|
||||||
|
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
|
|
||||||
static char *nss_password_callback(PK11SlotInfo *slot, PRBool retry,
|
static char *nss_password_callback(PK11SlotInfo *slot, PRBool retry,
|
||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(retry);
|
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
|
|
||||||
upslogx(LOG_INFO, "Intend to retrieve password for %s / %s: password %sconfigured",
|
upslogx(LOG_INFO, "Intend to retrieve password for %s / %s: password %sconfigured",
|
||||||
PK11_GetSlotName(slot), PK11_GetTokenName(slot), nsscertpasswd?"":"not ");
|
PK11_GetSlotName(slot), PK11_GetTokenName(slot), nsscertpasswd?"":"not ");
|
||||||
return nsscertpasswd ? PL_strdup(nsscertpasswd) : NULL;
|
return nsscertpasswd ? PL_strdup(nsscertpasswd) : NULL;
|
||||||
|
@ -241,10 +233,6 @@ static SECStatus AuthCertificateDontVerify(CERTCertDBHandle *arg, PRFileDesc *fd
|
||||||
PRBool checksig, PRBool isServer)
|
PRBool checksig, PRBool isServer)
|
||||||
{
|
{
|
||||||
UPSCONN_t *ups = (UPSCONN_t *)SSL_RevealPinArg(fd);
|
UPSCONN_t *ups = (UPSCONN_t *)SSL_RevealPinArg(fd);
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
NUT_UNUSED_VARIABLE(checksig);
|
|
||||||
NUT_UNUSED_VARIABLE(isServer);
|
|
||||||
|
|
||||||
upslogx(LOG_INFO, "Do not intend to authenticate server %s",
|
upslogx(LOG_INFO, "Do not intend to authenticate server %s",
|
||||||
ups?ups->host:"<unnamed>");
|
ups?ups->host:"<unnamed>");
|
||||||
return SECSuccess;
|
return SECSuccess;
|
||||||
|
@ -253,8 +241,6 @@ static SECStatus AuthCertificateDontVerify(CERTCertDBHandle *arg, PRFileDesc *fd
|
||||||
static SECStatus BadCertHandler(UPSCONN_t *arg, PRFileDesc *fd)
|
static SECStatus BadCertHandler(UPSCONN_t *arg, PRFileDesc *fd)
|
||||||
{
|
{
|
||||||
HOST_CERT_t* cert;
|
HOST_CERT_t* cert;
|
||||||
NUT_UNUSED_VARIABLE(fd);
|
|
||||||
|
|
||||||
upslogx(LOG_WARNING, "Certificate validation failed for %s",
|
upslogx(LOG_WARNING, "Certificate validation failed for %s",
|
||||||
(arg&&arg->host)?arg->host:"<unnamed>");
|
(arg&&arg->host)?arg->host:"<unnamed>");
|
||||||
/* BadCertHandler is called when the NSS certificate validation is failed.
|
/* BadCertHandler is called when the NSS certificate validation is failed.
|
||||||
|
@ -302,63 +288,49 @@ static SECStatus GetClientAuthData(UPSCONN_t *arg, PRFileDesc *fd,
|
||||||
|
|
||||||
static void HandshakeCallback(PRFileDesc *fd, UPSCONN_t *client_data)
|
static void HandshakeCallback(PRFileDesc *fd, UPSCONN_t *client_data)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(fd);
|
|
||||||
|
|
||||||
upslogx(LOG_INFO, "SSL handshake done successfully with server %s",
|
upslogx(LOG_INFO, "SSL handshake done successfully with server %s",
|
||||||
client_data->host);
|
client_data->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
|
|
||||||
int upscli_init(int certverify, const char *certpath,
|
int upscli_init(int certverify, const char *certpath,
|
||||||
const char *certname, const char *certpasswd)
|
const char *certname, const char *certpasswd)
|
||||||
{
|
{
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
long ret;
|
int ret, ssl_mode = SSL_VERIFY_NONE;
|
||||||
int ssl_mode = SSL_VERIFY_NONE;
|
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
NUT_UNUSED_VARIABLE(certname);
|
const SSL_METHOD *ssl_method;
|
||||||
NUT_UNUSED_VARIABLE(certpasswd);
|
#else
|
||||||
|
SSL_METHOD *ssl_method;
|
||||||
|
#endif
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
SECStatus status;
|
SECStatus status;
|
||||||
#else
|
|
||||||
NUT_UNUSED_VARIABLE(certverify);
|
|
||||||
NUT_UNUSED_VARIABLE(certpath);
|
|
||||||
NUT_UNUSED_VARIABLE(certname);
|
|
||||||
NUT_UNUSED_VARIABLE(certpasswd);
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
|
|
||||||
|
|
||||||
if (upscli_initialized == 1) {
|
if (upscli_initialized == 1) {
|
||||||
upslogx(LOG_WARNING, "upscli already initialized");
|
upslogx(LOG_WARNING, "upscli already initialized");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
SSL_load_error_strings();
|
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
|
SSL_load_error_strings();
|
||||||
|
|
||||||
ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
ssl_method = TLSv1_client_method();
|
||||||
#else
|
|
||||||
ssl_ctx = SSL_CTX_new(TLS_client_method());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
if (!ssl_method) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ssl_ctx = SSL_CTX_new(ssl_method);
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
upslogx(LOG_ERR, "Can not initialize SSL context");
|
upslogx(LOG_ERR, "Can not initialize SSL context");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
/* set minimum protocol TLSv1 */
|
|
||||||
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
|
|
||||||
#else
|
|
||||||
ret = SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
|
|
||||||
if (ret != 1) {
|
|
||||||
upslogx(LOG_ERR, "Can not set minimum protocol to TLSv1");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!certpath) {
|
if (!certpath) {
|
||||||
if (certverify == 1) {
|
if (certverify == 1) {
|
||||||
upslogx(LOG_ERR, "Can not verify certificate if any is specified");
|
upslogx(LOG_ERR, "Can not verify certificate if any is specified");
|
||||||
|
@ -381,13 +353,13 @@ int upscli_init(int certverify, const char *certpath,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSL_CTX_set_verify(ssl_ctx, ssl_mode, NULL);
|
SSL_CTX_set_verify(ssl_ctx, ssl_mode, NULL);
|
||||||
}
|
}
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
|
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
|
||||||
|
|
||||||
PK11_SetPasswordFunc(nss_password_callback);
|
PK11_SetPasswordFunc(nss_password_callback);
|
||||||
|
|
||||||
if (certpath) {
|
if (certpath) {
|
||||||
upslogx(LOG_INFO, "Init SSL with cerificate database located at %s", certpath);
|
upslogx(LOG_INFO, "Init SSL with cerificate database located at %s", certpath);
|
||||||
status = NSS_Init(certpath);
|
status = NSS_Init(certpath);
|
||||||
|
@ -400,16 +372,16 @@ int upscli_init(int certverify, const char *certpath,
|
||||||
nss_error("upscli_init / NSS_[NoDB]_Init");
|
nss_error("upscli_init / NSS_[NoDB]_Init");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = NSS_SetDomesticPolicy();
|
status = NSS_SetDomesticPolicy();
|
||||||
if (status != SECSuccess) {
|
if (status != SECSuccess) {
|
||||||
upslogx(LOG_ERR, "Can not initialize SSL policy");
|
upslogx(LOG_ERR, "Can not initialize SSL policy");
|
||||||
nss_error("upscli_init / NSS_SetDomesticPolicy");
|
nss_error("upscli_init / NSS_SetDomesticPolicy");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSL_ClearSessionCache();
|
SSL_ClearSessionCache();
|
||||||
|
|
||||||
status = SSL_OptionSetDefault(SSL_ENABLE_SSL3, PR_TRUE);
|
status = SSL_OptionSetDefault(SSL_ENABLE_SSL3, PR_TRUE);
|
||||||
if (status != SECSuccess) {
|
if (status != SECSuccess) {
|
||||||
upslogx(LOG_ERR, "Can not enable SSLv3");
|
upslogx(LOG_ERR, "Can not enable SSLv3");
|
||||||
|
@ -435,13 +407,8 @@ int upscli_init(int certverify, const char *certpath,
|
||||||
nsscertpasswd = xstrdup(certpasswd);
|
nsscertpasswd = xstrdup(certpasswd);
|
||||||
}
|
}
|
||||||
verify_certificate = certverify;
|
verify_certificate = certverify;
|
||||||
#else
|
|
||||||
/* Note: historically we do not return with error here,
|
|
||||||
* just fall through to below and treat as initialized.
|
|
||||||
*/
|
|
||||||
upslogx(LOG_ERR, "upscli_init called but SSL wasn't compiled in");
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
|
|
||||||
upscli_initialized = 1;
|
upscli_initialized = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -456,11 +423,6 @@ void upscli_add_host_cert(const char* hostname, const char* certname, int certve
|
||||||
cert->certverify = certverify;
|
cert->certverify = certverify;
|
||||||
cert->forcessl = forcessl;
|
cert->forcessl = forcessl;
|
||||||
first_host_cert = cert;
|
first_host_cert = cert;
|
||||||
#else
|
|
||||||
NUT_UNUSED_VARIABLE(hostname);
|
|
||||||
NUT_UNUSED_VARIABLE(certname);
|
|
||||||
NUT_UNUSED_VARIABLE(certverify);
|
|
||||||
NUT_UNUSED_VARIABLE(forcessl);
|
|
||||||
#endif /* WITH_NSS */
|
#endif /* WITH_NSS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,13 +438,11 @@ static HOST_CERT_t* upscli_find_host_cert(const char* hostname)
|
||||||
cert = cert->next;
|
cert = cert->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
NUT_UNUSED_VARIABLE(hostname);
|
|
||||||
#endif /* WITH_NSS */
|
#endif /* WITH_NSS */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int upscli_cleanup(void)
|
int upscli_cleanup()
|
||||||
{
|
{
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
if (ssl_ctx) {
|
if (ssl_ctx) {
|
||||||
|
@ -492,7 +452,7 @@ int upscli_cleanup(void)
|
||||||
|
|
||||||
#endif /* WITH_OPENSSL */
|
#endif /* WITH_OPENSSL */
|
||||||
|
|
||||||
#ifdef WITH_NSS
|
#ifdef WITH_NSS
|
||||||
/* Called to force cache clearing to prevent NSS shutdown failures.
|
/* Called to force cache clearing to prevent NSS shutdown failures.
|
||||||
* http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslfnc.html#1138601
|
* http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslfnc.html#1138601
|
||||||
*/
|
*/
|
||||||
|
@ -505,7 +465,7 @@ int upscli_cleanup(void)
|
||||||
*/
|
*/
|
||||||
PL_ArenaFinish();
|
PL_ArenaFinish();
|
||||||
#endif /* WITH_NSS */
|
#endif /* WITH_NSS */
|
||||||
|
|
||||||
upscli_initialized = 0;
|
upscli_initialized = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -517,16 +477,6 @@ const char *upscli_strerror(UPSCONN_t *ups)
|
||||||
char sslbuf[UPSCLI_ERRBUF_LEN];
|
char sslbuf[UPSCLI_ERRBUF_LEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!ups) {
|
if (!ups) {
|
||||||
return upscli_errlist[UPSCLI_ERR_INVALIDARG].str;
|
return upscli_errlist[UPSCLI_ERR_INVALIDARG].str;
|
||||||
}
|
}
|
||||||
|
@ -567,12 +517,12 @@ const char *upscli_strerror(UPSCONN_t *ups)
|
||||||
if (PR_GetErrorTextLength() < UPSCLI_ERRBUF_LEN) {
|
if (PR_GetErrorTextLength() < UPSCLI_ERRBUF_LEN) {
|
||||||
PR_GetErrorText(ups->errbuf);
|
PR_GetErrorText(ups->errbuf);
|
||||||
} else {
|
} else {
|
||||||
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
|
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
|
||||||
"SSL error #%ld, message too long to be displayed",
|
"SSL error #%ld, message too long to be displayed",
|
||||||
(long)PR_GetError());
|
(long)PR_GetError());
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
|
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
|
||||||
"SSL error, but SSL wasn't enabled at compile-time");
|
"SSL error, but SSL wasn't enabled at compile-time");
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
return ups->errbuf;
|
return ups->errbuf;
|
||||||
|
@ -584,10 +534,6 @@ const char *upscli_strerror(UPSCONN_t *ups)
|
||||||
return ups->errbuf;
|
return ups->errbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
|
|
||||||
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, "Unknown error flag %d",
|
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, "Unknown error flag %d",
|
||||||
|
@ -599,9 +545,9 @@ const char *upscli_strerror(UPSCONN_t *ups)
|
||||||
/* Read up to buflen bytes from fd and return the number of bytes
|
/* Read up to buflen bytes from fd and return the number of bytes
|
||||||
read. If no data is available within d_sec + d_usec, return 0.
|
read. If no data is available within d_sec + d_usec, return 0.
|
||||||
On error, a value < 0 is returned (errno indicates error). */
|
On error, a value < 0 is returned (errno indicates error). */
|
||||||
static ssize_t upscli_select_read(const int fd, void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec)
|
static int upscli_select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
int ret;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
|
@ -620,37 +566,17 @@ static ssize_t upscli_select_read(const int fd, void *buf, const size_t buflen,
|
||||||
return read(fd, buf, buflen);
|
return read(fd, buf, buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
/* internal: abstract the SSL calls for the other functions */
|
/* internal: abstract the SSL calls for the other functions */
|
||||||
static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout)
|
static int net_read(UPSCONN_t *ups, char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
ssize_t ret = -1;
|
int ret;
|
||||||
|
|
||||||
#ifdef WITH_SSL
|
#ifdef WITH_SSL
|
||||||
if (ups->ssl) {
|
if (ups->ssl) {
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
/* SSL_* routines deal with int type for return and buflen
|
ret = SSL_read(ups->ssl, buf, buflen);
|
||||||
* We might need to window our I/O if we exceed 2GB (in
|
|
||||||
* 32-bit builds)... Not likely to exceed in 64-bit builds,
|
|
||||||
* but smaller systems with 16-bits might be endangered :)
|
|
||||||
*/
|
|
||||||
assert(buflen <= INT_MAX);
|
|
||||||
int iret = SSL_read(ups->ssl, buf, (int)buflen);
|
|
||||||
assert(iret <= SSIZE_MAX);
|
|
||||||
ret = (ssize_t)iret;
|
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
/* PR_* routines deal in PRInt32 type
|
ret = PR_Read(ups->ssl, buf, buflen);
|
||||||
* We might need to window our I/O if we exceed 2GB :) */
|
|
||||||
assert(buflen <= PR_INT32_MAX);
|
|
||||||
ret = PR_Read(ups->ssl, buf, (PRInt32)buflen);
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS*/
|
#endif /* WITH_OPENSSL | WITH_NSS*/
|
||||||
|
|
||||||
if (ret < 1) {
|
if (ret < 1) {
|
||||||
|
@ -661,7 +587,7 @@ static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t t
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = upscli_select_read(ups->fd, buf, buflen, timeout, 0);
|
ret = upscli_select_read(ups->fd, buf, buflen, 5, 0);
|
||||||
|
|
||||||
/* error reading data, server disconnected? */
|
/* error reading data, server disconnected? */
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -676,16 +602,13 @@ static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t t
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Write up to buflen bytes to fd and return the number of bytes
|
/* Write up to buflen bytes to fd and return the number of bytes
|
||||||
written. If no data is available within d_sec + d_usec, return 0.
|
written. If no data is available within d_sec + d_usec, return 0.
|
||||||
On error, a value < 0 is returned (errno indicates error). */
|
On error, a value < 0 is returned (errno indicates error). */
|
||||||
static ssize_t upscli_select_write(const int fd, const void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec)
|
static int upscli_select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
int ret;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
|
@ -704,37 +627,17 @@ static ssize_t upscli_select_write(const int fd, const void *buf, const size_t b
|
||||||
return write(fd, buf, buflen);
|
return write(fd, buf, buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
/* internal: abstract the SSL calls for the other functions */
|
/* internal: abstract the SSL calls for the other functions */
|
||||||
static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout)
|
static int net_write(UPSCONN_t *ups, const char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
ssize_t ret = -1;
|
int ret;
|
||||||
|
|
||||||
#ifdef WITH_SSL
|
#ifdef WITH_SSL
|
||||||
if (ups->ssl) {
|
if (ups->ssl) {
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
/* SSL_* routines deal with int type for return and buflen
|
ret = SSL_write(ups->ssl, buf, buflen);
|
||||||
* We might need to window our I/O if we exceed 2GB (in
|
|
||||||
* 32-bit builds)... Not likely to exceed in 64-bit builds,
|
|
||||||
* but smaller systems with 16-bits might be endangered :)
|
|
||||||
*/
|
|
||||||
assert(buflen <= INT_MAX);
|
|
||||||
int iret = SSL_write(ups->ssl, buf, (int)buflen);
|
|
||||||
assert(iret <= SSIZE_MAX);
|
|
||||||
ret = (ssize_t)iret;
|
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
/* PR_* routines deal in PRInt32 type
|
ret = PR_Write(ups->ssl, buf, buflen);
|
||||||
* We might need to window our I/O if we exceed 2GB :) */
|
|
||||||
assert(buflen <= PR_INT32_MAX);
|
|
||||||
ret = PR_Write(ups->ssl, buf, (PRInt32)buflen);
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
|
|
||||||
if (ret < 1) {
|
if (ret < 1) {
|
||||||
|
@ -745,7 +648,7 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = upscli_select_write(ups->fd, buf, buflen, timeout, 0);
|
ret = upscli_select_write(ups->fd, buf, buflen, 0, 0);
|
||||||
|
|
||||||
/* error writing data, server disconnected? */
|
/* error writing data, server disconnected? */
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -760,9 +663,6 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_SSL
|
#ifdef WITH_SSL
|
||||||
|
@ -770,7 +670,7 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t
|
||||||
/*
|
/*
|
||||||
* 1 : OK
|
* 1 : OK
|
||||||
* -1 : ERROR
|
* -1 : ERROR
|
||||||
* 0 : SSL NOT SUPPORTED
|
* 0 : SSL NOT SUPPORTED
|
||||||
*/
|
*/
|
||||||
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
{
|
{
|
||||||
|
@ -779,7 +679,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
SECStatus status;
|
SECStatus status;
|
||||||
PRFileDesc *socket;
|
PRFileDesc *socket;
|
||||||
HOST_CERT_t *cert;
|
HOST_CERT_t *cert;
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
char buf[UPSCLI_NETBUF_LEN];
|
char buf[UPSCLI_NETBUF_LEN];
|
||||||
|
|
||||||
|
@ -791,7 +691,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
"force initialisation without SSL configuration");
|
"force initialisation without SSL configuration");
|
||||||
upscli_init(0, NULL, NULL, NULL);
|
upscli_init(0, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* see if upsd even talks SSL/TLS */
|
/* see if upsd even talks SSL/TLS */
|
||||||
snprintf(buf, sizeof(buf), "STARTTLS\n");
|
snprintf(buf, sizeof(buf), "STARTTLS\n");
|
||||||
|
|
||||||
|
@ -808,7 +708,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* upsd is happy, so let's crank up the client */
|
/* upsd is happy, so let's crank up the client */
|
||||||
|
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
|
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
|
@ -837,7 +737,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
switch(res)
|
switch(res)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
upsdebugx(3, "SSL connected (%s)", SSL_get_version(ups->ssl));
|
upsdebugx(3, "SSL connected");
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
upslog_with_errno(1, "SSL_connect do not accept handshake.");
|
upslog_with_errno(1, "SSL_connect do not accept handshake.");
|
||||||
|
@ -847,7 +747,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
upslog_with_errno(1, "Unknown return value from SSL_connect %d", res);
|
upslog_with_errno(1, "Unknown return value from SSL_connect %d", res);
|
||||||
ssl_error(ups->ssl, res);
|
ssl_error(ups->ssl, res);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -864,12 +764,12 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
nss_error("upscli_sslinit / SSL_ImportFD");
|
nss_error("upscli_sslinit / SSL_ImportFD");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SSL_SetPKCS11PinArg(ups->ssl, ups) == -1){
|
if (SSL_SetPKCS11PinArg(ups->ssl, ups) == -1){
|
||||||
nss_error("upscli_sslinit / SSL_SetPKCS11PinArg");
|
nss_error("upscli_sslinit / SSL_SetPKCS11PinArg");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verifycert) {
|
if (verifycert) {
|
||||||
status = SSL_AuthCertificateHook(ups->ssl,
|
status = SSL_AuthCertificateHook(ups->ssl,
|
||||||
(SSLAuthCertificate)AuthCertificate, CERT_GetDefaultCertDB());
|
(SSLAuthCertificate)AuthCertificate, CERT_GetDefaultCertDB());
|
||||||
|
@ -881,19 +781,19 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
nss_error("upscli_sslinit / SSL_AuthCertificateHook");
|
nss_error("upscli_sslinit / SSL_AuthCertificateHook");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = SSL_BadCertHook(ups->ssl, (SSLBadCertHandler)BadCertHandler, ups);
|
status = SSL_BadCertHook(ups->ssl, (SSLBadCertHandler)BadCertHandler, ups);
|
||||||
if (status != SECSuccess) {
|
if (status != SECSuccess) {
|
||||||
nss_error("upscli_sslinit / SSL_BadCertHook");
|
nss_error("upscli_sslinit / SSL_BadCertHook");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = SSL_GetClientAuthDataHook(ups->ssl, (SSLGetClientAuthData)GetClientAuthData, ups);
|
status = SSL_GetClientAuthDataHook(ups->ssl, (SSLGetClientAuthData)GetClientAuthData, ups);
|
||||||
if (status != SECSuccess) {
|
if (status != SECSuccess) {
|
||||||
nss_error("upscli_sslinit / SSL_GetClientAuthDataHook");
|
nss_error("upscli_sslinit / SSL_GetClientAuthDataHook");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = SSL_HandshakeCallback(ups->ssl, (SSLHandshakeCallback)HandshakeCallback, ups);
|
status = SSL_HandshakeCallback(ups->ssl, (SSLHandshakeCallback)HandshakeCallback, ups);
|
||||||
if (status != SECSuccess) {
|
if (status != SECSuccess) {
|
||||||
nss_error("upscli_sslinit / SSL_HandshakeCallback");
|
nss_error("upscli_sslinit / SSL_HandshakeCallback");
|
||||||
|
@ -930,9 +830,9 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
/* TODO : Close the connection. */
|
/* TODO : Close the connection. */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,15 +840,12 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
|
|
||||||
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(ups);
|
|
||||||
NUT_UNUSED_VARIABLE(verifycert);
|
|
||||||
|
|
||||||
return 0; /* not supported */
|
return 0; /* not supported */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WITH_SSL */
|
#endif /* WITH_SSL */
|
||||||
|
|
||||||
int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags, struct timeval * timeout)
|
int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,struct timeval * timeout)
|
||||||
{
|
{
|
||||||
int sock_fd;
|
int sock_fd;
|
||||||
struct addrinfo hints, *res, *ai;
|
struct addrinfo hints, *res, *ai;
|
||||||
|
@ -974,7 +871,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(sport, sizeof(sport), "%ju", (uintmax_t)port);
|
snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port);
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
|
||||||
|
@ -1108,7 +1005,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags
|
||||||
ups->port = port;
|
ups->port = port;
|
||||||
|
|
||||||
hostcert = upscli_find_host_cert(host);
|
hostcert = upscli_find_host_cert(host);
|
||||||
|
|
||||||
if (hostcert != NULL) {
|
if (hostcert != NULL) {
|
||||||
/* An host security rule is specified. */
|
/* An host security rule is specified. */
|
||||||
certverify = hostcert->certverify;
|
certverify = hostcert->certverify;
|
||||||
|
@ -1118,39 +1015,39 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags
|
||||||
forcessl = (flags & UPSCLI_CONN_REQSSL) != 0 ? 1 : 0;
|
forcessl = (flags & UPSCLI_CONN_REQSSL) != 0 ? 1 : 0;
|
||||||
}
|
}
|
||||||
tryssl = (flags & UPSCLI_CONN_TRYSSL) != 0 ? 1 : 0;
|
tryssl = (flags & UPSCLI_CONN_TRYSSL) != 0 ? 1 : 0;
|
||||||
|
|
||||||
if (tryssl || forcessl) {
|
if (tryssl || forcessl) {
|
||||||
ret = upscli_sslinit(ups, certverify);
|
ret = upscli_sslinit(ups, certverify);
|
||||||
if (forcessl && ret != 1) {
|
if (forcessl && ret != 1) {
|
||||||
upslogx(LOG_ERR, "Can not connect to NUT server %s in SSL, disconnect", host);
|
upslogx(LOG_ERR, "Can not connect to %s in SSL, disconnect", host);
|
||||||
ups->upserror = UPSCLI_ERR_SSLFAIL;
|
ups->upserror = UPSCLI_ERR_SSLFAIL;
|
||||||
upscli_disconnect(ups);
|
upscli_disconnect(ups);
|
||||||
return -1;
|
return -1;
|
||||||
} else if (tryssl && ret == -1) {
|
} else if (tryssl && ret == -1) {
|
||||||
upslogx(LOG_NOTICE, "Error while connecting to NUT server %s, disconnect", host);
|
upslogx(LOG_NOTICE, "Error while connecting to %s, disconnect", host);
|
||||||
upscli_disconnect(ups);
|
upscli_disconnect(ups);
|
||||||
return -1;
|
return -1;
|
||||||
} else if (tryssl && ret == 0) {
|
} else if (tryssl && ret == 0) {
|
||||||
if (certverify != 0) {
|
if (certverify != 0) {
|
||||||
upslogx(LOG_NOTICE, "Can not connect to NUT server %s in SSL and "
|
upslogx(LOG_NOTICE, "Can not connect to %s in SSL and "
|
||||||
"certificate is needed, disconnect", host);
|
"certificate is needed, disconnect", host);
|
||||||
upscli_disconnect(ups);
|
upscli_disconnect(ups);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
upsdebugx(3, "Can not connect to NUT server %s in SSL, continue unencrypted", host);
|
upsdebugx(3, "Can not connect to %s in SSL, continue uncrypted", host);
|
||||||
} else {
|
} else {
|
||||||
upslogx(LOG_INFO, "Connected to NUT server %s in SSL", host);
|
upslogx(LOG_INFO, "Connected to %s in SSL", host);
|
||||||
if (certverify == 0) {
|
if (certverify == 0) {
|
||||||
/* you REALLY should set CERTVERIFY to 1 if using SSL... */
|
/* you REALLY should set CERTVERIFY to 1 if using SSL... */
|
||||||
upslogx(LOG_WARNING, "Certificate verification is disabled");
|
upslogx(LOG_WARNING, "Certificate verification is disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags)
|
int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags)
|
||||||
{
|
{
|
||||||
return upscli_tryconnect(ups,host,port,flags,NULL);
|
return upscli_tryconnect(ups,host,port,flags,NULL);
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1058,7 @@ static struct {
|
||||||
const char *text;
|
const char *text;
|
||||||
} upsd_errlist[] =
|
} upsd_errlist[] =
|
||||||
{
|
{
|
||||||
{ UPSCLI_ERR_VARNOTSUPP, "VAR-NOT-SUPPORTED" },
|
{ UPSCLI_ERR_VARNOTSUPP, "VAR-NOT-SUPPORTED" },
|
||||||
{ UPSCLI_ERR_UNKNOWNUPS, "UNKNOWN-UPS" },
|
{ UPSCLI_ERR_UNKNOWNUPS, "UNKNOWN-UPS" },
|
||||||
{ UPSCLI_ERR_ACCESSDENIED, "ACCESS-DENIED" },
|
{ UPSCLI_ERR_ACCESSDENIED, "ACCESS-DENIED" },
|
||||||
{ UPSCLI_ERR_PWDREQUIRED, "PASSWORD-REQUIRED" },
|
{ UPSCLI_ERR_PWDREQUIRED, "PASSWORD-REQUIRED" },
|
||||||
|
@ -1186,7 +1083,7 @@ static struct {
|
||||||
{ UPSCLI_ERR_INVPASSWORD, "INVALID-PASSWORD" },
|
{ UPSCLI_ERR_INVPASSWORD, "INVALID-PASSWORD" },
|
||||||
{ UPSCLI_ERR_USERREQUIRED, "USERNAME-REQUIRED" },
|
{ UPSCLI_ERR_USERREQUIRED, "USERNAME-REQUIRED" },
|
||||||
{ UPSCLI_ERR_DRVNOTCONN, "DRIVER-NOT-CONNECTED" },
|
{ UPSCLI_ERR_DRVNOTCONN, "DRIVER-NOT-CONNECTED" },
|
||||||
|
|
||||||
{ 0, NULL, }
|
{ 0, NULL, }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1223,9 +1120,9 @@ static int upscli_errcheck(UPSCONN_t *ups, char *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void build_cmd(char *buf, size_t bufsize, const char *cmdname,
|
static void build_cmd(char *buf, size_t bufsize, const char *cmdname,
|
||||||
size_t numarg, const char **arg)
|
int numarg, const char **arg)
|
||||||
{
|
{
|
||||||
size_t i;
|
int i;
|
||||||
size_t len;
|
size_t len;
|
||||||
char enc[UPSCLI_NETBUF_LEN];
|
char enc[UPSCLI_NETBUF_LEN];
|
||||||
const char *format;
|
const char *format;
|
||||||
|
@ -1245,20 +1142,8 @@ static void build_cmd(char *buf, size_t bufsize, const char *cmdname,
|
||||||
/* snprintfcat would tie us to common */
|
/* snprintfcat would tie us to common */
|
||||||
|
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
snprintf(buf + len, bufsize - len, format,
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
snprintf(buf + len, bufsize - len, format,
|
|
||||||
pconf_encode(arg[i], enc, sizeof(enc)));
|
pconf_encode(arg[i], enc, sizeof(enc)));
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
|
@ -1266,9 +1151,9 @@ static void build_cmd(char *buf, size_t bufsize, const char *cmdname,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure upsd is giving us what we asked for */
|
/* make sure upsd is giving us what we asked for */
|
||||||
static int verify_resp(size_t num, const char **q, char **a)
|
static int verify_resp(int num, const char **q, char **a)
|
||||||
{
|
{
|
||||||
size_t i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
if (strcasecmp(q[i], a[i]) != 0) {
|
if (strcasecmp(q[i], a[i]) != 0) {
|
||||||
|
@ -1281,11 +1166,11 @@ static int verify_resp(size_t num, const char **q, char **a)
|
||||||
return 1; /* OK */
|
return 1; /* OK */
|
||||||
}
|
}
|
||||||
|
|
||||||
int upscli_get(UPSCONN_t *ups, size_t numq, const char **query,
|
int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query,
|
||||||
size_t *numa, char ***answer)
|
unsigned int *numa, char ***answer)
|
||||||
{
|
{
|
||||||
char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN];
|
char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN];
|
||||||
|
|
||||||
if (!ups) {
|
if (!ups) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1334,7 +1219,7 @@ int upscli_get(UPSCONN_t *ups, size_t numq, const char **query,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query)
|
int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query)
|
||||||
{
|
{
|
||||||
char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN];
|
char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN];
|
||||||
|
|
||||||
|
@ -1392,8 +1277,8 @@ int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query,
|
int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query,
|
||||||
size_t *numa, char ***answer)
|
unsigned int *numa, char ***answer)
|
||||||
{
|
{
|
||||||
char tmp[UPSCLI_NETBUF_LEN];
|
char tmp[UPSCLI_NETBUF_LEN];
|
||||||
|
|
||||||
|
@ -1441,9 +1326,9 @@ int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout)
|
int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
int ret;
|
||||||
|
|
||||||
if (!ups) {
|
if (!ups) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1464,7 +1349,7 @@ ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = net_write(ups, buf, buflen, timeout);
|
ret = net_write(ups, buf, buflen);
|
||||||
|
|
||||||
if (ret < 1) {
|
if (ret < 1) {
|
||||||
upscli_disconnect(ups);
|
upscli_disconnect(ups);
|
||||||
|
@ -1474,14 +1359,9 @@ ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen)
|
int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
return upscli_sendline_timeout(ups, buf, buflen, 0);
|
int ret;
|
||||||
}
|
|
||||||
|
|
||||||
ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout)
|
|
||||||
{
|
|
||||||
ssize_t ret;
|
|
||||||
size_t recv;
|
size_t recv;
|
||||||
|
|
||||||
if (!ups) {
|
if (!ups) {
|
||||||
|
@ -1507,17 +1387,14 @@ ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const
|
||||||
|
|
||||||
if (ups->readidx == ups->readlen) {
|
if (ups->readidx == ups->readlen) {
|
||||||
|
|
||||||
ret = net_read(ups, ups->readbuf, sizeof(ups->readbuf), timeout);
|
ret = net_read(ups, ups->readbuf, sizeof(ups->readbuf));
|
||||||
|
|
||||||
if (ret < 1) {
|
if (ret < 1) {
|
||||||
upscli_disconnect(ups);
|
upscli_disconnect(ups);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Here ret is safe to cast since it is >=1 and certainly
|
ups->readlen = ret;
|
||||||
* fits under SIZE_MAX being it signed sibling
|
|
||||||
*/
|
|
||||||
ups->readlen = (size_t)ret;
|
|
||||||
ups->readidx = 0;
|
ups->readidx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1532,13 +1409,8 @@ ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen)
|
|
||||||
{
|
|
||||||
return upscli_readline_timeout(ups, buf, buflen, DEFAULT_NETWORK_TIMEOUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* split upsname[@hostname[:port]] into separate components */
|
/* split upsname[@hostname[:port]] into separate components */
|
||||||
int upscli_splitname(const char *buf, char **upsname, char **hostname, uint16_t *port)
|
int upscli_splitname(const char *buf, char **upsname, char **hostname, int *port)
|
||||||
{
|
{
|
||||||
char *s, tmp[SMALLBUF], *last = NULL;
|
char *s, tmp[SMALLBUF], *last = NULL;
|
||||||
|
|
||||||
|
@ -1574,10 +1446,9 @@ int upscli_splitname(const char *buf, char **upsname, char **hostname, uint16_t
|
||||||
}
|
}
|
||||||
|
|
||||||
/* split hostname[:port] into separate components */
|
/* split hostname[:port] into separate components */
|
||||||
int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port)
|
int upscli_splitaddr(const char *buf, char **hostname, int *port)
|
||||||
{
|
{
|
||||||
char *s, tmp[SMALLBUF], *last = NULL;
|
char *s, tmp[SMALLBUF], *last = NULL;
|
||||||
long l;
|
|
||||||
|
|
||||||
/* paranoia */
|
/* paranoia */
|
||||||
if ((!buf) || (!hostname) || (!port)) {
|
if ((!buf) || (!hostname) || (!port)) {
|
||||||
|
@ -1620,13 +1491,10 @@ int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that "long" port fits in an "uint16_t" so is in IP range
|
if ((*(++s) == '\0') || ((*port = strtol(s, NULL, 10)) < 1 )) {
|
||||||
* (under 65536) */
|
|
||||||
if ((*(++s) == '\0') || ((l = strtol(s, NULL, 10)) < 1 ) || (l > 65535)) {
|
|
||||||
fprintf(stderr, "upscli_splitaddr: no port specified after ':' separator\n");
|
fprintf(stderr, "upscli_splitaddr: no port specified after ':' separator\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*port = (uint16_t)l;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1650,7 +1518,7 @@ int upscli_disconnect(UPSCONN_t *ups)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
net_write(ups, "LOGOUT\n", 7, 0);
|
net_write(ups, "LOGOUT\n", 7);
|
||||||
|
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
if (ups->ssl) {
|
if (ups->ssl) {
|
||||||
|
|
|
@ -21,26 +21,13 @@
|
||||||
#define UPSCLIENT_H_SEEN
|
#define UPSCLIENT_H_SEEN
|
||||||
|
|
||||||
#ifdef WITH_OPENSSL
|
#ifdef WITH_OPENSSL
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
#elif defined(WITH_NSS) /* WITH_OPENSSL */
|
||||||
#include <nss.h>
|
#include <nss.h>
|
||||||
#include <ssl.h>
|
#include <ssl.h>
|
||||||
#endif /* WITH_OPENSSL | WITH_NSS */
|
#endif /* WITH_OPENSSL | WITH_NSS */
|
||||||
|
|
||||||
/* Not including nut_stdint.h because this is part of end-user API */
|
|
||||||
#if defined HAVE_INTTYPES_H
|
|
||||||
#include <inttypes.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined HAVE_STDINT_H
|
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined HAVE_LIMITS_H
|
|
||||||
#include <limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -54,7 +41,7 @@ extern "C" {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *host;
|
char *host;
|
||||||
uint16_t port;
|
int port;
|
||||||
int fd;
|
int fd;
|
||||||
int flags;
|
int flags;
|
||||||
int upserror;
|
int upserror;
|
||||||
|
@ -82,33 +69,31 @@ typedef struct {
|
||||||
const char *upscli_strerror(UPSCONN_t *ups);
|
const char *upscli_strerror(UPSCONN_t *ups);
|
||||||
|
|
||||||
int upscli_init(int certverify, const char *certpath, const char *certname, const char *certpasswd);
|
int upscli_init(int certverify, const char *certpath, const char *certname, const char *certpasswd);
|
||||||
int upscli_cleanup(void);
|
int upscli_cleanup();
|
||||||
|
|
||||||
int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags, struct timeval *tv);
|
int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags, struct timeval *tv);
|
||||||
int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags);
|
int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags);
|
||||||
|
|
||||||
void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl);
|
void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl);
|
||||||
|
|
||||||
/* --- functions that only use the new names --- */
|
/* --- functions that only use the new names --- */
|
||||||
|
|
||||||
int upscli_get(UPSCONN_t *ups, size_t numq, const char **query,
|
int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query,
|
||||||
size_t *numa, char ***answer);
|
unsigned int *numa, char ***answer);
|
||||||
|
|
||||||
int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query);
|
int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query);
|
||||||
|
|
||||||
int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query,
|
int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query,
|
||||||
size_t *numa, char ***answer);
|
unsigned int *numa, char ***answer);
|
||||||
|
|
||||||
ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout);
|
int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen);
|
||||||
ssize_t upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen);
|
|
||||||
|
|
||||||
ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout);
|
int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen);
|
||||||
ssize_t upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen);
|
|
||||||
|
|
||||||
int upscli_splitname(const char *buf, char **upsname, char **hostname,
|
int upscli_splitname(const char *buf, char **upsname, char **hostname,
|
||||||
uint16_t *port);
|
int *port);
|
||||||
|
|
||||||
int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port);
|
int upscli_splitaddr(const char *buf, char **hostname, int *port);
|
||||||
|
|
||||||
int upscli_disconnect(UPSCONN_t *ups);
|
int upscli_disconnect(UPSCONN_t *ups);
|
||||||
|
|
||||||
|
@ -118,7 +103,7 @@ int upscli_fd(UPSCONN_t *ups);
|
||||||
int upscli_upserror(UPSCONN_t *ups);
|
int upscli_upserror(UPSCONN_t *ups);
|
||||||
|
|
||||||
/* returns 1 if SSL mode is active for this connection */
|
/* returns 1 if SSL mode is active for this connection */
|
||||||
int upscli_ssl(UPSCONN_t *ups);
|
int upscli_ssl(UPSCONN_t *ups);
|
||||||
|
|
||||||
/* upsclient error list */
|
/* upsclient error list */
|
||||||
|
|
||||||
|
|
148
clients/upscmd.c
148
clients/upscmd.c
|
@ -1,8 +1,6 @@
|
||||||
/* upscmd - simple "client" to test instant commands via upsd
|
/* upscmd - simple "client" to test instant commands via upsd
|
||||||
|
|
||||||
Copyright (C)
|
Copyright (C) 2000 Russell Kroll <rkroll@exploits.org>
|
||||||
2000 Russell Kroll <rkroll@exploits.org>
|
|
||||||
2019 EATON (author: Arnaud Quette <ArnaudQuette@eaton.com>)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,13 +26,10 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
|
|
||||||
static char *upsname = NULL, *hostname = NULL;
|
static char *upsname = NULL, *hostname = NULL;
|
||||||
static UPSCONN_t *ups = NULL;
|
static UPSCONN_t *ups = NULL;
|
||||||
static int tracking_enabled = 0;
|
|
||||||
static unsigned int timeout = DEFAULT_TRACKING_TIMEOUT;
|
|
||||||
|
|
||||||
struct list_t {
|
struct list_t {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -46,16 +41,13 @@ static void usage(const char *prog)
|
||||||
printf("Network UPS Tools upscmd %s\n\n", UPS_VERSION);
|
printf("Network UPS Tools upscmd %s\n\n", UPS_VERSION);
|
||||||
printf("usage: %s [-h]\n", prog);
|
printf("usage: %s [-h]\n", prog);
|
||||||
printf(" %s [-l <ups>]\n", prog);
|
printf(" %s [-l <ups>]\n", prog);
|
||||||
printf(" %s [-u <username>] [-p <password>] [-w] [-t <timeout>] <ups> <command> [<value>]\n\n", prog);
|
printf(" %s [-u <username>] [-p <password>] <ups> <command> [<value>]\n\n", prog);
|
||||||
printf("Administration program to initiate instant commands on UPS hardware.\n");
|
printf("Administration program to initiate instant commands on UPS hardware.\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" -h display this help text\n");
|
printf(" -h display this help text\n");
|
||||||
printf(" -l <ups> show available commands on UPS <ups>\n");
|
printf(" -l <ups> show available commands on UPS <ups>\n");
|
||||||
printf(" -u <username> set username for command authentication\n");
|
printf(" -u <username> set username for command authentication\n");
|
||||||
printf(" -p <password> set password for command authentication\n");
|
printf(" -p <password> set password for command authentication\n");
|
||||||
printf(" -w wait for the completion of command by the driver\n");
|
|
||||||
printf(" and return its actual result from the device\n");
|
|
||||||
printf(" -t <timeout> set a timeout when using -w (in seconds, default: %u)\n", DEFAULT_TRACKING_TIMEOUT);
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
||||||
printf(" <command> Valid instant command - test.panel.start, etc.\n");
|
printf(" <command> Valid instant command - test.panel.start, etc.\n");
|
||||||
|
@ -65,7 +57,7 @@ static void usage(const char *prog)
|
||||||
static void print_cmd(char *cmdname)
|
static void print_cmd(char *cmdname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -88,7 +80,7 @@ static void print_cmd(char *cmdname)
|
||||||
static void listcmds(void)
|
static void listcmds(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
struct list_t *lhead = NULL, *llast = NULL, *ltmp, *lnext;
|
struct list_t *lhead = NULL, *llast = NULL, *ltmp, *lnext;
|
||||||
|
@ -113,7 +105,7 @@ static void listcmds(void)
|
||||||
|
|
||||||
/* CMD <upsname> <cmdname> */
|
/* CMD <upsname> <cmdname> */
|
||||||
if (numa < 3) {
|
if (numa < 3) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we must first read the entire list of commands,
|
/* we must first read the entire list of commands,
|
||||||
|
@ -144,21 +136,9 @@ static void listcmds(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC)
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC)
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
static void do_cmd(char **argv, const int argc)
|
static void do_cmd(char **argv, const int argc)
|
||||||
{
|
{
|
||||||
int cmd_complete = 0;
|
|
||||||
char buf[SMALLBUF];
|
char buf[SMALLBUF];
|
||||||
char tracking_id[UUID4_LEN];
|
|
||||||
time_t start, now;
|
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
snprintf(buf, sizeof(buf), "INSTCMD %s %s %s\n", upsname, argv[0], argv[1]);
|
snprintf(buf, sizeof(buf), "INSTCMD %s %s %s\n", upsname, argv[0], argv[1]);
|
||||||
|
@ -174,88 +154,13 @@ static void do_cmd(char **argv, const int argc)
|
||||||
fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* verify answer */
|
/* FUTURE: status cookies will tie in here */
|
||||||
if (strncmp(buf, "OK", 2) != 0) {
|
if (strncmp(buf, "OK", 2) != 0) {
|
||||||
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for status tracking id */
|
|
||||||
if (
|
|
||||||
!tracking_enabled ||
|
|
||||||
/* sanity check on the size: "OK TRACKING " + UUID4_LEN */
|
|
||||||
strlen(buf) != (UUID4_LEN - 1 + strlen("OK TRACKING "))
|
|
||||||
) {
|
|
||||||
/* reply as usual */
|
|
||||||
fprintf(stderr, "%s\n", buf);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
|
||||||
#endif
|
|
||||||
/* From the check above, we know that we have exactly UUID4_LEN chars
|
|
||||||
* (aka sizeof(tracking_id)) in the buf after "OK TRACKING " prefix,
|
|
||||||
* plus the null-byte.
|
|
||||||
*/
|
|
||||||
assert (UUID4_LEN == 1 + snprintf(tracking_id, sizeof(tracking_id), "%s", buf + strlen("OK TRACKING ")));
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
time(&start);
|
|
||||||
|
|
||||||
/* send status tracking request, looping if status is PENDING */
|
|
||||||
while (!cmd_complete) {
|
|
||||||
|
|
||||||
/* check for timeout */
|
|
||||||
time(&now);
|
|
||||||
if (difftime(now, start) >= timeout)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't receive status tracking information: timeout");
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "GET TRACKING %s\n", tracking_id);
|
|
||||||
|
|
||||||
if (upscli_sendline(ups, buf, strlen(buf)) < 0)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't send status tracking request: %s", upscli_strerror(ups));
|
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) )
|
|
||||||
/* Note for gating macros above: unsuffixed HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP
|
|
||||||
* means support of contexts both inside and outside function body, so the push
|
|
||||||
* above and pop below (outside this finction) are not used.
|
|
||||||
*/
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS
|
|
||||||
/* Note that the individual warning pragmas for use inside function bodies
|
|
||||||
* are named without a _INSIDEFUNC suffix, for simplicity and legacy reasons
|
|
||||||
*/
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
/* and get status tracking reply */
|
|
||||||
assert(timeout < LONG_MAX);
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (upscli_readline_timeout(ups, buf, sizeof(buf), (long)timeout) < 0)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't receive status tracking information: %s", upscli_strerror(ups));
|
|
||||||
|
|
||||||
if (strncmp(buf, "PENDING", 7))
|
|
||||||
cmd_complete = 1;
|
|
||||||
else
|
|
||||||
/* wait a second before retrying */
|
|
||||||
sleep(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", buf);
|
fprintf(stderr, "%s\n", buf);
|
||||||
}
|
}
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void clean_exit(void)
|
static void clean_exit(void)
|
||||||
{
|
{
|
||||||
|
@ -270,14 +175,12 @@ static void clean_exit(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ret, port;
|
||||||
uint16_t port;
|
|
||||||
ssize_t ret;
|
|
||||||
int have_un = 0, have_pw = 0, cmdlist = 0;
|
int have_un = 0, have_pw = 0, cmdlist = 0;
|
||||||
char buf[SMALLBUF * 2], username[SMALLBUF], password[SMALLBUF];
|
char buf[SMALLBUF], username[SMALLBUF], password[SMALLBUF];
|
||||||
const char *prog = xbasename(argv[0]);
|
const char *prog = xbasename(argv[0]);
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+lhu:p:t:wV")) != -1) {
|
while ((i = getopt(argc, argv, "+lhu:p:V")) != -1) {
|
||||||
|
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
|
@ -295,20 +198,8 @@ int main(int argc, char **argv)
|
||||||
have_pw = 1;
|
have_pw = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
|
||||||
if (!str_to_uint(optarg, &timeout, 10))
|
|
||||||
fatal_with_errno(EXIT_FAILURE, "Could not convert the provided value for timeout ('-t' option) to unsigned int");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'w':
|
|
||||||
tracking_enabled = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION);
|
fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION);
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
|
||||||
exit(EXIT_SUCCESS); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
|
@ -422,25 +313,6 @@ int main(int argc, char **argv)
|
||||||
fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable status tracking ID */
|
|
||||||
if (tracking_enabled) {
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "SET TRACKING ON\n");
|
|
||||||
|
|
||||||
if (upscli_sendline(ups, buf, strlen(buf)) < 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Can't enable command status tracking: %s", upscli_strerror(ups));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Enabling command status tracking failed: %s", upscli_strerror(ups));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Verify the result */
|
|
||||||
if (strncmp(buf, "OK", 2) != 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Enabling command status tracking failed. upsd answered: %s", buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
do_cmd(&argv[1], argc - 1);
|
do_cmd(&argv[1], argc - 1);
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
#include "cgilib.h"
|
#include "cgilib.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -50,7 +49,7 @@
|
||||||
|
|
||||||
static char *monhost = NULL, *cmd = NULL;
|
static char *monhost = NULL, *cmd = NULL;
|
||||||
|
|
||||||
static uint16_t port;
|
static int port;
|
||||||
static char *upsname, *hostname;
|
static char *upsname, *hostname;
|
||||||
static UPSCONN_t ups;
|
static UPSCONN_t ups;
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ static UPSCONN_t ups;
|
||||||
|
|
||||||
void parsearg(char *var, char *value)
|
void parsearg(char *var, char *value)
|
||||||
{
|
{
|
||||||
long long i, v; /* Be big enough to fit all expected inputs; truncate later */
|
int i, v;
|
||||||
|
|
||||||
/* avoid bogus junk from evil people */
|
/* avoid bogus junk from evil people */
|
||||||
if ((strlen(var) > MAX_CGI_STRLEN) || (strlen(value) > MAX_CGI_STRLEN))
|
if ((strlen(var) > MAX_CGI_STRLEN) || (strlen(value) > MAX_CGI_STRLEN))
|
||||||
|
@ -83,20 +82,17 @@ void parsearg(char *var, char *value)
|
||||||
for (i = 0; imgarg[i].name != NULL; i++) {
|
for (i = 0; imgarg[i].name != NULL; i++) {
|
||||||
if (!strcmp(imgarg[i].name, var)) {
|
if (!strcmp(imgarg[i].name, var)) {
|
||||||
if (!strncmp(value, "0x", 2))
|
if (!strncmp(value, "0x", 2))
|
||||||
v = (long long)strtoul(value + 2, (char **)NULL, 16);
|
v = strtoul(value + 2, (char **)NULL, 16);
|
||||||
else
|
else
|
||||||
v = (long long)atoi(value);
|
v = atoi(value);
|
||||||
|
|
||||||
/* avoid false numbers from bad people */
|
/* avoid false numbers from bad people */
|
||||||
if (v < imgarg[i].min)
|
if (v < imgarg[i].min)
|
||||||
imgarg[i].val = imgarg[i].min;
|
imgarg[i].val = imgarg[i].min;
|
||||||
else if (v > imgarg[i].max)
|
else if (v > imgarg[i].max)
|
||||||
imgarg[i].val = imgarg[i].max;
|
imgarg[i].val = imgarg[i].max;
|
||||||
else {
|
else
|
||||||
assert (v < INT_MAX);
|
imgarg[i].val = v;
|
||||||
assert (v > INT_MIN);
|
|
||||||
imgarg[i].val = (int)v;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,9 +111,6 @@ static int get_imgarg(const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write the HTML header then have gd dump the image */
|
/* write the HTML header then have gd dump the image */
|
||||||
static void drawimage(gdImagePtr im)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void drawimage(gdImagePtr im)
|
static void drawimage(gdImagePtr im)
|
||||||
{
|
{
|
||||||
printf("Pragma: no-cache\n");
|
printf("Pragma: no-cache\n");
|
||||||
|
@ -198,7 +191,7 @@ static void drawscale(
|
||||||
if (level % step5 == 0)
|
if (level % step5 == 0)
|
||||||
gdImageLine(im, 5, y, width - 5, y, col2);
|
gdImageLine(im, 5, y, width - 5, y, col2);
|
||||||
else
|
else
|
||||||
gdImageLine(im, 10, y, width - 10, y, col2);
|
gdImageLine(im, 10, y, width - 10, y, col2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,25 +200,13 @@ static void drawscale(
|
||||||
if (level % step10 == 0) {
|
if (level % step10 == 0) {
|
||||||
y = scale_height * (lvlhi - level) / range;
|
y = scale_height * (lvlhi - level) / range;
|
||||||
snprintf(lbltxt, sizeof(lbltxt), "%d", level);
|
snprintf(lbltxt, sizeof(lbltxt), "%d", level);
|
||||||
gdImageString(im, gdFontMediumBold,
|
gdImageString(im, gdFontMediumBold, width - strlen(lbltxt)*gdFontMediumBold->w, y,
|
||||||
width - (int)(strlen(lbltxt)) * gdFontMediumBold->w,
|
(unsigned char *) lbltxt, scale_num_color);
|
||||||
y, (unsigned char *) lbltxt, scale_num_color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws the bar style indicator */
|
/* draws the bar style indicator */
|
||||||
static void drawbar(
|
|
||||||
int lvllo, int lvlhi, /* min and max numbers on the scale */
|
|
||||||
int step, int step5, int step10, /* steps for minor, submajor and major dashes */
|
|
||||||
int redlo1, int redhi1, /* first red zone start and end */
|
|
||||||
int redlo2, int redhi2, /* second red zone start and end */
|
|
||||||
int grnlo, int grnhi, /* green zone start and end */
|
|
||||||
double value, /* UPS variable value to draw */
|
|
||||||
const char *format /* printf style format to be used when rendering summary text */
|
|
||||||
)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void drawbar(
|
static void drawbar(
|
||||||
int lvllo, int lvlhi, /* min and max numbers on the scale */
|
int lvllo, int lvlhi, /* min and max numbers on the scale */
|
||||||
int step, int step5, int step10, /* steps for minor, submajor and major dashes */
|
int step, int step5, int step10, /* steps for minor, submajor and major dashes */
|
||||||
|
@ -259,7 +240,7 @@ static void drawbar(
|
||||||
summary_color = color_alloc(im, get_imgarg("summary_col"));
|
summary_color = color_alloc(im, get_imgarg("summary_col"));
|
||||||
|
|
||||||
/* rescale UPS value to fit in the scale */
|
/* rescale UPS value to fit in the scale */
|
||||||
bar_y = (int)((1.0 - (value - lvllo) / (lvlhi - lvllo)) * scale_height);
|
bar_y = (1 - (value - lvllo) / (lvlhi - lvllo)) * scale_height;
|
||||||
|
|
||||||
/* sanity checks: */
|
/* sanity checks: */
|
||||||
|
|
||||||
|
@ -276,21 +257,9 @@ static void drawbar(
|
||||||
bar_color);
|
bar_color);
|
||||||
|
|
||||||
/* stick the text version of the value at the bottom center */
|
/* stick the text version of the value at the bottom center */
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
snprintf(text, sizeof(text), format, value);
|
snprintf(text, sizeof(text), format, value);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
gdImageString(im, gdFontMediumBold,
|
gdImageString(im, gdFontMediumBold,
|
||||||
(width - (int)(strlen(text))*gdFontMediumBold->w)/2,
|
(width - strlen(text)*gdFontMediumBold->w)/2,
|
||||||
height - gdFontMediumBold->h,
|
height - gdFontMediumBold->h,
|
||||||
(unsigned char *) text, summary_color);
|
(unsigned char *) text, summary_color);
|
||||||
|
|
||||||
|
@ -300,9 +269,6 @@ static void drawbar(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws the error image */
|
/* draws the error image */
|
||||||
static void noimage(const char *fmt, ...)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void noimage(const char *fmt, ...)
|
static void noimage(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
gdImagePtr im;
|
gdImagePtr im;
|
||||||
|
@ -312,19 +278,7 @@ static void noimage(const char *fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vsnprintf(msg, sizeof(msg), fmt, ap);
|
vsnprintf(msg, sizeof(msg), fmt, ap);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
width = get_imgarg("width");
|
width = get_imgarg("width");
|
||||||
|
@ -339,23 +293,17 @@ static void noimage(const char *fmt, ...)
|
||||||
|
|
||||||
if (width > height)
|
if (width > height)
|
||||||
gdImageString(im, gdFontMediumBold,
|
gdImageString(im, gdFontMediumBold,
|
||||||
(width - (int)(strlen(msg))*gdFontMediumBold->w)/2,
|
(width - strlen(msg)*gdFontMediumBold->w)/2,
|
||||||
(height - gdFontMediumBold->h)/2,
|
(height - gdFontMediumBold->h)/2,
|
||||||
(unsigned char *) msg, summary_color);
|
(unsigned char *) msg, summary_color);
|
||||||
else
|
else
|
||||||
gdImageStringUp(im, gdFontMediumBold,
|
gdImageStringUp(im, gdFontMediumBold,
|
||||||
(width - gdFontMediumBold->h)/2,
|
(width - gdFontMediumBold->h)/2,
|
||||||
(height + (int)(strlen(msg))*gdFontMediumBold->w)/2,
|
(height + strlen(msg)*gdFontMediumBold->w)/2,
|
||||||
(unsigned char *) msg, summary_color);
|
(unsigned char *) msg, summary_color);
|
||||||
|
|
||||||
drawimage(im);
|
drawimage(im);
|
||||||
|
|
||||||
/* NOTE: Earlier code called noimage() and then exit(EXIT_FAILURE);
|
|
||||||
* to signal an error via process exit code. Now that drawimage()
|
|
||||||
* always ends with exit(EXIT_SUCCESS) - which might make webserver
|
|
||||||
* feel good - the command-line use if any suffers no error returns.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,10 +311,6 @@ static void noimage(const char *fmt, ...)
|
||||||
UPS variable can be determined.
|
UPS variable can be determined.
|
||||||
deviation < 0 means that values below nom should be grey instead of
|
deviation < 0 means that values below nom should be grey instead of
|
||||||
green */
|
green */
|
||||||
static void drawgeneralbar(double var, int min, int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void drawgeneralbar(double var, int min, int nom, int max,
|
static void drawgeneralbar(double var, int min, int nom, int max,
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
|
@ -426,10 +370,6 @@ static void drawgeneralbar(double var, int min, int nom, int max,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws input and output voltage bar style indicators */
|
/* draws input and output voltage bar style indicators */
|
||||||
static void draw_utility(double var, int min, int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_utility(double var, int min, int nom, int max,
|
static void draw_utility(double var, int min, int nom, int max,
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
|
@ -465,7 +405,7 @@ static void draw_utility(double var, int min, int nom, int max,
|
||||||
|
|
||||||
/* Acceptable range of voltage is 85%-110% of nominal voltage
|
/* Acceptable range of voltage is 85%-110% of nominal voltage
|
||||||
* in EU at least. Be conservative and say +-10% */
|
* in EU at least. Be conservative and say +-10% */
|
||||||
deviation = (int)(nom * 0.1);
|
deviation = nom*0.1;
|
||||||
|
|
||||||
drawgeneralbar(var, min, nom, max, deviation, format);
|
drawgeneralbar(var, min, nom, max, deviation, format);
|
||||||
|
|
||||||
|
@ -473,17 +413,9 @@ static void draw_utility(double var, int min, int nom, int max,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws battery.percent bar style indicator */
|
/* draws battery.percent bar style indicator */
|
||||||
static void draw_battpct(double var, int min, int nom,
|
static void draw_battpct(double var, int min, int nom, int max,
|
||||||
int max, int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_battpct(double var, int min, int nom,
|
|
||||||
int max, int deviation, const char *format)
|
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(nom);
|
|
||||||
NUT_UNUSED_VARIABLE(max);
|
|
||||||
NUT_UNUSED_VARIABLE(deviation);
|
|
||||||
|
|
||||||
if (min < 0) {
|
if (min < 0) {
|
||||||
min = 50;
|
min = 50;
|
||||||
}
|
}
|
||||||
|
@ -492,10 +424,6 @@ static void draw_battpct(double var, int min, int nom,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws battery.voltage bar style indicator */
|
/* draws battery.voltage bar style indicator */
|
||||||
static void draw_battvolt(double var, int min, int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_battvolt(double var, int min, int nom, int max,
|
static void draw_battvolt(double var, int min, int nom, int max,
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
|
@ -522,17 +450,18 @@ static void draw_battvolt(double var, int min, int nom, int max,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(min == -1) {
|
if(min == -1) {
|
||||||
min = (int)(nom/2*1.6+1); /* Assume a 2V cell is dead at 1.6V */
|
min = nom/2*1.6+1; /* Assume a 2V cell is dead at 1.6V */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(max == -1) {
|
if(max == -1) {
|
||||||
max = (int)(nom/2*2.3+1); /* Assume 2.3V float charge voltage */
|
max = nom/2*2.3+1; /* Assume 2.3V float charge voltage */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nom < min || nom > max)
|
if (nom < min || nom > max)
|
||||||
nom = -1;
|
nom = -1;
|
||||||
|
|
||||||
deviation = (int)(-nom*0.05); /* 5% deviation from nominal voltage */
|
|
||||||
|
deviation = -(nom*0.05); /* 5% deviation from nominal voltage */
|
||||||
if(deviation==0) {
|
if(deviation==0) {
|
||||||
deviation = -1;
|
deviation = -1;
|
||||||
}
|
}
|
||||||
|
@ -541,57 +470,33 @@ static void draw_battvolt(double var, int min, int nom, int max,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws ups.load bar style indicator */
|
/* draws ups.load bar style indicator */
|
||||||
static void draw_upsload(double var, int min,
|
static void draw_upsload(double var, int min, int nom, int max,
|
||||||
int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_upsload(double var, int min,
|
|
||||||
int nom, int max,
|
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(min);
|
|
||||||
NUT_UNUSED_VARIABLE(nom);
|
|
||||||
NUT_UNUSED_VARIABLE(max);
|
|
||||||
NUT_UNUSED_VARIABLE(deviation);
|
|
||||||
|
|
||||||
drawbar(0, 125, 5, 5, 25, 100, 125, -1, -1, 0, 50, var, format);
|
drawbar(0, 125, 5, 5, 25, 100, 125, -1, -1, 0, 50, var, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws temperature bar style indicator */
|
/* draws temperature bar style indicator */
|
||||||
static void draw_temperature(double var, int min, int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_temperature(double var, int min, int nom, int max,
|
static void draw_temperature(double var, int min, int nom, int max,
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
int hi = get_imgarg("tempmax");
|
int hi = get_imgarg("tempmax");
|
||||||
int lo = get_imgarg("tempmin");
|
int lo = get_imgarg("tempmin");
|
||||||
NUT_UNUSED_VARIABLE(nom);
|
|
||||||
NUT_UNUSED_VARIABLE(deviation);
|
|
||||||
|
|
||||||
drawbar(lo, hi, 1, 5, 10, lo, min, max, hi, -1, -1, var, format);
|
drawbar(lo, hi, 1, 5, 10, lo, min, max, hi, -1, -1, var, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draws humidity bar style indicator */
|
/* draws humidity bar style indicator */
|
||||||
static void draw_humidity(double var, int min, int nom, int max,
|
|
||||||
int deviation, const char *format)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void draw_humidity(double var, int min, int nom, int max,
|
static void draw_humidity(double var, int min, int nom, int max,
|
||||||
int deviation, const char *format)
|
int deviation, const char *format)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(nom);
|
|
||||||
NUT_UNUSED_VARIABLE(deviation);
|
|
||||||
|
|
||||||
drawbar(0, 100, 2, 10, 20, 0, min, max, 100, -1, -1, var, format);
|
drawbar(0, 100, 2, 10, 20, 0, min, max, 100, -1, -1, var, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_var(const char *var, char *buf, size_t buflen)
|
static int get_var(const char *var, char *buf, size_t buflen)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -618,8 +523,6 @@ int main(int argc, char **argv)
|
||||||
char str[SMALLBUF];
|
char str[SMALLBUF];
|
||||||
int i, min, nom, max;
|
int i, min, nom, max;
|
||||||
double var = 0;
|
double var = 0;
|
||||||
NUT_UNUSED_VARIABLE(argc);
|
|
||||||
NUT_UNUSED_VARIABLE(argv);
|
|
||||||
|
|
||||||
extractcgiargs();
|
extractcgiargs();
|
||||||
|
|
||||||
|
@ -634,17 +537,13 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) {
|
if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) {
|
||||||
noimage("Invalid UPS definition (upsname[@hostname[:port]])\n");
|
noimage("Invalid UPS definition (upsname[@hostname[:port]])\n");
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
exit(EXIT_FAILURE);
|
||||||
exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_connect(&ups, hostname, port, 0) < 0) {
|
if (upscli_connect(&ups, hostname, port, 0) < 0) {
|
||||||
noimage("Can't connect to server:\n%s\n",
|
noimage("Can't connect to server:\n%s\n",
|
||||||
upscli_strerror(&ups));
|
upscli_strerror(&ups));
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
exit(EXIT_FAILURE);
|
||||||
exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; imgvar[i].name; i++)
|
for (i = 0; imgvar[i].name; i++)
|
||||||
|
@ -654,9 +553,7 @@ int main(int argc, char **argv)
|
||||||
registered with this variable */
|
registered with this variable */
|
||||||
if (!imgvar[i].drawfunc) {
|
if (!imgvar[i].drawfunc) {
|
||||||
noimage("Draw function N/A");
|
noimage("Draw function N/A");
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
exit(EXIT_FAILURE);
|
||||||
exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the variable value */
|
/* get the variable value */
|
||||||
|
@ -667,9 +564,7 @@ int main(int argc, char **argv)
|
||||||
snprintf(str, sizeof(str), "%s N/A",
|
snprintf(str, sizeof(str), "%s N/A",
|
||||||
imgvar[i].name);
|
imgvar[i].name);
|
||||||
noimage(str);
|
noimage(str);
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
exit(EXIT_FAILURE);
|
||||||
exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* when getting minimum, nominal and maximum values,
|
/* when getting minimum, nominal and maximum values,
|
||||||
|
@ -722,9 +617,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
noimage("Unknown display");
|
noimage("Unknown display");
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
imgvar_t imgvar[] = {
|
imgvar_t imgvar[] = {
|
||||||
|
|
|
@ -17,32 +17,25 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NUT_UPSIMAGEARG_H_SEEN
|
|
||||||
#define NUT_UPSIMAGEARG_H_SEEN 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is used in upsstats.c and in upsimage.c, but compiler complains about
|
struct {
|
||||||
* non-extern definition if this is not "static". To move or not to move?..
|
|
||||||
* Do we have cases of building binaries refering to only one of those objects?
|
|
||||||
*/
|
|
||||||
static struct {
|
|
||||||
char *name;
|
char *name;
|
||||||
int val; /* hex digits, ala HTML */
|
int val; /* hex digits, ala HTML */
|
||||||
int min; /* minimum reasonable value */
|
int min; /* minimum reasonable value */
|
||||||
int max; /* maximum reasonable value */
|
int max; /* maximum reasonable value */
|
||||||
} imgarg[] =
|
} imgarg[] =
|
||||||
{
|
{
|
||||||
{ "width", 100, 50, 200 },
|
{ "width", 100, 50, 200 },
|
||||||
{ "height", 350, 100, 500 },
|
{ "height", 350, 100, 500 },
|
||||||
{ "scale_height", 300, 100, 500 },
|
{ "scale_height", 300, 100, 500 },
|
||||||
{ "back_col", 0x000000, 0x000000, 0xffffff },
|
{ "back_col", 0x000000, 0x000000, 0xffffff },
|
||||||
{ "scale_num_col", 0xffff00, 0x000000, 0xffffff },
|
{ "scale_num_col", 0xffff00, 0x000000, 0xffffff },
|
||||||
{ "summary_col", 0xffff00, 0x000000, 0xffffff },
|
{ "summary_col", 0xffff00, 0x000000, 0xffffff },
|
||||||
{ "ok_zone_maj_col", 0x00ff00, 0x000000, 0xffffff },
|
{ "ok_zone_maj_col", 0x00ff00, 0x000000, 0xffffff },
|
||||||
{ "ok_zone_min_col", 0x007800, 0x000000, 0xffffff },
|
{ "ok_zone_min_col", 0x007800, 0x000000, 0xffffff },
|
||||||
{ "neutral_zone_maj_col", 0xffffff, 0x000000, 0xffffff },
|
{ "neutral_zone_maj_col", 0xffffff, 0x000000, 0xffffff },
|
||||||
|
@ -54,20 +47,20 @@ static struct {
|
||||||
{ "tempmax", 40, -100, 150 },
|
{ "tempmax", 40, -100, 150 },
|
||||||
{ "nom_in_freq", 50, 0, 100 },
|
{ "nom_in_freq", 50, 0, 100 },
|
||||||
{ "nom_out_freq", 50, 0, 100 },
|
{ "nom_out_freq", 50, 0, 100 },
|
||||||
{ NULL, 0, 0, 0 }
|
{ NULL, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *name; /* name of the UPS variable */
|
char *name; /* name of the UPS variable */
|
||||||
char *minimum; /* name of minimum value UPS variable
|
char *minimum; /* name of minimum value UPS variable
|
||||||
or variable in imgarg table */
|
or variable in imgarg table */
|
||||||
char *nominal; /* as above, only for nominal value */
|
char *nominal; /* as above, only for nominal value */
|
||||||
char *maximum; /* as above, only for maximum value */
|
char *maximum; /* as above, only for maximum value */
|
||||||
int deviation; /* variable deviation - width of green zone */
|
int deviation; /* variable deviation - width of green zone */
|
||||||
char *format; /* format string to generate summary text */
|
char *format; /* format string to generate summary text */
|
||||||
|
|
||||||
/* pointer to drawing function */
|
/* pointer to drawing function */
|
||||||
void (*drawfunc)(double, int, int, int, int, const char*);
|
void (*drawfunc)(double, int, int, int, int, const char*);
|
||||||
} imgvar_t;
|
} imgvar_t;
|
||||||
|
|
||||||
extern imgvar_t imgvar[];
|
extern imgvar_t imgvar[];
|
||||||
|
@ -78,4 +71,3 @@ extern imgvar_t imgvar[];
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_UPSIMAGEARG_H_SEEN */
|
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
/* Basic theory of operation:
|
/* Basic theory of operation:
|
||||||
*
|
*
|
||||||
* First we go through and parse as much of the status format string as
|
* First we go through and parse as much of the status format string as
|
||||||
* possible. We used to do this parsing run every time, but that's a
|
* possible. We used to do this parsing run every time, but that's a
|
||||||
* waste of CPU since it can't change during the program's run.
|
* waste of CPU since it can't change during the program's run.
|
||||||
*
|
*
|
||||||
* This version does the parsing pass once, and creates a linked list of
|
* This version does the parsing pass once, and creates a linked list of
|
||||||
* pointers to the functions that do the work and the arg they get.
|
* pointers to the functions that do the work and the arg they get.
|
||||||
*
|
*
|
||||||
* That means the main loop just has to run the linked list and call
|
* That means the main loop just has to run the linked list and call
|
||||||
* anything it finds in there. Everything happens from there, and we
|
* anything it finds in there. Everything happens from there, and we
|
||||||
* don't have to pointlessly reparse the string every time around.
|
* don't have to pointlessly reparse the string every time around.
|
||||||
|
@ -37,11 +37,9 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "timehead.h"
|
#include "timehead.h"
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upslog.h"
|
#include "upslog.h"
|
||||||
|
|
||||||
static int reopen_flag = 0, exit_flag = 0;
|
static int port, reopen_flag = 0, exit_flag = 0;
|
||||||
static uint16_t port;
|
|
||||||
static char *upsname, *hostname;
|
static char *upsname, *hostname;
|
||||||
static UPSCONN_t ups;
|
static UPSCONN_t ups;
|
||||||
|
|
||||||
|
@ -81,8 +79,6 @@ static void set_exit_flag(int sig)
|
||||||
|
|
||||||
static void set_print_now_flag(int sig)
|
static void set_print_now_flag(int sig)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(sig);
|
|
||||||
|
|
||||||
/* no need to do anything, the signal will cause sleep to be interrupted */
|
/* no need to do anything, the signal will cause sleep to be interrupted */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,9 +108,6 @@ static void setup_signals(void)
|
||||||
fatal_with_errno(EXIT_FAILURE, "Can't install SIGUSR1 handler");
|
fatal_with_errno(EXIT_FAILURE, "Can't install SIGUSR1 handler");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void help(const char *prog)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void help(const char *prog)
|
static void help(const char *prog)
|
||||||
{
|
{
|
||||||
printf("UPS status logger.\n");
|
printf("UPS status logger.\n");
|
||||||
|
@ -125,9 +118,7 @@ static void help(const char *prog)
|
||||||
printf(" -f <format> - Log format. See below for details.\n");
|
printf(" -f <format> - Log format. See below for details.\n");
|
||||||
printf(" - Use -f \"<format>\" so your shell doesn't break it up.\n");
|
printf(" - Use -f \"<format>\" so your shell doesn't break it up.\n");
|
||||||
printf(" -i <interval> - Time between updates, in seconds\n");
|
printf(" -i <interval> - Time between updates, in seconds\n");
|
||||||
printf(" -l <logfile> - Log file name, or - for stdout (foreground by default)\n");
|
printf(" -l <logfile> - Log file name, or - for stdout\n");
|
||||||
printf(" -F - stay foregrounded even if logging into a file\n");
|
|
||||||
printf(" -B - stay backgrounded even if logging to stdout\n");
|
|
||||||
printf(" -p <pidbase> - Base name for PID file (defaults to \"%s\")\n", prog);
|
printf(" -p <pidbase> - Base name for PID file (defaults to \"%s\")\n", prog);
|
||||||
printf(" -s <ups> - Monitor UPS <ups> - <upsname>@<host>[:<port>]\n");
|
printf(" -s <ups> - Monitor UPS <ups> - <upsname>@<host>[:<port>]\n");
|
||||||
printf(" - Example: -s myups@server\n");
|
printf(" - Example: -s myups@server\n");
|
||||||
|
@ -155,7 +146,6 @@ static void do_host(const char *arg)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char hn[LARGEBUF];
|
char hn[LARGEBUF];
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
|
|
||||||
ret = gethostname(hn, sizeof(hn));
|
ret = gethostname(hn, sizeof(hn));
|
||||||
|
|
||||||
|
@ -169,15 +159,11 @@ static void do_host(const char *arg)
|
||||||
|
|
||||||
static void do_upshost(const char *arg)
|
static void do_upshost(const char *arg)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
|
|
||||||
snprintfcat(logbuffer, sizeof(logbuffer), "%s", monhost);
|
snprintfcat(logbuffer, sizeof(logbuffer), "%s", monhost);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_pid(const char *arg)
|
static void do_pid(const char *arg)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
|
|
||||||
snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (long)getpid());
|
snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (long)getpid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +172,6 @@ static void do_time(const char *arg)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char timebuf[SMALLBUF], *format;
|
char timebuf[SMALLBUF], *format;
|
||||||
time_t tod;
|
time_t tod;
|
||||||
struct tm tmbuf;
|
|
||||||
|
|
||||||
format = xstrdup(arg);
|
format = xstrdup(arg);
|
||||||
|
|
||||||
|
@ -196,7 +181,7 @@ static void do_time(const char *arg)
|
||||||
format[i] = '%';
|
format[i] = '%';
|
||||||
|
|
||||||
time(&tod);
|
time(&tod);
|
||||||
strftime(timebuf, sizeof(timebuf), format, localtime_r(&tod, &tmbuf));
|
strftime(timebuf, sizeof(timebuf), format, localtime(&tod));
|
||||||
|
|
||||||
snprintfcat(logbuffer, sizeof(logbuffer), "%s", timebuf);
|
snprintfcat(logbuffer, sizeof(logbuffer), "%s", timebuf);
|
||||||
|
|
||||||
|
@ -206,7 +191,7 @@ static void do_time(const char *arg)
|
||||||
static void getvar(const char *var)
|
static void getvar(const char *var)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -250,7 +235,6 @@ static void do_var(const char *arg)
|
||||||
static void do_etime(const char *arg)
|
static void do_etime(const char *arg)
|
||||||
{
|
{
|
||||||
time_t tod;
|
time_t tod;
|
||||||
NUT_UNUSED_VARIABLE(arg);
|
|
||||||
|
|
||||||
time(&tod);
|
time(&tod);
|
||||||
snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (unsigned long) tod);
|
snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (unsigned long) tod);
|
||||||
|
@ -285,7 +269,7 @@ static void add_call(void (*fptr)(const char *arg), const char *arg)
|
||||||
tmp->next = NULL;
|
tmp->next = NULL;
|
||||||
|
|
||||||
if (last)
|
if (last)
|
||||||
last->next = tmp;
|
last->next = tmp;
|
||||||
else
|
else
|
||||||
fhead = tmp;
|
fhead = tmp;
|
||||||
}
|
}
|
||||||
|
@ -293,9 +277,8 @@ static void add_call(void (*fptr)(const char *arg), const char *arg)
|
||||||
/* turn the format string into a list of function calls with args */
|
/* turn the format string into a list of function calls with args */
|
||||||
static void compile_format(void)
|
static void compile_format(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
unsigned int i;
|
||||||
int j, found;
|
int j, found, ofs;
|
||||||
size_t ofs;
|
|
||||||
char *cmd, *arg, *ptr;
|
char *cmd, *arg, *ptr;
|
||||||
|
|
||||||
for (i = 0; i < strlen(logformat); i++) {
|
for (i = 0; i < strlen(logformat); i++) {
|
||||||
|
@ -347,7 +330,7 @@ static void compile_format(void)
|
||||||
/* see if we know how to handle this command */
|
/* see if we know how to handle this command */
|
||||||
|
|
||||||
for (j = 0; logcmds[j].name != NULL; j++) {
|
for (j = 0; logcmds[j].name != NULL; j++) {
|
||||||
if (strncasecmp(cmd, logcmds[j].name,
|
if (strncasecmp(cmd, logcmds[j].name,
|
||||||
strlen(logcmds[j].name)) == 0) {
|
strlen(logcmds[j].name)) == 0) {
|
||||||
|
|
||||||
add_call(logcmds[j].func, arg);
|
add_call(logcmds[j].func, arg);
|
||||||
|
@ -395,7 +378,7 @@ static void run_flist(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int interval = 30, i, foreground = -1;
|
int interval = 30, i;
|
||||||
const char *prog = xbasename(argv[0]);
|
const char *prog = xbasename(argv[0]);
|
||||||
time_t now, nextpoll = 0;
|
time_t now, nextpoll = 0;
|
||||||
const char *user = NULL;
|
const char *user = NULL;
|
||||||
|
@ -407,13 +390,11 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:FB")) != -1) {
|
while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) {
|
||||||
switch(i) {
|
switch(i) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help(prog);
|
help(prog);
|
||||||
#ifndef HAVE___ATTRIBUTE__NORETURN
|
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
monhost = optarg;
|
monhost = optarg;
|
||||||
|
@ -441,14 +422,6 @@ int main(int argc, char **argv)
|
||||||
case 'p':
|
case 'p':
|
||||||
pidfilebase = optarg;
|
pidfilebase = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'F':
|
|
||||||
foreground = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'B':
|
|
||||||
foreground = 0;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,7 +462,7 @@ int main(int argc, char **argv)
|
||||||
if (!logformat)
|
if (!logformat)
|
||||||
fatalx(EXIT_FAILURE, "No format defined - but this should be impossible");
|
fatalx(EXIT_FAILURE, "No format defined - but this should be impossible");
|
||||||
|
|
||||||
printf("logging status of %s to %s (%is intervals)\n",
|
printf("logging status of %s to %s (%is intervals)\n",
|
||||||
monhost, logfn, interval);
|
monhost, logfn, interval);
|
||||||
|
|
||||||
if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) {
|
if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) {
|
||||||
|
@ -497,7 +470,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_connect(&ups, hostname, port, UPSCLI_CONN_TRYSSL) < 0)
|
if (upscli_connect(&ups, hostname, port, UPSCLI_CONN_TRYSSL) < 0)
|
||||||
fprintf(stderr, "Warning: initial connect failed: %s\n",
|
fprintf(stderr, "Warning: initial connect failed: %s\n",
|
||||||
upscli_strerror(&ups));
|
upscli_strerror(&ups));
|
||||||
|
|
||||||
if (strcmp(logfn, "-") == 0)
|
if (strcmp(logfn, "-") == 0)
|
||||||
|
@ -511,19 +484,10 @@ int main(int argc, char **argv)
|
||||||
/* now drop root if we have it */
|
/* now drop root if we have it */
|
||||||
new_uid = get_user_pwent(user);
|
new_uid = get_user_pwent(user);
|
||||||
|
|
||||||
open_syslog(prog);
|
open_syslog(prog);
|
||||||
|
|
||||||
if (foreground < 0) {
|
if (logfile != stdout)
|
||||||
if (logfile == stdout) {
|
|
||||||
foreground = 1;
|
|
||||||
} else {
|
|
||||||
foreground = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!foreground) {
|
|
||||||
background();
|
background();
|
||||||
}
|
|
||||||
|
|
||||||
setup_signals();
|
setup_signals();
|
||||||
|
|
||||||
|
@ -538,7 +502,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (nextpoll > now) {
|
if (nextpoll > now) {
|
||||||
/* there is still time left, so sleep it off */
|
/* there is still time left, so sleep it off */
|
||||||
sleep((unsigned int)(difftime(nextpoll, now)));
|
sleep(difftime(nextpoll, now));
|
||||||
nextpoll += interval;
|
nextpoll += interval;
|
||||||
} else {
|
} else {
|
||||||
/* we spent more time in polling than the interval allows */
|
/* we spent more time in polling than the interval allows */
|
||||||
|
@ -546,7 +510,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reopen_flag) {
|
if (reopen_flag) {
|
||||||
upslogx(LOG_INFO, "Signal %d: reopening log file",
|
upslogx(LOG_INFO, "Signal %d: reopening log file",
|
||||||
reopen_flag);
|
reopen_flag);
|
||||||
reopen_log();
|
reopen_log();
|
||||||
reopen_flag = 0;
|
reopen_flag = 0;
|
||||||
|
@ -571,7 +535,7 @@ int main(int argc, char **argv)
|
||||||
fclose(logfile);
|
fclose(logfile);
|
||||||
|
|
||||||
upscli_disconnect(&ups);
|
upscli_disconnect(&ups);
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
/* upslog.h - table of functions for handling various logging functions */
|
/* upslog.h - table of functions for handling various logging functions */
|
||||||
|
|
||||||
#ifndef NUT_UPSLOG_H_SEEN
|
|
||||||
#define NUT_UPSLOG_H_SEEN 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -23,10 +20,7 @@ static void do_time(const char *arg);
|
||||||
static void do_var(const char *arg);
|
static void do_var(const char *arg);
|
||||||
static void do_etime(const char *arg);
|
static void do_etime(const char *arg);
|
||||||
|
|
||||||
/* This is only used in upslog.c, but refers to routines declared here...
|
struct {
|
||||||
* To move or not to move?..
|
|
||||||
*/
|
|
||||||
static struct {
|
|
||||||
const char *name;
|
const char *name;
|
||||||
void (*func)(const char *arg);
|
void (*func)(const char *arg);
|
||||||
} logcmds[] =
|
} logcmds[] =
|
||||||
|
@ -37,7 +31,7 @@ static struct {
|
||||||
{ "TIME", do_time },
|
{ "TIME", do_time },
|
||||||
{ "VAR", do_var },
|
{ "VAR", do_var },
|
||||||
{ "ETIME", do_etime },
|
{ "ETIME", do_etime },
|
||||||
{ NULL, (void(*)(const char*))(NULL) }
|
{ NULL, (void(*)())(NULL) }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -46,4 +40,3 @@ static struct {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_UPSLOG_H_SEEN */
|
|
||||||
|
|
581
clients/upsmon.c
581
clients/upsmon.c
File diff suppressed because it is too large
Load diff
|
@ -17,23 +17,18 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NUT_UPSMON_H_SEEN
|
|
||||||
#define NUT_UPSMON_H_SEEN 1
|
|
||||||
|
|
||||||
/* flags for ups->status */
|
/* flags for ups->status */
|
||||||
|
|
||||||
#define ST_ONLINE (1 << 0) /* UPS is on line (OL) */
|
#define ST_ONLINE (1 << 0) /* UPS is on line (OL) */
|
||||||
#define ST_ONBATT (1 << 1) /* UPS is on battery (OB) */
|
#define ST_ONBATT (1 << 1) /* UPS is on battery (OB) */
|
||||||
#define ST_LOWBATT (1 << 2) /* UPS has a low battery (LB) */
|
#define ST_LOWBATT (1 << 2) /* UPS has a low battery (LB) */
|
||||||
#define ST_FSD (1 << 3) /* primary has set forced shutdown flag */
|
#define ST_FSD (1 << 3) /* master has set forced shutdown flag */
|
||||||
#define ST_PRIMARY (1 << 4) /* we are the primary (manager) of this UPS */
|
#define ST_MASTER (1 << 4) /* we are the master on this UPS */
|
||||||
#define ST_MASTER ST_PRIMARY /* legacy alias */
|
#define ST_LOGIN (1 << 5) /* we are logged into this UPS */
|
||||||
#define ST_LOGIN (1 << 5) /* we are logged into this UPS */
|
#define ST_CONNECTED (1 << 6) /* upscli_connect returned OK */
|
||||||
#define ST_CONNECTED (1 << 6) /* upscli_connect returned OK */
|
|
||||||
#define ST_CAL (1 << 7) /* UPS calibration in progress (CAL) */
|
|
||||||
|
|
||||||
/* required contents of flag file */
|
/* required contents of flag file */
|
||||||
#define SDMAGIC "upsmon-shutdown-file"
|
#define SDMAGIC "upsmon-shutdown-file"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
@ -49,9 +44,9 @@ typedef struct {
|
||||||
char *sys; /* raw system name from .conf */
|
char *sys; /* raw system name from .conf */
|
||||||
char *upsname; /* just upsname */
|
char *upsname; /* just upsname */
|
||||||
char *hostname; /* just hostname */
|
char *hostname; /* just hostname */
|
||||||
uint16_t port; /* just the port */
|
int port; /* just the port */
|
||||||
|
|
||||||
unsigned int pv; /* power value from conf */
|
int pv; /* power value from conf */
|
||||||
char *un; /* username (optional for now) */
|
char *un; /* username (optional for now) */
|
||||||
char *pw; /* password from conf */
|
char *pw; /* password from conf */
|
||||||
int status; /* status (see flags above) */
|
int status; /* status (see flags above) */
|
||||||
|
@ -70,17 +65,16 @@ typedef struct {
|
||||||
|
|
||||||
/* notify identifiers */
|
/* notify identifiers */
|
||||||
|
|
||||||
#define NOTIFY_ONLINE 0 /* UPS went on-line */
|
#define NOTIFY_ONLINE 0 /* UPS went on-line */
|
||||||
#define NOTIFY_ONBATT 1 /* UPS went on battery */
|
#define NOTIFY_ONBATT 1 /* UPS went on battery */
|
||||||
#define NOTIFY_LOWBATT 2 /* UPS went to low battery */
|
#define NOTIFY_LOWBATT 2 /* UPS went to low battery */
|
||||||
#define NOTIFY_FSD 3 /* Primary upsmon set FSD flag */
|
#define NOTIFY_FSD 3 /* Master upsmon set FSD flag */
|
||||||
#define NOTIFY_COMMOK 4 /* Communication established */
|
#define NOTIFY_COMMOK 4 /* Communication established */
|
||||||
#define NOTIFY_COMMBAD 5 /* Communication lost */
|
#define NOTIFY_COMMBAD 5 /* Communication lost */
|
||||||
#define NOTIFY_SHUTDOWN 6 /* System shutdown in progress */
|
#define NOTIFY_SHUTDOWN 6 /* System shutdown in progress */
|
||||||
#define NOTIFY_REPLBATT 7 /* UPS battery needs to be replaced */
|
#define NOTIFY_REPLBATT 7 /* UPS battery needs to be replaced */
|
||||||
#define NOTIFY_NOCOMM 8 /* UPS hasn't been contacted in a while */
|
#define NOTIFY_NOCOMM 8 /* UPS hasn't been contacted in awhile */
|
||||||
#define NOTIFY_NOPARENT 9 /* privileged parent process died */
|
#define NOTIFY_NOPARENT 9 /* privileged parent process died */
|
||||||
#define NOTIFY_CAL 10 /* UPS is performing calibration */
|
|
||||||
|
|
||||||
/* notify flag values */
|
/* notify flag values */
|
||||||
|
|
||||||
|
@ -92,10 +86,7 @@ typedef struct {
|
||||||
/* flags are set to NOTIFY_SYSLOG | NOTIFY_WALL at program init */
|
/* flags are set to NOTIFY_SYSLOG | NOTIFY_WALL at program init */
|
||||||
/* the user can override with NOTIFYFLAGS in the upsmon.conf */
|
/* the user can override with NOTIFYFLAGS in the upsmon.conf */
|
||||||
|
|
||||||
/* This is only used in upsmon.c, but might it also have external consumers?..
|
struct {
|
||||||
* To move or not to move?..
|
|
||||||
*/
|
|
||||||
static struct {
|
|
||||||
int type;
|
int type;
|
||||||
const char *name;
|
const char *name;
|
||||||
char *msg; /* NULL until overridden */
|
char *msg; /* NULL until overridden */
|
||||||
|
@ -113,7 +104,6 @@ static struct {
|
||||||
{ NOTIFY_REPLBATT, "REPLBATT", NULL, "UPS %s battery needs to be replaced", NOTIFY_SYSLOG | NOTIFY_WALL },
|
{ NOTIFY_REPLBATT, "REPLBATT", NULL, "UPS %s battery needs to be replaced", NOTIFY_SYSLOG | NOTIFY_WALL },
|
||||||
{ NOTIFY_NOCOMM, "NOCOMM", NULL, "UPS %s is unavailable", NOTIFY_SYSLOG | NOTIFY_WALL },
|
{ NOTIFY_NOCOMM, "NOCOMM", NULL, "UPS %s is unavailable", NOTIFY_SYSLOG | NOTIFY_WALL },
|
||||||
{ NOTIFY_NOPARENT, "NOPARENT", NULL, "upsmon parent process died - shutdown impossible", NOTIFY_SYSLOG | NOTIFY_WALL },
|
{ NOTIFY_NOPARENT, "NOPARENT", NULL, "upsmon parent process died - shutdown impossible", NOTIFY_SYSLOG | NOTIFY_WALL },
|
||||||
{ NOTIFY_CAL, "CAL", NULL, "UPS %s: calibration in progress", NOTIFY_SYSLOG },
|
|
||||||
{ 0, NULL, NULL, NULL, 0 }
|
{ 0, NULL, NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,5 +122,3 @@ static struct {
|
||||||
}
|
}
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_UPSMON_H_SEEN */
|
|
||||||
|
|
225
clients/upsrw.c
225
clients/upsrw.c
|
@ -1,8 +1,6 @@
|
||||||
/* upsrw - simple client for read/write variable access (formerly upsct2)
|
/* upsrw - simple client for read/write variable access (formerly upsct2)
|
||||||
|
|
||||||
Copyright (C)
|
Copyright (C) 1999 Russell Kroll <rkroll@exploits.org>
|
||||||
1999 Russell Kroll <rkroll@exploits.org>
|
|
||||||
2019 EATON (author: Arnaud Quette <ArnaudQuette@eaton.com>)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -27,14 +25,10 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
#include "extstate.h"
|
|
||||||
|
|
||||||
static char *upsname = NULL, *hostname = NULL;
|
static char *upsname = NULL, *hostname = NULL;
|
||||||
static UPSCONN_t *ups = NULL;
|
static UPSCONN_t *ups = NULL;
|
||||||
static int tracking_enabled = 0;
|
|
||||||
static unsigned int timeout = DEFAULT_TRACKING_TIMEOUT;
|
|
||||||
|
|
||||||
struct list_t {
|
struct list_t {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -45,22 +39,18 @@ static void usage(const char *prog)
|
||||||
{
|
{
|
||||||
printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION);
|
printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION);
|
||||||
printf("usage: %s [-h]\n", prog);
|
printf("usage: %s [-h]\n", prog);
|
||||||
printf(" %s [-s <variable>] [-u <username>] [-p <password>] [-w] [-t <timeout>] <ups>\n\n", prog);
|
printf(" %s [-s <variable>] [-u <username>] [-p <password>] <ups>\n\n", prog);
|
||||||
printf("Demo program to set variables within UPS hardware.\n");
|
printf("Demo program to set variables within UPS hardware.\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" -h display this help text\n");
|
printf(" -h display this help text\n");
|
||||||
printf(" -s <variable> specify variable to be changed\n");
|
printf(" -s <variable> specify variable to be changed\n");
|
||||||
printf(" use -s VAR=VALUE to avoid prompting for value\n");
|
printf(" use -s VAR=VALUE to avoid prompting for value\n");
|
||||||
printf(" -l show all possible read/write variables.\n");
|
|
||||||
printf(" -u <username> set username for command authentication\n");
|
printf(" -u <username> set username for command authentication\n");
|
||||||
printf(" -p <password> set password for command authentication\n");
|
printf(" -p <password> set password for command authentication\n");
|
||||||
printf(" -w wait for the completion of setting by the driver\n");
|
|
||||||
printf(" and return its actual result from the device\n");
|
|
||||||
printf(" -t <timeout> set a timeout when using -w (in seconds, default: %u)\n", DEFAULT_TRACKING_TIMEOUT);
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Call without -s to show all possible read/write variables (same as -l).\n");
|
printf("Call without -s to show all possible read/write variables.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clean_exit(void)
|
static void clean_exit(void)
|
||||||
|
@ -74,21 +64,9 @@ static void clean_exit(void)
|
||||||
free(ups);
|
free(ups);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC)
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC)
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
static void do_set(const char *varname, const char *newval)
|
static void do_set(const char *varname, const char *newval)
|
||||||
{
|
{
|
||||||
int cmd_complete = 0;
|
|
||||||
char buf[SMALLBUF], enc[SMALLBUF];
|
char buf[SMALLBUF], enc[SMALLBUF];
|
||||||
char tracking_id[UUID4_LEN];
|
|
||||||
time_t start, now;
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc)));
|
snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc)));
|
||||||
|
|
||||||
|
@ -100,92 +78,17 @@ static void do_set(const char *varname, const char *newval)
|
||||||
fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* verify answer */
|
/* FUTURE: status cookies will tie in here */
|
||||||
if (strncmp(buf, "OK", 2) != 0) {
|
if (strncmp(buf, "OK", 2) != 0) {
|
||||||
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for status tracking id */
|
|
||||||
if (
|
|
||||||
!tracking_enabled ||
|
|
||||||
/* sanity check on the size: "OK TRACKING " + UUID4_LEN */
|
|
||||||
strlen(buf) != (UUID4_LEN - 1 + strlen("OK TRACKING "))
|
|
||||||
) {
|
|
||||||
/* reply as usual */
|
|
||||||
fprintf(stderr, "%s\n", buf);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
|
||||||
#endif
|
|
||||||
/* From the check above, we know that we have exactly UUID4_LEN chars
|
|
||||||
* (aka sizeof(tracking_id)) in the buf after "OK TRACKING " prefix,
|
|
||||||
* plus the null-byte.
|
|
||||||
*/
|
|
||||||
assert (UUID4_LEN == 1 + snprintf(tracking_id, sizeof(tracking_id), "%s", buf + strlen("OK TRACKING ")));
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
time(&start);
|
|
||||||
|
|
||||||
/* send status tracking request, looping if status is PENDING */
|
|
||||||
while (!cmd_complete) {
|
|
||||||
|
|
||||||
/* check for timeout */
|
|
||||||
time(&now);
|
|
||||||
if (difftime(now, start) >= timeout)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't receive status tracking information: timeout");
|
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "GET TRACKING %s\n", tracking_id);
|
|
||||||
|
|
||||||
if (upscli_sendline(ups, buf, strlen(buf)) < 0)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't send status tracking request: %s", upscli_strerror(ups));
|
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) )
|
|
||||||
/* Note for gating macros above: unsuffixed HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP
|
|
||||||
* means support of contexts both inside and outside function body, so the push
|
|
||||||
* above and pop below (outside this finction) are not used.
|
|
||||||
*/
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS
|
|
||||||
/* Note that the individual warning pragmas for use inside function bodies
|
|
||||||
* are named without a _INSIDEFUNC suffix, for simplicity and legacy reasons
|
|
||||||
*/
|
|
||||||
# pragma GCC diagnostic ignored "-Wtype-limits"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE
|
|
||||||
# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
|
||||||
#endif
|
|
||||||
/* and get status tracking reply */
|
|
||||||
assert(timeout < LONG_MAX);
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (upscli_readline_timeout(ups, buf, sizeof(buf), (long)timeout) < 0)
|
|
||||||
fatalx(EXIT_FAILURE, "Can't receive status tracking information: %s", upscli_strerror(ups));
|
|
||||||
|
|
||||||
if (strncmp(buf, "PENDING", 7))
|
|
||||||
cmd_complete = 1;
|
|
||||||
else
|
|
||||||
/* wait a second before retrying */
|
|
||||||
sleep(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", buf);
|
fprintf(stderr, "%s\n", buf);
|
||||||
}
|
}
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void do_setvar(const char *varname, char *uin, const char *pass)
|
static void do_setvar(const char *varname, char *uin, const char *pass)
|
||||||
{
|
{
|
||||||
char newval[SMALLBUF], temp[SMALLBUF * 2], user[SMALLBUF], *ptr;
|
char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
if (uin) {
|
if (uin) {
|
||||||
|
@ -274,32 +177,13 @@ static void do_setvar(const char *varname, char *uin, const char *pass)
|
||||||
fatalx(EXIT_FAILURE, "Error: old variable names are not supported");
|
fatalx(EXIT_FAILURE, "Error: old variable names are not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable status tracking ID */
|
|
||||||
if (tracking_enabled) {
|
|
||||||
|
|
||||||
snprintf(temp, sizeof(temp), "SET TRACKING ON\n");
|
|
||||||
|
|
||||||
if (upscli_sendline(ups, temp, strlen(temp)) < 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Can't enable set variable status tracking: %s", upscli_strerror(ups));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (upscli_readline(ups, temp, sizeof(temp)) < 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Enabling set variable status tracking failed: %s", upscli_strerror(ups));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Verify the result */
|
|
||||||
if (strncmp(temp, "OK", 2) != 0) {
|
|
||||||
fatalx(EXIT_FAILURE, "Enabling set variable status tracking failed. upsd answered: %s", temp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
do_set(varname, newval);
|
do_set(varname, newval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *get_data(const char *type, const char *varname)
|
static const char *get_data(const char *type, const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
|
@ -319,7 +203,7 @@ static const char *get_data(const char *type, const char *varname)
|
||||||
return answer[3];
|
return answer[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_string(const char *varname, const long len)
|
static void do_string(const char *varname, const int len)
|
||||||
{
|
{
|
||||||
const char *val;
|
const char *val;
|
||||||
|
|
||||||
|
@ -330,34 +214,14 @@ static void do_string(const char *varname, const long len)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Type: STRING\n");
|
printf("Type: STRING\n");
|
||||||
printf("Maximum length: %ld\n", len);
|
printf("Maximum length: %d\n", len);
|
||||||
printf("Value: %s\n", val);
|
printf("Value: %s\n", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_number(const char *varname)
|
static void do_enum(const char *varname)
|
||||||
{
|
|
||||||
const char *val;
|
|
||||||
|
|
||||||
val = get_data("VAR", varname);
|
|
||||||
|
|
||||||
if (!val) {
|
|
||||||
fatalx(EXIT_FAILURE, "do_number: can't get current value of %s", varname);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Type: NUMBER\n");
|
|
||||||
printf("Value: %s\n", val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display ENUM information
|
|
||||||
* @param varname the name of the NUT variable
|
|
||||||
* @param vartype the type of the NUT variable (ST_FLAG_STRING, ST_FLAG_NUMBER
|
|
||||||
* @param len the length of the NUT variable, if type == ST_FLAG_STRING
|
|
||||||
*/
|
|
||||||
static void do_enum(const char *varname, const int vartype, const long len)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer, buf[SMALLBUF];
|
char **answer, buf[SMALLBUF];
|
||||||
const char *query[4], *val;
|
const char *query[4], *val;
|
||||||
|
|
||||||
|
@ -383,21 +247,14 @@ static void do_enum(const char *varname, const int vartype, const long len)
|
||||||
|
|
||||||
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
||||||
|
|
||||||
/* Fallback for older upsd versions */
|
printf("Type: ENUM\n");
|
||||||
if (vartype != ST_FLAG_NONE)
|
|
||||||
printf("Type: ENUM %s\n", (vartype == ST_FLAG_STRING)?"STRING":"NUMBER");
|
|
||||||
else
|
|
||||||
printf("Type: ENUM\n");
|
|
||||||
|
|
||||||
if (vartype == ST_FLAG_STRING)
|
|
||||||
printf("Maximum length: %ld\n", len);
|
|
||||||
|
|
||||||
while (ret == 1) {
|
while (ret == 1) {
|
||||||
|
|
||||||
/* ENUM <upsname> <varname> <value> */
|
/* ENUM <upsname> <varname> <value> */
|
||||||
|
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Option: \"%s\"", answer[3]);
|
printf("Option: \"%s\"", answer[3]);
|
||||||
|
@ -415,7 +272,7 @@ static void do_enum(const char *varname, const int vartype, const long len)
|
||||||
static void do_range(const char *varname)
|
static void do_range(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4], *val;
|
const char *query[4], *val;
|
||||||
int ival, min, max;
|
int ival, min, max;
|
||||||
|
@ -442,15 +299,14 @@ static void do_range(const char *varname)
|
||||||
|
|
||||||
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
||||||
|
|
||||||
/* Ranges implies a type "NUMBER" */
|
printf("Type: RANGE\n");
|
||||||
printf("Type: RANGE NUMBER\n");
|
|
||||||
|
|
||||||
while (ret == 1) {
|
while (ret == 1) {
|
||||||
|
|
||||||
/* RANGE <upsname> <varname> <min> <max> */
|
/* RANGE <upsname> <varname> <min> <max> */
|
||||||
|
|
||||||
if (numa < 5) {
|
if (numa < 5) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
min = atoi(answer[3]);
|
min = atoi(answer[3]);
|
||||||
|
@ -471,8 +327,7 @@ static void do_range(const char *varname)
|
||||||
static void do_type(const char *varname)
|
static void do_type(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int is_enum = 0; /* 1 if ENUM; FIXME: add a boolean type in common.h */
|
unsigned int i, numq, numa;
|
||||||
size_t i, numq, numa;
|
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
|
@ -484,18 +339,16 @@ static void do_type(const char *varname)
|
||||||
ret = upscli_get(ups, numq, query, &numa, &answer);
|
ret = upscli_get(ups, numq, query, &numa, &answer);
|
||||||
|
|
||||||
if ((ret < 0) || (numa < numq)) {
|
if ((ret < 0) || (numa < numq)) {
|
||||||
printf("Unknown type\n");
|
printf("Unknown type\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TYPE <upsname> <varname> <type>... */
|
/* TYPE <upsname> <varname> <type>... */
|
||||||
for (i = 3; i < numa; i++) {
|
for (i = 3; i < numa; i++) {
|
||||||
|
|
||||||
/* ENUM can be NUMBER or STRING
|
|
||||||
* just flag it for latter processing */
|
|
||||||
if (!strcasecmp(answer[i], "ENUM")) {
|
if (!strcasecmp(answer[i], "ENUM")) {
|
||||||
is_enum = 1;
|
do_enum(varname);
|
||||||
continue;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcasecmp(answer[i], "RANGE")) {
|
if (!strcasecmp(answer[i], "RANGE")) {
|
||||||
|
@ -506,21 +359,15 @@ static void do_type(const char *varname)
|
||||||
if (!strncasecmp(answer[i], "STRING:", 7)) {
|
if (!strncasecmp(answer[i], "STRING:", 7)) {
|
||||||
|
|
||||||
char *len = answer[i] + 7;
|
char *len = answer[i] + 7;
|
||||||
long length = strtol(len, NULL, 10);
|
int length = strtol(len, NULL, 10);
|
||||||
|
|
||||||
if (is_enum == 1)
|
do_string(varname, length);
|
||||||
do_enum(varname, ST_FLAG_STRING, length);
|
|
||||||
else
|
|
||||||
do_string(varname, length);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcasecmp(answer[i], "NUMBER")) {
|
if (!strcasecmp(answer[i], "NUMBER")) {
|
||||||
if (is_enum == 1)
|
printf("Type: NUMBER\n");
|
||||||
do_enum(varname, ST_FLAG_NUMBER, 0);
|
|
||||||
else
|
|
||||||
do_number(varname);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,10 +378,6 @@ static void do_type(const char *varname)
|
||||||
|
|
||||||
printf("Type: %s (unrecognized)\n", answer[i]);
|
printf("Type: %s (unrecognized)\n", answer[i]);
|
||||||
}
|
}
|
||||||
/* Fallback for older upsd versions, where STRING|NUMBER is not
|
|
||||||
* appended to ENUM */
|
|
||||||
if (is_enum == 1)
|
|
||||||
do_enum(varname, ST_FLAG_NONE, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_rw(const char *varname)
|
static void print_rw(const char *varname)
|
||||||
|
@ -559,7 +402,7 @@ static void print_rw(const char *varname)
|
||||||
static void print_rwlist(void)
|
static void print_rwlist(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[2];
|
const char *query[2];
|
||||||
char **answer;
|
char **answer;
|
||||||
struct list_t *lhead, *llast, *ltmp, *lnext;
|
struct list_t *lhead, *llast, *ltmp, *lnext;
|
||||||
|
@ -593,7 +436,7 @@ static void print_rwlist(void)
|
||||||
|
|
||||||
/* RW <upsname> <varname> <value> */
|
/* RW <upsname> <varname> <value> */
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa);
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sock this entry away for later */
|
/* sock this entry away for later */
|
||||||
|
@ -630,36 +473,22 @@ static void print_rwlist(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i, port;
|
||||||
uint16_t port;
|
|
||||||
const char *prog = xbasename(argv[0]);
|
const char *prog = xbasename(argv[0]);
|
||||||
char *password = NULL, *username = NULL, *setvar = NULL;
|
char *password = NULL, *username = NULL, *setvar = NULL;
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+hls:p:t:u:wV")) != -1) {
|
while ((i = getopt(argc, argv, "+hs:p:u:V")) != -1) {
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 's':
|
case 's':
|
||||||
setvar = optarg;
|
setvar = optarg;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
|
||||||
if (setvar) {
|
|
||||||
upslogx(LOG_WARNING, "Listing mode requested, overriding setvar specified earlier!");
|
|
||||||
setvar = NULL;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'p':
|
case 'p':
|
||||||
password = optarg;
|
password = optarg;
|
||||||
break;
|
break;
|
||||||
case 't':
|
|
||||||
if (!str_to_uint(optarg, &timeout, 10))
|
|
||||||
fatal_with_errno(EXIT_FAILURE, "Could not convert the provided value for timeout ('-t' option) to unsigned int");
|
|
||||||
break;
|
|
||||||
case 'u':
|
case 'u':
|
||||||
username = optarg;
|
username = optarg;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
|
||||||
tracking_enabled = 1;
|
|
||||||
break;
|
|
||||||
case 'V':
|
case 'V':
|
||||||
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
|
@ -11,19 +11,8 @@
|
||||||
# from your AT lines.
|
# from your AT lines.
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
onbattwarn)
|
|
||||||
# Send a notification mail
|
|
||||||
echo "The UPS has been on battery for awhile" \
|
|
||||||
| mail -s"UPS monitor" bofh@pager.example.com
|
|
||||||
# Create a flag-file on the filesystem, for your own processing
|
|
||||||
/usr/bin/touch /some/path/ups-on-battery
|
|
||||||
;;
|
|
||||||
ups-back-on-power)
|
|
||||||
# Delete the flag-file on the filesystem
|
|
||||||
/bin/rm -f /some/path/ups-on-battery
|
|
||||||
;;
|
|
||||||
upsgone)
|
upsgone)
|
||||||
logger -t upssched-cmd "The communication with UPS has been gone for awhile"
|
logger -t upssched-cmd "The UPS has been gone for awhile"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
logger -t upssched-cmd "Unrecognized command: $1"
|
logger -t upssched-cmd "Unrecognized command: $1"
|
||||||
|
|
|
@ -46,12 +46,9 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include "upssched.h"
|
#include "upssched.h"
|
||||||
#include "timehead.h"
|
#include "timehead.h"
|
||||||
#include "nut_stdint.h"
|
|
||||||
|
|
||||||
typedef struct ttype_s {
|
typedef struct ttype_s {
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -59,13 +56,14 @@ typedef struct ttype_s {
|
||||||
struct ttype_s *next;
|
struct ttype_s *next;
|
||||||
} ttype_t;
|
} ttype_t;
|
||||||
|
|
||||||
static ttype_t *thead = NULL;
|
ttype_t *thead = NULL;
|
||||||
static conn_t *connhead = NULL;
|
static conn_t *connhead = NULL;
|
||||||
static char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL;
|
char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL;
|
||||||
static int verbose = 0; /* use for debugging */
|
int verbose = 0; /* use for debugging */
|
||||||
|
|
||||||
/* ups name and notify type (string) as received from upsmon */
|
|
||||||
static const char *upsname, *notify_type;
|
/* ups name and notify type (string) as received from upsmon */
|
||||||
|
const char *upsname, *notify_type;
|
||||||
|
|
||||||
#define PARENT_STARTED -2
|
#define PARENT_STARTED -2
|
||||||
#define PARENT_UNNECESSARY -3
|
#define PARENT_UNNECESSARY -3
|
||||||
|
@ -181,7 +179,7 @@ static void checktimers(void)
|
||||||
static void start_timer(const char *name, const char *ofsstr)
|
static void start_timer(const char *name, const char *ofsstr)
|
||||||
{
|
{
|
||||||
time_t now;
|
time_t now;
|
||||||
long ofs;
|
int ofs;
|
||||||
ttype_t *tmp, *last;
|
ttype_t *tmp, *last;
|
||||||
|
|
||||||
/* get the time */
|
/* get the time */
|
||||||
|
@ -196,7 +194,7 @@ static void start_timer(const char *name, const char *ofsstr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
upslogx(LOG_INFO, "New timer: %s (%ld seconds)", name, ofs);
|
upslogx(LOG_INFO, "New timer: %s (%d seconds)", name, ofs);
|
||||||
|
|
||||||
/* now add to the queue */
|
/* now add to the queue */
|
||||||
tmp = last = thead;
|
tmp = last = thead;
|
||||||
|
@ -242,7 +240,7 @@ static void cancel_timer(const char *name, const char *cname)
|
||||||
static void us_serialize(int op)
|
static void us_serialize(int op)
|
||||||
{
|
{
|
||||||
static int pipefd[2];
|
static int pipefd[2];
|
||||||
ssize_t ret;
|
int ret;
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
switch(op) {
|
switch(op) {
|
||||||
|
@ -272,7 +270,6 @@ static int open_sock(void)
|
||||||
int ret, fd;
|
int ret, fd;
|
||||||
struct sockaddr_un ssaddr;
|
struct sockaddr_un ssaddr;
|
||||||
|
|
||||||
check_unix_socket_filename(pipefn);
|
|
||||||
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
@ -300,9 +297,6 @@ static int open_sock(void)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
fatal_with_errno(EXIT_FAILURE, "listen(%d, %d) failed", fd, US_LISTEN_BACKLOG);
|
fatal_with_errno(EXIT_FAILURE, "listen(%d, %d) failed", fd, US_LISTEN_BACKLOG);
|
||||||
|
|
||||||
/* don't leak socket to CMDSCRIPT */
|
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,40 +329,17 @@ static void conn_del(conn_t *target)
|
||||||
|
|
||||||
static int send_to_one(conn_t *conn, const char *fmt, ...)
|
static int send_to_one(conn_t *conn, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
int ret;
|
||||||
size_t buflen;
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char buf[US_SOCK_BUF_LEN];
|
char buf[US_SOCK_BUF_LEN];
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
buflen = strlen(buf);
|
ret = write(conn->fd, buf, strlen(buf));
|
||||||
if (buflen >= SSIZE_MAX) {
|
|
||||||
/* Can't compare buflen to ret */
|
|
||||||
upsdebugx(2, "send_to_one(): buffered message too large");
|
|
||||||
|
|
||||||
close(conn->fd);
|
if ((ret < 1) || (ret != (int) strlen(buf))) {
|
||||||
conn_del(conn);
|
|
||||||
|
|
||||||
return 0; /* failed */
|
|
||||||
}
|
|
||||||
ret = write(conn->fd, buf, buflen);
|
|
||||||
|
|
||||||
if ((ret < 1) || (ret != (ssize_t) buflen)) {
|
|
||||||
upsdebugx(2, "write to fd %d failed", conn->fd);
|
upsdebugx(2, "write to fd %d failed", conn->fd);
|
||||||
|
|
||||||
close(conn->fd);
|
close(conn->fd);
|
||||||
|
@ -385,7 +356,7 @@ static void conn_add(int sockfd)
|
||||||
int acc, ret;
|
int acc, ret;
|
||||||
conn_t *tmp, *last;
|
conn_t *tmp, *last;
|
||||||
struct sockaddr_un saddr;
|
struct sockaddr_un saddr;
|
||||||
#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED)
|
#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED)
|
||||||
int salen;
|
int salen;
|
||||||
#else
|
#else
|
||||||
socklen_t salen;
|
socklen_t salen;
|
||||||
|
@ -399,9 +370,6 @@ static void conn_add(int sockfd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't leak connection to CMDSCRIPT */
|
|
||||||
fcntl(acc, F_SETFD, FD_CLOEXEC);
|
|
||||||
|
|
||||||
/* enable nonblocking I/O */
|
/* enable nonblocking I/O */
|
||||||
|
|
||||||
ret = fcntl(acc, F_GETFL, 0);
|
ret = fcntl(acc, F_GETFL, 0);
|
||||||
|
@ -472,20 +440,19 @@ static int sock_arg(conn_t *conn)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void log_unknown(size_t numarg, char **arg)
|
static void log_unknown(int numarg, char **arg)
|
||||||
{
|
{
|
||||||
size_t i;
|
int i;
|
||||||
|
|
||||||
upslogx(LOG_INFO, "Unknown command on socket: ");
|
upslogx(LOG_INFO, "Unknown command on socket: ");
|
||||||
|
|
||||||
for (i = 0; i < numarg; i++)
|
for (i = 0; i < numarg; i++)
|
||||||
upslogx(LOG_INFO, "arg %zu: %s", i, arg[i]);
|
upslogx(LOG_INFO, "arg %d: %s", i, arg[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sock_read(conn_t *conn)
|
static int sock_read(conn_t *conn)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ret;
|
||||||
ssize_t ret;
|
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
for (i = 0; i < US_MAX_READ; i++) {
|
for (i = 0; i < US_MAX_READ; i++) {
|
||||||
|
@ -498,19 +465,13 @@ static int sock_read(conn_t *conn)
|
||||||
if ((ret == -1) && (errno == EAGAIN))
|
if ((ret == -1) && (errno == EAGAIN))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* O_NDELAY with zero bytes means nothing to read but
|
|
||||||
* since read() follows a succesful select() with
|
|
||||||
* ready file descriptor, ret shouldn't be 0. */
|
|
||||||
if (ret == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* some other problem */
|
/* some other problem */
|
||||||
return -1; /* error */
|
return -1; /* error */
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pconf_char(&conn->ctx, ch);
|
ret = pconf_char(&conn->ctx, ch);
|
||||||
|
|
||||||
if (ret == 0) /* nothing to parse yet */
|
if (ret == 0) /* nothing to parse yet */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
|
@ -633,8 +594,6 @@ static int try_connect(void)
|
||||||
int pipefd, ret;
|
int pipefd, ret;
|
||||||
struct sockaddr_un saddr;
|
struct sockaddr_un saddr;
|
||||||
|
|
||||||
check_unix_socket_filename(pipefn);
|
|
||||||
|
|
||||||
memset(&saddr, '\0', sizeof(saddr));
|
memset(&saddr, '\0', sizeof(saddr));
|
||||||
saddr.sun_family = AF_UNIX;
|
saddr.sun_family = AF_UNIX;
|
||||||
snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s", pipefn);
|
snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s", pipefn);
|
||||||
|
@ -700,15 +659,28 @@ static int check_parent(const char *cmd, const char *arg2)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void read_timeout(int sig)
|
||||||
|
{
|
||||||
|
/* ignore this */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setup_sigalrm(void)
|
||||||
|
{
|
||||||
|
struct sigaction sa;
|
||||||
|
sigset_t nut_upssched_sigmask;
|
||||||
|
|
||||||
|
sigemptyset(&nut_upssched_sigmask);
|
||||||
|
sa.sa_mask = nut_upssched_sigmask;
|
||||||
|
sa.sa_flags = 0;
|
||||||
|
sa.sa_handler = read_timeout;
|
||||||
|
sigaction(SIGALRM, &sa, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
||||||
{
|
{
|
||||||
int i, pipefd;
|
int i, pipefd, ret;
|
||||||
ssize_t ret;
|
char buf[SMALLBUF], enc[SMALLBUF];
|
||||||
size_t enclen, buflen;
|
|
||||||
char buf[SMALLBUF], enc[SMALLBUF + 8];
|
|
||||||
int ret_s;
|
|
||||||
struct timeval tv;
|
|
||||||
fd_set fdread;
|
|
||||||
|
|
||||||
/* insanity */
|
/* insanity */
|
||||||
if (!arg1)
|
if (!arg1)
|
||||||
|
@ -724,14 +696,6 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
||||||
|
|
||||||
snprintf(enc, sizeof(enc), "%s\n", buf);
|
snprintf(enc, sizeof(enc), "%s\n", buf);
|
||||||
|
|
||||||
/* Sanity checks, for static analyzers to sleep well */
|
|
||||||
enclen = strlen(enc);
|
|
||||||
buflen = strlen(buf);
|
|
||||||
if (enclen >= SSIZE_MAX || buflen >= SSIZE_MAX) {
|
|
||||||
/* Can't compare enclen to ret below */
|
|
||||||
fatalx(EXIT_FAILURE, "Unable to connect to daemon: buffered message too large");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* see if the parent needs to be started (and maybe start it) */
|
/* see if the parent needs to be started (and maybe start it) */
|
||||||
|
|
||||||
for (i = 0; i < MAX_TRIES; i++) {
|
for (i = 0; i < MAX_TRIES; i++) {
|
||||||
|
@ -739,6 +703,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
||||||
pipefd = check_parent(cmd, arg2);
|
pipefd = check_parent(cmd, arg2);
|
||||||
|
|
||||||
if (pipefd == PARENT_STARTED) {
|
if (pipefd == PARENT_STARTED) {
|
||||||
|
|
||||||
/* loop back and try to connect now */
|
/* loop back and try to connect now */
|
||||||
usleep(250000);
|
usleep(250000);
|
||||||
continue;
|
continue;
|
||||||
|
@ -750,41 +715,23 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
||||||
|
|
||||||
/* we're connected now */
|
/* we're connected now */
|
||||||
|
|
||||||
ret = write(pipefd, enc, enclen);
|
ret = write(pipefd, enc, strlen(enc));
|
||||||
|
|
||||||
/* if we can't send the whole thing, loop back and try again */
|
/* if we can't send the whole thing, loop back and try again */
|
||||||
if ((ret < 1) || (ret != (ssize_t)enclen)) {
|
if ((ret < 1) || (ret != (int) strlen(enc))) {
|
||||||
upslogx(LOG_ERR, "write failed, trying again");
|
upslogx(LOG_ERR, "write failed, trying again");
|
||||||
close(pipefd);
|
close(pipefd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* select on child's pipe fd */
|
/* ugh - probably should use select here... */
|
||||||
do {
|
setup_sigalrm();
|
||||||
/* set timeout every time before call select() */
|
|
||||||
tv.tv_sec = 1;
|
|
||||||
tv.tv_usec = 0;
|
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
alarm(2);
|
||||||
FD_SET(pipefd, &fdread);
|
ret = read(pipefd, buf, sizeof(buf));
|
||||||
|
alarm(0);
|
||||||
|
|
||||||
ret_s = select(pipefd + 1, &fdread, NULL, NULL, &tv);
|
signal(SIGALRM, SIG_IGN);
|
||||||
switch(ret_s) {
|
|
||||||
/* select error */
|
|
||||||
case -1:
|
|
||||||
upslogx(LOG_DEBUG, "parent select error: %s", strerror(errno));
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* nothing to read */
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* available data to read */
|
|
||||||
default:
|
|
||||||
ret = read(pipefd, buf, sizeof(buf));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while (ret_s <= 0);
|
|
||||||
|
|
||||||
close(pipefd);
|
close(pipefd);
|
||||||
|
|
||||||
|
@ -800,7 +747,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
|
||||||
upslogx(LOG_ERR, "read confirmation got [%s]", buf);
|
upslogx(LOG_ERR, "read confirmation got [%s]", buf);
|
||||||
|
|
||||||
/* try again ... */
|
/* try again ... */
|
||||||
} /* loop until MAX_TRIES if no success above */
|
}
|
||||||
|
|
||||||
fatalx(EXIT_FAILURE, "Unable to connect to daemon and unable to start daemon");
|
fatalx(EXIT_FAILURE, "Unable to connect to daemon and unable to start daemon");
|
||||||
}
|
}
|
||||||
|
@ -847,7 +794,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(cmd, "EXECUTE")) {
|
if (!strcmp(cmd, "EXECUTE")) {
|
||||||
if (ca1[0] == '\0') {
|
if (ca1 == '\0') {
|
||||||
upslogx(LOG_ERR, "Empty EXECUTE command argument");
|
upslogx(LOG_ERR, "Empty EXECUTE command argument");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -862,7 +809,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd,
|
||||||
upslogx(LOG_ERR, "Invalid command: %s", cmd);
|
upslogx(LOG_ERR, "Invalid command: %s", cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int conf_arg(size_t numargs, char **arg)
|
static int conf_arg(int numargs, char **arg)
|
||||||
{
|
{
|
||||||
if (numargs < 2)
|
if (numargs < 2)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -953,15 +900,9 @@ static void checkconf(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *prog = NULL;
|
const char *prog = xbasename(argv[0]);
|
||||||
/* More a use for argc to avoid warnings than a real need: */
|
|
||||||
if (argc > 0) {
|
|
||||||
xbasename(argv[0]);
|
|
||||||
} else {
|
|
||||||
xbasename("upssched");
|
|
||||||
}
|
|
||||||
|
|
||||||
verbose = 1; /* TODO: remove when done testing, or add -D */
|
verbose = 1; /* TODO: remove when done testing */
|
||||||
|
|
||||||
/* normally we don't have stderr, so get this going to syslog early */
|
/* normally we don't have stderr, so get this going to syslog early */
|
||||||
open_syslog(prog);
|
open_syslog(prog);
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
/* upssched.h - supporting structures */
|
/* upssched.h - supporting structures */
|
||||||
|
|
||||||
#ifndef NUT_UPSSCHED_H_SEEN
|
|
||||||
#define NUT_UPSSCHED_H_SEEN 1
|
|
||||||
|
|
||||||
#include <parseconf.h>
|
#include <parseconf.h>
|
||||||
|
|
||||||
#define SERIALIZE_INIT 1
|
#define SERIALIZE_INIT 1
|
||||||
|
@ -28,4 +25,3 @@ typedef struct conn_s {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_UPSSCHED_H_SEEN */
|
|
||||||
|
|
118
clients/upsset.c
118
clients/upsset.c
|
@ -24,7 +24,6 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
#include "cgilib.h"
|
#include "cgilib.h"
|
||||||
#include "parseconf.h"
|
#include "parseconf.h"
|
||||||
|
@ -40,12 +39,12 @@ struct list_t {
|
||||||
#define HARD_UPSVAR_LIMIT_NUM 64
|
#define HARD_UPSVAR_LIMIT_NUM 64
|
||||||
#define HARD_UPSVAR_LIMIT_LEN 256
|
#define HARD_UPSVAR_LIMIT_LEN 256
|
||||||
|
|
||||||
static char *monups, *username, *password, *function, *upscommand;
|
char *monups, *username, *password, *function, *upscommand;
|
||||||
|
|
||||||
/* set once the MAGIC_ENABLE_STRING is found in the upsset.conf */
|
/* set once the MAGIC_ENABLE_STRING is found in the upsset.conf */
|
||||||
static int magic_string_set = 0;
|
int magic_string_set = 0;
|
||||||
|
|
||||||
static uint16_t port;
|
static int port;
|
||||||
static char *upsname, *hostname;
|
static char *upsname, *hostname;
|
||||||
static UPSCONN_t ups;
|
static UPSCONN_t ups;
|
||||||
|
|
||||||
|
@ -55,7 +54,7 @@ typedef struct {
|
||||||
void *next;
|
void *next;
|
||||||
} uvtype_t;
|
} uvtype_t;
|
||||||
|
|
||||||
static uvtype_t *firstuv = NULL;
|
uvtype_t *firstuv = NULL;
|
||||||
|
|
||||||
void parsearg(char *var, char *value)
|
void parsearg(char *var, char *value)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +134,7 @@ static void do_header(const char *title)
|
||||||
printf("<HTML>\n");
|
printf("<HTML>\n");
|
||||||
printf("<HEAD><TITLE>upsset: %s</TITLE></HEAD>\n", title);
|
printf("<HEAD><TITLE>upsset: %s</TITLE></HEAD>\n", title);
|
||||||
|
|
||||||
printf("<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000EE\" VLINK=\"#551A8B\">\n");
|
printf("<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000EE\" VLINK=\"#551A8B\">\n");
|
||||||
|
|
||||||
printf("<TABLE BGCOLOR=\"#50A0A0\" ALIGN=\"CENTER\">\n");
|
printf("<TABLE BGCOLOR=\"#50A0A0\" ALIGN=\"CENTER\">\n");
|
||||||
printf("<TR><TD>\n");
|
printf("<TR><TD>\n");
|
||||||
|
@ -145,7 +144,7 @@ static void start_table(void)
|
||||||
{
|
{
|
||||||
printf("<TABLE CELLPADDING=\"5\" CELLSPACING=\"0\" ALIGN=\"CENTER\" WIDTH=\"100%%\">\n");
|
printf("<TABLE CELLPADDING=\"5\" CELLSPACING=\"0\" ALIGN=\"CENTER\" WIDTH=\"100%%\">\n");
|
||||||
printf("<TR><TH COLSPAN=2 BGCOLOR=\"#60B0B0\">\n");
|
printf("<TR><TH COLSPAN=2 BGCOLOR=\"#60B0B0\">\n");
|
||||||
printf("<FONT SIZE=\"+2\">Network UPS Tools upsset %s</FONT>\n",
|
printf("<FONT SIZE=\"+2\">Network UPS Tools upsset %s</FONT>\n",
|
||||||
UPS_VERSION);
|
UPS_VERSION);
|
||||||
printf("</TH></TR>\n");
|
printf("</TH></TR>\n");
|
||||||
}
|
}
|
||||||
|
@ -159,12 +158,12 @@ static void do_hidden(const char *next)
|
||||||
password);
|
password);
|
||||||
|
|
||||||
if (next)
|
if (next)
|
||||||
printf("<INPUT TYPE=\"HIDDEN\" NAME=\"function\" VALUE=\"%s\">\n",
|
printf("<INPUT TYPE=\"HIDDEN\" NAME=\"function\" VALUE=\"%s\">\n",
|
||||||
next);
|
next);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* generate SELECT chooser from hosts.conf entries */
|
/* generate SELECT chooser from hosts.conf entries */
|
||||||
static void upslist_arg(size_t numargs, char **arg)
|
static void upslist_arg(int numargs, char **arg)
|
||||||
{
|
{
|
||||||
if (numargs < 3)
|
if (numargs < 3)
|
||||||
return;
|
return;
|
||||||
|
@ -223,7 +222,7 @@ static void do_pickups(const char *currfunc)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
upslist_arg(ctx.numargs, ctx.arglist);
|
upslist_arg(ctx.numargs, ctx.arglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
pconf_finish(&ctx);
|
pconf_finish(&ctx);
|
||||||
|
@ -254,10 +253,6 @@ static void do_pickups(const char *currfunc)
|
||||||
printf("</FORM>\n");
|
printf("</FORM>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void error_page(const char *next, const char *title,
|
|
||||||
const char *fmt, ...)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void error_page(const char *next, const char *title,
|
static void error_page(const char *next, const char *title,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -265,19 +260,7 @@ static void error_page(const char *next, const char *title,
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vsnprintf(msg, sizeof(msg), fmt, ap);
|
vsnprintf(msg, sizeof(msg), fmt, ap);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
do_header(title);
|
do_header(title);
|
||||||
|
@ -299,9 +282,6 @@ static void error_page(const char *next, const char *title,
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void loginscreen(void)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void loginscreen(void)
|
static void loginscreen(void)
|
||||||
{
|
{
|
||||||
do_header("Login");
|
do_header("Login");
|
||||||
|
@ -351,7 +331,7 @@ static void upsd_connect(void)
|
||||||
static void print_cmd(const char *cmd)
|
static void print_cmd(const char *cmd)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
|
@ -374,7 +354,7 @@ static void print_cmd(const char *cmd)
|
||||||
static void showcmds(void)
|
static void showcmds(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[2];
|
const char *query[2];
|
||||||
char **answer;
|
char **answer;
|
||||||
struct list_t *lhead, *llast, *ltmp, *lnext;
|
struct list_t *lhead, *llast, *ltmp, *lnext;
|
||||||
|
@ -411,7 +391,7 @@ static void showcmds(void)
|
||||||
/* CMD upsname cmdname */
|
/* CMD upsname cmdname */
|
||||||
if (numa < 3) {
|
if (numa < 3) {
|
||||||
fprintf(stderr, "Error: insufficient data "
|
fprintf(stderr, "Error: insufficient data "
|
||||||
"(got %zu args, need at least 3)\n", numa);
|
"(got %d args, need at least 3)\n", numa);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -486,7 +466,7 @@ static void showcmds(void)
|
||||||
|
|
||||||
upscli_disconnect(&ups);
|
upscli_disconnect(&ups);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle setting authentication data in the server */
|
/* handle setting authentication data in the server */
|
||||||
static void send_auth(const char *next)
|
static void send_auth(const char *next)
|
||||||
|
@ -511,7 +491,7 @@ static void send_auth(const char *next)
|
||||||
"upsd version too old - USERNAME not supported");
|
"upsd version too old - USERNAME not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page(next, "Can't set user name",
|
error_page(next, "Can't set user name",
|
||||||
"Set user name failed: %s", upscli_strerror(&ups));
|
"Set user name failed: %s", upscli_strerror(&ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,10 +504,7 @@ static void send_auth(const char *next)
|
||||||
if (upscli_readline(&ups, buf, sizeof(buf)) < 0)
|
if (upscli_readline(&ups, buf, sizeof(buf)) < 0)
|
||||||
error_page(next, "Can't set password",
|
error_page(next, "Can't set password",
|
||||||
"Password set failed: %s", upscli_strerror(&ups));
|
"Password set failed: %s", upscli_strerror(&ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void docmd(void)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void docmd(void)
|
static void docmd(void)
|
||||||
{
|
{
|
||||||
|
@ -538,13 +515,13 @@ static void docmd(void)
|
||||||
"Access to that host is not authorized");
|
"Access to that host is not authorized");
|
||||||
|
|
||||||
/* the user is messing with us */
|
/* the user is messing with us */
|
||||||
if (!upscommand)
|
if (!upscommand)
|
||||||
error_page("showcmds", "Form error",
|
error_page("showcmds", "Form error",
|
||||||
"No instant command selected");
|
"No instant command selected");
|
||||||
|
|
||||||
/* (l)user took the default blank option */
|
/* (l)user took the default blank option */
|
||||||
if (strlen(upscommand) == 0)
|
if (strlen(upscommand) == 0)
|
||||||
error_page("showcmds", "Form error",
|
error_page("showcmds", "Form error",
|
||||||
"No instant command selected");
|
"No instant command selected");
|
||||||
|
|
||||||
upsd_connect();
|
upsd_connect();
|
||||||
|
@ -618,7 +595,7 @@ static void docmd(void)
|
||||||
static const char *get_data(const char *type, const char *varname)
|
static const char *get_data(const char *type, const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
|
@ -656,7 +633,7 @@ static void do_string(const char *varname, int maxlen)
|
||||||
static void do_enum(const char *varname)
|
static void do_enum(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer, *val;
|
char **answer, *val;
|
||||||
const char *query[4], *tmp;
|
const char *query[4], *tmp;
|
||||||
|
|
||||||
|
@ -682,9 +659,8 @@ static void do_enum(const char *varname)
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printf("Unavailable\n");
|
printf("Unavailable\n");
|
||||||
fprintf(stderr, "Error doing ENUM %s %s: %s\n",
|
fprintf(stderr, "Error doing ENUM %s %s: %s\n",
|
||||||
upsname, varname, upscli_strerror(&ups));
|
upsname, varname, upscli_strerror(&ups));
|
||||||
free(val);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -698,7 +674,7 @@ static void do_enum(const char *varname)
|
||||||
|
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fprintf(stderr, "Error: insufficient data "
|
fprintf(stderr, "Error: insufficient data "
|
||||||
"(got %zu args, need at least 4)\n", numa);
|
"(got %d args, need at least 4)\n", numa);
|
||||||
|
|
||||||
free(val);
|
free(val);
|
||||||
return;
|
return;
|
||||||
|
@ -721,7 +697,7 @@ static void do_enum(const char *varname)
|
||||||
static void do_type(const char *varname)
|
static void do_type(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t i, numq, numa;
|
unsigned int i, numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
|
@ -733,7 +709,7 @@ static void do_type(const char *varname)
|
||||||
ret = upscli_get(&ups, numq, query, &numa, &answer);
|
ret = upscli_get(&ups, numq, query, &numa, &answer);
|
||||||
|
|
||||||
if ((ret < 0) || (numa < numq)) {
|
if ((ret < 0) || (numa < numq)) {
|
||||||
printf("Unknown type\n");
|
printf("Unknown type\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -751,9 +727,7 @@ static void do_type(const char *varname)
|
||||||
/* split out the :<len> data */
|
/* split out the :<len> data */
|
||||||
ptr = strchr(answer[i], ':');
|
ptr = strchr(answer[i], ':');
|
||||||
*ptr++ = '\0';
|
*ptr++ = '\0';
|
||||||
long l = strtol(ptr, (char **) NULL, 10);
|
len = strtol(ptr, (char **) NULL, 10);
|
||||||
assert(l <= 127); /* FIXME: Loophole about longer numbers? Why are we limited to char at all here? */
|
|
||||||
len = (char)l;
|
|
||||||
|
|
||||||
do_string(varname, len);
|
do_string(varname, len);
|
||||||
return;
|
return;
|
||||||
|
@ -767,12 +741,10 @@ static void do_type(const char *varname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_rw(const char *arg_upsname, const char *varname)
|
static void print_rw(const char *upsname, const char *varname)
|
||||||
{
|
{
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
|
|
||||||
printf("<!-- <TR><TD>Device</TD><TD>%s</TD></TR> -->\n", arg_upsname);
|
|
||||||
|
|
||||||
printf("<TR BGCOLOR=\"#60B0B0\" ALIGN=\"CENTER\">\n");
|
printf("<TR BGCOLOR=\"#60B0B0\" ALIGN=\"CENTER\">\n");
|
||||||
|
|
||||||
printf("<TD>");
|
printf("<TD>");
|
||||||
|
@ -793,13 +765,10 @@ static void print_rw(const char *arg_upsname, const char *varname)
|
||||||
printf("</TR>\n");
|
printf("</TR>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void showsettings(void)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void showsettings(void)
|
static void showsettings(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[2];
|
const char *query[2];
|
||||||
char **answer, *desc = NULL;
|
char **answer, *desc = NULL;
|
||||||
struct list_t *lhead, *llast, *ltmp, *lnext;
|
struct list_t *lhead, *llast, *ltmp, *lnext;
|
||||||
|
@ -938,16 +907,13 @@ static int setvar(const char *var, const char *val)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* turn a form submission of settings into SET commands for upsd */
|
/* turn a form submission of settings into SET commands for upsd */
|
||||||
static void savesettings(void)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void savesettings(void)
|
static void savesettings(void)
|
||||||
{
|
{
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
char *desc;
|
char *desc;
|
||||||
uvtype_t *upsvar;
|
uvtype_t *upsvar;
|
||||||
|
|
||||||
if (!checkhost(monups, &desc))
|
if (!checkhost(monups, &desc))
|
||||||
error_page("showsettings", "Access denied",
|
error_page("showsettings", "Access denied",
|
||||||
"Access to that host is not authorized");
|
"Access to that host is not authorized");
|
||||||
|
|
||||||
|
@ -987,9 +953,6 @@ static void savesettings(void)
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initial_pickups(void)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void initial_pickups(void)
|
static void initial_pickups(void)
|
||||||
{
|
{
|
||||||
do_header("Select a UPS");
|
do_header("Select a UPS");
|
||||||
|
@ -1064,12 +1027,10 @@ static void check_conf(void)
|
||||||
fprintf(stderr, "upsset.conf does not permit execution\n");
|
fprintf(stderr, "upsset.conf does not permit execution\n");
|
||||||
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(argc);
|
|
||||||
NUT_UNUSED_VARIABLE(argv);
|
|
||||||
username = password = function = monups = NULL;
|
username = password = function = monups = NULL;
|
||||||
|
|
||||||
printf("Content-type: text/html\n\n");
|
printf("Content-type: text/html\n\n");
|
||||||
|
@ -1079,16 +1040,15 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* see if there's anything waiting .. the server my not close STDIN properly */
|
/* see if there's anything waiting .. the server my not close STDIN properly */
|
||||||
if (1) {
|
if (1) {
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(STDIN_FILENO, &fds);
|
FD_SET(STDIN_FILENO, &fds);
|
||||||
tv.tv_sec = 0;
|
tv.tv_sec = 0;
|
||||||
tv.tv_usec = 250000; /* wait for up to 250ms for a POST response */
|
tv.tv_usec = 250000; /* wait for up to 250ms for a POST response */
|
||||||
|
if ((select(STDIN_FILENO+1, &fds, 0, 0, &tv)) > 0)
|
||||||
if ((select(STDIN_FILENO+1, &fds, 0, 0, &tv)) > 0)
|
extractpostargs();
|
||||||
extractpostargs();
|
|
||||||
}
|
}
|
||||||
if ((!username) || (!password) || (!function))
|
if ((!username) || (!password) || (!function))
|
||||||
loginscreen();
|
loginscreen();
|
||||||
|
@ -1114,6 +1074,6 @@ int main(int argc, char **argv)
|
||||||
docmd();
|
docmd();
|
||||||
|
|
||||||
printf("Error: Unhandled function name [%s]\n", function);
|
printf("Error: Unhandled function name [%s]\n", function);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "timehead.h"
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "cgilib.h"
|
#include "cgilib.h"
|
||||||
#include "parseconf.h"
|
#include "parseconf.h"
|
||||||
|
#include "timehead.h"
|
||||||
#include "upsstats.h"
|
#include "upsstats.h"
|
||||||
#include "upsimagearg.h"
|
#include "upsimagearg.h"
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ static int use_celsius = 1, refreshdelay = -1, treemode = 0;
|
||||||
/* from cgilib's checkhost() */
|
/* from cgilib's checkhost() */
|
||||||
static char *monhostdesc = NULL;
|
static char *monhostdesc = NULL;
|
||||||
|
|
||||||
static uint16_t port;
|
static int port;
|
||||||
static char *upsname, *hostname;
|
static char *upsname, *hostname;
|
||||||
static char *upsimgpath="upsimage.cgi", *upsstatpath="upsstats.cgi";
|
static char *upsimgpath="upsimage.cgi", *upsstatpath="upsstats.cgi";
|
||||||
static UPSCONN_t ups;
|
static UPSCONN_t ups;
|
||||||
|
@ -104,7 +103,7 @@ static int check_ups_fd(int do_report)
|
||||||
static int get_var(const char *var, char *buf, size_t buflen, int verbose)
|
static int get_var(const char *var, char *buf, size_t buflen, int verbose)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -135,7 +134,7 @@ static int get_var(const char *var, char *buf, size_t buflen, int verbose)
|
||||||
if (numa < numq) {
|
if (numa < numq) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("[Invalid response]\n");
|
printf("[Invalid response]\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,10 +195,9 @@ static int do_date(const char *buf)
|
||||||
{
|
{
|
||||||
char datebuf[SMALLBUF];
|
char datebuf[SMALLBUF];
|
||||||
time_t tod;
|
time_t tod;
|
||||||
struct tm tmbuf;
|
|
||||||
|
|
||||||
time(&tod);
|
time(&tod);
|
||||||
if (strftime(datebuf, sizeof(datebuf), buf, localtime_r(&tod, &tmbuf))) {
|
if (strftime(datebuf, sizeof(datebuf), buf, localtime(&tod))) {
|
||||||
printf("%s", datebuf);
|
printf("%s", datebuf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -293,12 +291,12 @@ static int do_img(char *buf)
|
||||||
|
|
||||||
/* only allow known types through */
|
/* only allow known types through */
|
||||||
|
|
||||||
if (!strcmp(type, "input.voltage")
|
if (!strcmp(type, "input.voltage")
|
||||||
|| !strcmp(type, "input.L1-N.voltage")
|
|| !strcmp(type, "input.L1-N.voltage")
|
||||||
|| !strcmp(type, "input.L2-N.voltage")
|
|| !strcmp(type, "input.L2-N.voltage")
|
||||||
|| !strcmp(type, "input.L3-N.voltage")
|
|| !strcmp(type, "input.L3-N.voltage")
|
||||||
|| !strcmp(type, "input.L1-L2.voltage")
|
|| !strcmp(type, "input.L1-L2.voltage")
|
||||||
|| !strcmp(type, "input.L2-L3.voltage")
|
|| !strcmp(type, "input.L2-L3.voltage")
|
||||||
|| !strcmp(type, "input.L3-L1.voltage")) {
|
|| !strcmp(type, "input.L3-L1.voltage")) {
|
||||||
return get_img_val(type, "Input voltage", imgargs);
|
return get_img_val(type, "Input voltage", imgargs);
|
||||||
}
|
}
|
||||||
|
@ -310,11 +308,11 @@ static int do_img(char *buf)
|
||||||
return get_img_val(type, "Battery charge", imgargs);
|
return get_img_val(type, "Battery charge", imgargs);
|
||||||
|
|
||||||
if (!strcmp(type, "output.voltage")
|
if (!strcmp(type, "output.voltage")
|
||||||
|| !strcmp(type, "output.L1-N.voltage")
|
|| !strcmp(type, "output.L1-N.voltage")
|
||||||
|| !strcmp(type, "output.L2-N.voltage")
|
|| !strcmp(type, "output.L2-N.voltage")
|
||||||
|| !strcmp(type, "output.L3-N.voltage")
|
|| !strcmp(type, "output.L3-N.voltage")
|
||||||
|| !strcmp(type, "output.L1-L2.voltage")
|
|| !strcmp(type, "output.L1-L2.voltage")
|
||||||
|| !strcmp(type, "output.L2-L3.voltage")
|
|| !strcmp(type, "output.L2-L3.voltage")
|
||||||
|| !strcmp(type, "output.L3-L1.voltage")) {
|
|| !strcmp(type, "output.L3-L1.voltage")) {
|
||||||
return get_img_val(type, "Output voltage", imgargs);
|
return get_img_val(type, "Output voltage", imgargs);
|
||||||
}
|
}
|
||||||
|
@ -351,7 +349,7 @@ static void ups_connect(void)
|
||||||
{
|
{
|
||||||
static ulist_t *lastups = NULL;
|
static ulist_t *lastups = NULL;
|
||||||
char *newups, *newhost;
|
char *newups, *newhost;
|
||||||
uint16_t newport;
|
int newport;
|
||||||
|
|
||||||
/* try to minimize reconnects */
|
/* try to minimize reconnects */
|
||||||
if (lastups) {
|
if (lastups) {
|
||||||
|
@ -365,13 +363,13 @@ static void ups_connect(void)
|
||||||
/* see if it's just on the same host */
|
/* see if it's just on the same host */
|
||||||
newups = newhost = NULL;
|
newups = newhost = NULL;
|
||||||
|
|
||||||
if (upscli_splitname(currups->sys, &newups, &newhost,
|
if (upscli_splitname(currups->sys, &newups, &newhost,
|
||||||
&newport) != 0) {
|
&newport) != 0) {
|
||||||
printf("Unusable UPS definition [%s]\n", currups->sys);
|
printf("Unusable UPS definition [%s]\n", currups->sys);
|
||||||
fprintf(stderr, "Unusable UPS definition [%s]\n",
|
fprintf(stderr, "Unusable UPS definition [%s]\n",
|
||||||
currups->sys);
|
currups->sys);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!strcmp(newhost, hostname)) && (port == newport)) {
|
if ((!strcmp(newhost, hostname)) && (port == newport)) {
|
||||||
free(upsname);
|
free(upsname);
|
||||||
|
@ -566,7 +564,7 @@ static void do_upsimgpath(const char *s) {
|
||||||
static void do_temp(const char *var)
|
static void do_temp(const char *var)
|
||||||
{
|
{
|
||||||
char tempc[SMALLBUF];
|
char tempc[SMALLBUF];
|
||||||
double tempf;
|
float tempf;
|
||||||
|
|
||||||
if (!get_var(var, tempc, sizeof(tempc), 1))
|
if (!get_var(var, tempc, sizeof(tempc), 1))
|
||||||
return;
|
return;
|
||||||
|
@ -809,8 +807,7 @@ static int do_command(char *cmd)
|
||||||
static void parse_line(const char *buf)
|
static void parse_line(const char *buf)
|
||||||
{
|
{
|
||||||
char cmd[SMALLBUF];
|
char cmd[SMALLBUF];
|
||||||
size_t i, len;
|
int i, len, do_cmd = 0;
|
||||||
char do_cmd = 0;
|
|
||||||
|
|
||||||
for (i = 0; buf[i]; i += len) {
|
for (i = 0; buf[i]; i += len) {
|
||||||
|
|
||||||
|
@ -827,10 +824,9 @@ static void parse_line(const char *buf)
|
||||||
i++; /* skip over the '@' character */
|
i++; /* skip over the '@' character */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
assert (len < INT_MAX);
|
|
||||||
|
|
||||||
if (do_cmd) {
|
if (do_cmd) {
|
||||||
snprintf(cmd, sizeof(cmd), "%.*s", (int)len, &buf[i]);
|
snprintf(cmd, sizeof(cmd), "%.*s", len, &buf[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,13 +836,13 @@ static void parse_line(const char *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pass it trough */
|
/* pass it trough */
|
||||||
printf("%.*s", (int)len, &buf[i]);
|
printf("%.*s", len, &buf[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void display_template(const char *tfn)
|
static void display_template(const char *tfn)
|
||||||
{
|
{
|
||||||
char fn[SMALLBUF], buf[LARGEBUF];
|
char fn[SMALLBUF], buf[LARGEBUF];
|
||||||
|
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
|
snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
|
||||||
|
|
||||||
|
@ -869,7 +865,7 @@ static void display_template(const char *tfn)
|
||||||
|
|
||||||
static void display_tree(int verbose)
|
static void display_tree(int verbose)
|
||||||
{
|
{
|
||||||
size_t numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
char **answer;
|
char **answer;
|
||||||
|
|
||||||
|
@ -894,7 +890,7 @@ static void display_tree(int verbose)
|
||||||
printf("<HTML>\n");
|
printf("<HTML>\n");
|
||||||
printf("<HEAD><TITLE>upsstat: data tree of %s</TITLE></HEAD>\n", currups->desc);
|
printf("<HEAD><TITLE>upsstat: data tree of %s</TITLE></HEAD>\n", currups->desc);
|
||||||
|
|
||||||
printf("<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000EE\" VLINK=\"#551A8B\">\n");
|
printf("<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000EE\" VLINK=\"#551A8B\">\n");
|
||||||
|
|
||||||
printf("<TABLE BGCOLOR=\"#50A0A0\" ALIGN=\"CENTER\">\n");
|
printf("<TABLE BGCOLOR=\"#50A0A0\" ALIGN=\"CENTER\">\n");
|
||||||
printf("<TR><TD>\n");
|
printf("<TR><TD>\n");
|
||||||
|
@ -914,12 +910,12 @@ static void display_tree(int verbose)
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("[Invalid response]\n");
|
printf("[Invalid response]\n");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("<TR BGCOLOR=\"#60B0B0\" ALIGN=\"LEFT\">\n");
|
printf("<TR BGCOLOR=\"#60B0B0\" ALIGN=\"LEFT\">\n");
|
||||||
|
|
||||||
printf("<TD>%s</TD>\n", answer[2]);
|
printf("<TD>%s</TD>\n", answer[2]);
|
||||||
printf("<TD>:</TD>\n");
|
printf("<TD>:</TD>\n");
|
||||||
printf("<TD>%s<br></TD>\n", answer[3]);
|
printf("<TD>%s<br></TD>\n", answer[3]);
|
||||||
|
@ -940,7 +936,7 @@ static void add_ups(char *sys, char *desc)
|
||||||
|
|
||||||
tmp = last = ulhead;
|
tmp = last = ulhead;
|
||||||
|
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
last = tmp;
|
last = tmp;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
@ -1045,12 +1041,9 @@ static void display_single(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
NUT_UNUSED_VARIABLE(argc);
|
|
||||||
NUT_UNUSED_VARIABLE(argv);
|
|
||||||
|
|
||||||
extractcgiargs();
|
extractcgiargs();
|
||||||
|
|
||||||
printf("Content-type: text/html\n");
|
printf("Content-type: text/html\n");
|
||||||
printf("Pragma: no-cache\n");
|
printf("Pragma: no-cache\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NUT_UPSSTATS_H_SEEN
|
|
||||||
#define NUT_UPSSTATS_H_SEEN 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -38,4 +35,3 @@ typedef struct {
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* NUT_UPSSTATS_H_SEEN */
|
|
||||||
|
|
|
@ -8,42 +8,10 @@ libparseconf_la_SOURCES = parseconf.c
|
||||||
# do not hard depend on '../include/nut_version.h', since it blocks
|
# do not hard depend on '../include/nut_version.h', since it blocks
|
||||||
# 'dist', and is only required for actual build, in which case
|
# 'dist', and is only required for actual build, in which case
|
||||||
# BUILT_SOURCES (in ../include) will ensure nut_version.h will
|
# BUILT_SOURCES (in ../include) will ensure nut_version.h will
|
||||||
# be built before anything else... but do depend on its build area:
|
# be built before anything else
|
||||||
if BUILDING_IN_TREE
|
libcommon_la_SOURCES = common.c state.c str.c upsconf.c
|
||||||
# No need for symlink hack
|
libcommonclient_la_SOURCES = common.c state.c str.c
|
||||||
common.c: $(top_builddir)/include/nut_version.h
|
|
||||||
else
|
|
||||||
# Surprisingly, for some "make" implementations this dependency means
|
|
||||||
# that the "common.c" required for builds below will be seeked in the
|
|
||||||
# current directory. So for out-of-tree builds like distcheck, we have
|
|
||||||
# to symlink the "real" source to build area:
|
|
||||||
common.c: $(top_builddir)/include/nut_version.h $(srcdir)/common.c
|
|
||||||
test -s "$@" || ln -s -f "$(top_srcdir)/common/common.c" "$@"
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(top_builddir)/include/nut_version.h:
|
|
||||||
@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
|
|
||||||
|
|
||||||
libcommon_la_SOURCES = state.c str.c upsconf.c
|
|
||||||
libcommonclient_la_SOURCES = state.c str.c
|
|
||||||
if BUILDING_IN_TREE
|
|
||||||
libcommon_la_SOURCES += common.c
|
|
||||||
libcommonclient_la_SOURCES += common.c
|
|
||||||
else
|
|
||||||
nodist_libcommon_la_SOURCES = common.c
|
|
||||||
nodist_libcommonclient_la_SOURCES = common.c
|
|
||||||
CLEANFILES = $(top_builddir)/common/common.c
|
|
||||||
BUILT_SOURCES = common.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ensure inclusion of local implementation of missing systems functions
|
# ensure inclusion of local implementation of missing systems functions
|
||||||
# using LTLIBOBJS. Refer to configure.in/.ac -> AC_REPLACE_FUNCS
|
# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS
|
||||||
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
|
|
||||||
# NOTE: Do not clean ".deps" in SUBDIRS of the main project,
|
|
||||||
# the root Makefile.am takes care of that!
|
|
||||||
#clean-local:
|
|
||||||
# rm -rf $(builddir)/.deps
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -17,17 +17,7 @@
|
||||||
# Network UPS Tools: common
|
# Network UPS Tools: common
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -91,27 +81,20 @@ POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
@BUILDING_IN_TREE_TRUE@am__append_1 = common.c
|
|
||||||
@BUILDING_IN_TREE_TRUE@am__append_2 = common.c
|
|
||||||
subdir = common
|
subdir = common
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am atexit.c \
|
||||||
|
snprintf.c setenv.c strerror.c $(top_srcdir)/depcomp
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -120,39 +103,26 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||||
libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@
|
libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@
|
||||||
am__libcommon_la_SOURCES_DIST = state.c str.c upsconf.c common.c
|
am_libcommon_la_OBJECTS = common.lo state.lo str.lo upsconf.lo
|
||||||
@BUILDING_IN_TREE_TRUE@am__objects_1 = common.lo
|
libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS)
|
||||||
am_libcommon_la_OBJECTS = state.lo str.lo upsconf.lo $(am__objects_1)
|
|
||||||
@BUILDING_IN_TREE_FALSE@nodist_libcommon_la_OBJECTS = common.lo
|
|
||||||
libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \
|
|
||||||
$(nodist_libcommon_la_OBJECTS)
|
|
||||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||||
am__v_lt_0 = --silent
|
am__v_lt_0 = --silent
|
||||||
am__v_lt_1 =
|
am__v_lt_1 =
|
||||||
libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@
|
libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@
|
||||||
am__libcommonclient_la_SOURCES_DIST = state.c str.c common.c
|
am_libcommonclient_la_OBJECTS = common.lo state.lo str.lo
|
||||||
am_libcommonclient_la_OBJECTS = state.lo str.lo $(am__objects_1)
|
libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS)
|
||||||
@BUILDING_IN_TREE_FALSE@nodist_libcommonclient_la_OBJECTS = common.lo
|
|
||||||
libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) \
|
|
||||||
$(nodist_libcommonclient_la_OBJECTS)
|
|
||||||
libparseconf_la_LIBADD =
|
libparseconf_la_LIBADD =
|
||||||
am_libparseconf_la_OBJECTS = parseconf.lo
|
am_libparseconf_la_OBJECTS = parseconf.lo
|
||||||
libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS)
|
libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS)
|
||||||
|
@ -170,12 +140,7 @@ am__v_at_0 = @
|
||||||
am__v_at_1 =
|
am__v_at_1 =
|
||||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__maybe_remake_depfiles = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
am__depfiles_remade = $(DEPDIR)/atexit.Plo $(DEPDIR)/setenv.Plo \
|
|
||||||
$(DEPDIR)/snprintf.Plo $(DEPDIR)/strerror.Plo \
|
|
||||||
./$(DEPDIR)/common.Plo ./$(DEPDIR)/parseconf.Plo \
|
|
||||||
./$(DEPDIR)/state.Plo ./$(DEPDIR)/str.Plo \
|
|
||||||
./$(DEPDIR)/upsconf.Plo
|
|
||||||
am__mv = mv -f
|
am__mv = mv -f
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
@ -195,12 +160,9 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
am__v_CCLD_1 =
|
am__v_CCLD_1 =
|
||||||
SOURCES = $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) \
|
SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \
|
||||||
$(libcommonclient_la_SOURCES) \
|
|
||||||
$(nodist_libcommonclient_la_SOURCES) \
|
|
||||||
$(libparseconf_la_SOURCES)
|
$(libparseconf_la_SOURCES)
|
||||||
DIST_SOURCES = $(am__libcommon_la_SOURCES_DIST) \
|
DIST_SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \
|
||||||
$(am__libcommonclient_la_SOURCES_DIST) \
|
|
||||||
$(libparseconf_la_SOURCES)
|
$(libparseconf_la_SOURCES)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
@ -226,8 +188,6 @@ am__define_uniq_tagged_files = \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp atexit.c \
|
|
||||||
setenv.c snprintf.c strerror.c
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
A2X = @A2X@
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
|
@ -236,7 +196,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -247,7 +206,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -261,7 +219,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -274,7 +231,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -292,8 +248,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -304,29 +258,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -346,9 +292,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -362,7 +305,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -380,7 +322,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -394,9 +335,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -422,14 +360,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -442,20 +378,18 @@ udevdir = @udevdir@
|
||||||
AM_CFLAGS = -I$(top_srcdir)/include
|
AM_CFLAGS = -I$(top_srcdir)/include
|
||||||
noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la
|
noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la
|
||||||
libparseconf_la_SOURCES = parseconf.c
|
libparseconf_la_SOURCES = parseconf.c
|
||||||
libcommon_la_SOURCES = state.c str.c upsconf.c $(am__append_1)
|
|
||||||
libcommonclient_la_SOURCES = state.c str.c $(am__append_2)
|
|
||||||
@BUILDING_IN_TREE_FALSE@nodist_libcommon_la_SOURCES = common.c
|
|
||||||
@BUILDING_IN_TREE_FALSE@nodist_libcommonclient_la_SOURCES = common.c
|
|
||||||
@BUILDING_IN_TREE_FALSE@CLEANFILES = $(top_builddir)/common/common.c
|
|
||||||
@BUILDING_IN_TREE_FALSE@BUILT_SOURCES = common.c
|
|
||||||
|
|
||||||
|
# do not hard depend on '../include/nut_version.h', since it blocks
|
||||||
|
# 'dist', and is only required for actual build, in which case
|
||||||
|
# BUILT_SOURCES (in ../include) will ensure nut_version.h will
|
||||||
|
# be built before anything else
|
||||||
|
libcommon_la_SOURCES = common.c state.c str.c upsconf.c
|
||||||
|
libcommonclient_la_SOURCES = common.c state.c str.c
|
||||||
# ensure inclusion of local implementation of missing systems functions
|
# ensure inclusion of local implementation of missing systems functions
|
||||||
# using LTLIBOBJS. Refer to configure.in/.ac -> AC_REPLACE_FUNCS
|
# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS
|
||||||
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
all: all-am
|
||||||
all: $(BUILT_SOURCES)
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .lo .o .obj
|
.SUFFIXES: .c .lo .o .obj
|
||||||
|
@ -471,13 +405,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu common/Makefile
|
$(AUTOMAKE) --gnu common/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -515,21 +450,15 @@ mostlyclean-compile:
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ # am--include-marker
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@
|
||||||
|
|
||||||
$(am__depfiles_remade):
|
|
||||||
@$(MKDIR_P) $(@D)
|
|
||||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
|
||||||
|
|
||||||
am--depfiles: $(am__depfiles_remade)
|
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
|
@ -613,10 +542,7 @@ cscopelist-am: $(am__tagged_files)
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
@ -647,14 +573,11 @@ distdir-am: $(DISTFILES)
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: $(BUILT_SOURCES)
|
check: check-am
|
||||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
|
||||||
all-am: Makefile $(LTLIBRARIES)
|
all-am: Makefile $(LTLIBRARIES)
|
||||||
installdirs:
|
installdirs:
|
||||||
install: $(BUILT_SOURCES)
|
install: install-am
|
||||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
install-exec: install-exec-am
|
||||||
install-exec: $(BUILT_SOURCES)
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-am
|
|
||||||
install-data: install-data-am
|
install-data: install-data-am
|
||||||
uninstall: uninstall-am
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
@ -675,7 +598,6 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
@ -684,23 +606,13 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||||
mostlyclean-am
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f $(DEPDIR)/atexit.Plo
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
-rm -f $(DEPDIR)/setenv.Plo
|
|
||||||
-rm -f $(DEPDIR)/snprintf.Plo
|
|
||||||
-rm -f $(DEPDIR)/strerror.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/common.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/parseconf.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/state.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/str.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upsconf.Plo
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-tags
|
distclean-tags
|
||||||
|
@ -746,15 +658,7 @@ install-ps-am:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -f $(DEPDIR)/atexit.Plo
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
-rm -f $(DEPDIR)/setenv.Plo
|
|
||||||
-rm -f $(DEPDIR)/snprintf.Plo
|
|
||||||
-rm -f $(DEPDIR)/strerror.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/common.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/parseconf.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/state.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/str.Plo
|
|
||||||
-rm -f ./$(DEPDIR)/upsconf.Plo
|
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
@ -773,45 +677,22 @@ ps-am:
|
||||||
|
|
||||||
uninstall-am:
|
uninstall-am:
|
||||||
|
|
||||||
.MAKE: all check install install-am install-exec install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||||
clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
|
||||||
cscopelist-am ctags ctags-am distclean distclean-compile \
|
ctags-am distclean distclean-compile distclean-generic \
|
||||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||||
dvi-am html html-am info info-am install install-am \
|
html-am info info-am install install-am install-data \
|
||||||
install-data install-data-am install-dvi install-dvi-am \
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
install-exec install-exec-am install-html install-html-am \
|
install-exec-am install-html install-html-am install-info \
|
||||||
install-info install-info-am install-man install-pdf \
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
install-pdf-am install-ps install-ps-am install-strip \
|
install-ps install-ps-am install-strip installcheck \
|
||||||
installcheck installcheck-am installdirs maintainer-clean \
|
installcheck-am installdirs maintainer-clean \
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
tags tags-am uninstall uninstall-am
|
tags tags-am uninstall uninstall-am
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
# do not hard depend on '../include/nut_version.h', since it blocks
|
|
||||||
# 'dist', and is only required for actual build, in which case
|
|
||||||
# BUILT_SOURCES (in ../include) will ensure nut_version.h will
|
|
||||||
# be built before anything else... but do depend on its build area:
|
|
||||||
# No need for symlink hack
|
|
||||||
@BUILDING_IN_TREE_TRUE@common.c: $(top_builddir)/include/nut_version.h
|
|
||||||
# Surprisingly, for some "make" implementations this dependency means
|
|
||||||
# that the "common.c" required for builds below will be seeked in the
|
|
||||||
# current directory. So for out-of-tree builds like distcheck, we have
|
|
||||||
# to symlink the "real" source to build area:
|
|
||||||
@BUILDING_IN_TREE_FALSE@common.c: $(top_builddir)/include/nut_version.h $(srcdir)/common.c
|
|
||||||
@BUILDING_IN_TREE_FALSE@ test -s "$@" || ln -s -f "$(top_srcdir)/common/common.c" "$@"
|
|
||||||
|
|
||||||
$(top_builddir)/include/nut_version.h:
|
|
||||||
@cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
|
|
||||||
|
|
||||||
# NOTE: Do not clean ".deps" in SUBDIRS of the main project,
|
|
||||||
# the root Makefile.am takes care of that!
|
|
||||||
#clean-local:
|
|
||||||
# rm -rf $(builddir)/.deps
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
580
common/common.c
580
common/common.c
|
@ -1,7 +1,6 @@
|
||||||
/* common.c - common useful functions
|
/* common.c - common useful functions
|
||||||
|
|
||||||
Copyright (C) 2000 Russell Kroll <rkroll@exploits.org>
|
Copyright (C) 2000 Russell Kroll <rkroll@exploits.org>
|
||||||
Copyright (C) 2021-2022 Jim Klimov <jimklimov+nut@gmail.com>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -22,11 +21,8 @@
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
/* the reason we define UPS_VERSION as a static string, rather than a
|
/* the reason we define UPS_VERSION as a static string, rather than a
|
||||||
macro, is to make dependency tracking easier (only common.o depends
|
macro, is to make dependency tracking easier (only common.o depends
|
||||||
|
@ -36,52 +32,6 @@
|
||||||
#include "nut_version.h"
|
#include "nut_version.h"
|
||||||
const char *UPS_VERSION = NUT_VERSION_MACRO;
|
const char *UPS_VERSION = NUT_VERSION_MACRO;
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
/* Know which bitness we were built for,
|
|
||||||
* to adjust the search paths for get_libname() */
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#if UINTPTR_MAX == 0xffffffffffffffffULL
|
|
||||||
# define BUILD_64 1
|
|
||||||
#else
|
|
||||||
# ifdef BUILD_64
|
|
||||||
# undef BUILD_64
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* https://stackoverflow.com/a/12844426/4715872 */
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
pid_t get_max_pid_t()
|
|
||||||
{
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic ignored "-Wunreachable-code"
|
|
||||||
#endif
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wunreachable-code"
|
|
||||||
#endif
|
|
||||||
if (sizeof(pid_t) == sizeof(short)) return (pid_t)SHRT_MAX;
|
|
||||||
if (sizeof(pid_t) == sizeof(int)) return (pid_t)INT_MAX;
|
|
||||||
if (sizeof(pid_t) == sizeof(long)) return (pid_t)LONG_MAX;
|
|
||||||
#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined _STDC_C99) || (defined __C99FEATURES__) /* C99+ build mode */
|
|
||||||
# if defined(LLONG_MAX) /* since C99 */
|
|
||||||
if (sizeof(pid_t) == sizeof(long long)) return (pid_t)LLONG_MAX;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
abort();
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int nut_debug_level = 0;
|
int nut_debug_level = 0;
|
||||||
int nut_log_level = 0;
|
int nut_log_level = 0;
|
||||||
static int upslog_flags = UPSLOG_STDERR;
|
static int upslog_flags = UPSLOG_STDERR;
|
||||||
|
@ -101,7 +51,7 @@ static int xbit_test(int val, int flag)
|
||||||
return ((val & flag) == flag);
|
return ((val & flag) == flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable writing upslog_with_errno() and upslogx() type messages to
|
/* enable writing upslog_with_errno() and upslogx() type messages to
|
||||||
the syslog */
|
the syslog */
|
||||||
void syslogbit_set(void)
|
void syslogbit_set(void)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +126,7 @@ void background(void)
|
||||||
close(1);
|
close(1);
|
||||||
close(2);
|
close(2);
|
||||||
|
|
||||||
if (pid != 0)
|
if (pid != 0)
|
||||||
_exit(EXIT_SUCCESS); /* parent */
|
_exit(EXIT_SUCCESS); /* parent */
|
||||||
|
|
||||||
/* child */
|
/* child */
|
||||||
|
@ -213,32 +163,8 @@ struct passwd *get_user_pwent(const char *name)
|
||||||
fatalx(EXIT_FAILURE, "user %s not found", name);
|
fatalx(EXIT_FAILURE, "user %s not found", name);
|
||||||
else
|
else
|
||||||
fatal_with_errno(EXIT_FAILURE, "getpwnam(%s)", name);
|
fatal_with_errno(EXIT_FAILURE, "getpwnam(%s)", name);
|
||||||
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) || (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN) )
|
return NULL; /* to make the compiler happy */
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic ignored "-Wunreachable-code"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN
|
|
||||||
#pragma GCC diagnostic ignored "-Wunreachable-code-return"
|
|
||||||
#endif
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wunreachable-code"
|
|
||||||
# ifdef HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN
|
|
||||||
# pragma clang diagnostic ignored "-Wunreachable-code-return"
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
/* Oh joy, adding unreachable "return" to make one compiler happy,
|
|
||||||
* and pragmas around to make other compilers happy, all at once! */
|
|
||||||
return NULL;
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) || (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN) )
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* change to the user defined in the struct */
|
/* change to the user defined in the struct */
|
||||||
|
@ -282,7 +208,7 @@ void writepid(const char *name)
|
||||||
{
|
{
|
||||||
char fn[SMALLBUF];
|
char fn[SMALLBUF];
|
||||||
FILE *pidf;
|
FILE *pidf;
|
||||||
mode_t mask;
|
int mask;
|
||||||
|
|
||||||
/* use full path if present, else build filename in PIDPATH */
|
/* use full path if present, else build filename in PIDPATH */
|
||||||
if (*name == '/')
|
if (*name == '/')
|
||||||
|
@ -294,9 +220,7 @@ void writepid(const char *name)
|
||||||
pidf = fopen(fn, "w");
|
pidf = fopen(fn, "w");
|
||||||
|
|
||||||
if (pidf) {
|
if (pidf) {
|
||||||
intmax_t pid = (intmax_t)getpid();
|
fprintf(pidf, "%d\n", (int) getpid());
|
||||||
upsdebugx(1, "Saving PID %jd into %s", pid, fn);
|
|
||||||
fprintf(pidf, "%jd\n", pid);
|
|
||||||
fclose(pidf);
|
fclose(pidf);
|
||||||
} else {
|
} else {
|
||||||
upslog_with_errno(LOG_NOTICE, "writepid: fopen %s", fn);
|
upslog_with_errno(LOG_NOTICE, "writepid: fopen %s", fn);
|
||||||
|
@ -305,17 +229,30 @@ void writepid(const char *name)
|
||||||
umask(mask);
|
umask(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send sig to pid, returns -1 for error, or
|
/* open pidfn, get the pid, then send it sig */
|
||||||
* zero for a successfully sent signal
|
int sendsignalfn(const char *pidfn, int sig)
|
||||||
*/
|
|
||||||
int sendsignalpid(pid_t pid, int sig)
|
|
||||||
{
|
{
|
||||||
int ret;
|
char buf[SMALLBUF];
|
||||||
|
FILE *pidf;
|
||||||
|
int pid, ret;
|
||||||
|
|
||||||
if (pid < 2 || pid > get_max_pid_t()) {
|
pidf = fopen(pidfn, "r");
|
||||||
upslogx(LOG_NOTICE,
|
if (!pidf) {
|
||||||
"Ignoring invalid pid number %" PRIdMAX,
|
upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn);
|
||||||
(intmax_t) pid);
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fgets(buf, sizeof(buf), pidf) == NULL) {
|
||||||
|
upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn);
|
||||||
|
fclose(pidf);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
pid = strtol(buf, (char **)NULL, 10);
|
||||||
|
|
||||||
|
if (pid < 2) {
|
||||||
|
upslogx(LOG_NOTICE, "Ignoring invalid pid number %d", pid);
|
||||||
|
fclose(pidf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,78 +261,21 @@ int sendsignalpid(pid_t pid, int sig)
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
perror("kill");
|
perror("kill");
|
||||||
|
fclose(pidf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sig != 0) {
|
/* now actually send it */
|
||||||
/* now actually send it */
|
ret = kill(pid, sig);
|
||||||
ret = kill(pid, sig);
|
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
perror("kill");
|
perror("kill");
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* parses string buffer into a pid_t if it passes
|
|
||||||
* a few sanity checks; returns -1 on error
|
|
||||||
*/
|
|
||||||
pid_t parsepid(const char *buf)
|
|
||||||
{
|
|
||||||
pid_t pid = -1;
|
|
||||||
|
|
||||||
/* assuming 10 digits for a long */
|
|
||||||
intmax_t _pid = strtol(buf, (char **)NULL, 10);
|
|
||||||
if (_pid <= get_max_pid_t()) {
|
|
||||||
pid = (pid_t)_pid;
|
|
||||||
} else {
|
|
||||||
upslogx(LOG_NOTICE, "Received a pid number too big for a pid_t: %" PRIdMAX, _pid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* open pidfn, get the pid, then send it sig
|
|
||||||
* returns negative codes for errors, or
|
|
||||||
* zero for a successfully sent signal
|
|
||||||
*/
|
|
||||||
int sendsignalfn(const char *pidfn, int sig)
|
|
||||||
{
|
|
||||||
char buf[SMALLBUF];
|
|
||||||
FILE *pidf;
|
|
||||||
pid_t pid = -1;
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
pidf = fopen(pidfn, "r");
|
|
||||||
if (!pidf) {
|
|
||||||
upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn);
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fgets(buf, sizeof(buf), pidf) == NULL) {
|
|
||||||
upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn);
|
|
||||||
fclose(pidf);
|
fclose(pidf);
|
||||||
return -2;
|
return -1;
|
||||||
}
|
|
||||||
/* TOTHINK: Original code only closed pidf before
|
|
||||||
* exiting the method, on error or "normally".
|
|
||||||
* Why not here? Do we want an (exclusive?) hold
|
|
||||||
* on it while being active in the method?
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* this method actively reports errors, if any */
|
|
||||||
pid = parsepid(buf);
|
|
||||||
|
|
||||||
if (pid >= 0) {
|
|
||||||
/* this method actively reports errors, if any */
|
|
||||||
ret = sendsignalpid(pid, sig);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(pidf);
|
fclose(pidf);
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snprintfcat(char *dst, size_t size, const char *fmt, ...)
|
int snprintfcat(char *dst, size_t size, const char *fmt, ...)
|
||||||
|
@ -405,46 +285,14 @@ int snprintfcat(char *dst, size_t size, const char *fmt, ...)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
size--;
|
size--;
|
||||||
if (len > size) {
|
assert(len <= size);
|
||||||
/* Do not truncate existing string */
|
|
||||||
errno = ERANGE;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
/* Note: this code intentionally uses a caller-provided format string */
|
|
||||||
ret = vsnprintf(dst + len, size - len, fmt, ap);
|
ret = vsnprintf(dst + len, size - len, fmt, ap);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
dst[size] = '\0';
|
dst[size] = '\0';
|
||||||
|
return len + ret;
|
||||||
/* Note: there is a standards loophole here: strlen() must return size_t
|
|
||||||
* and printf() family returns a signed int with negatives for errors.
|
|
||||||
* In theory it can overflow a 64-vs-32 bit range, or signed-vs-unsigned.
|
|
||||||
* In practice we hope to not have gigabytes-long config strings.
|
|
||||||
*/
|
|
||||||
if (ret < 0) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#ifdef INT_MAX
|
|
||||||
if ( ( (unsigned long long)len + (unsigned long long)ret ) >= (unsigned long long)INT_MAX ) {
|
|
||||||
errno = ERANGE;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return (int)len + ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* lazy way to send a signal if the program uses the PIDPATH */
|
/* lazy way to send a signal if the program uses the PIDPATH */
|
||||||
|
@ -471,27 +319,7 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror)
|
||||||
int ret;
|
int ret;
|
||||||
char buf[LARGEBUF];
|
char buf[LARGEBUF];
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#pragma clang diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
ret = vsnprintf(buf, sizeof(buf), fmt, va);
|
ret = vsnprintf(buf, sizeof(buf), fmt, va);
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((ret < 0) || (ret >= (int) sizeof(buf)))
|
if ((ret < 0) || (ret >= (int) sizeof(buf)))
|
||||||
syslog(LOG_WARNING, "vupslog: vsnprintf needed more than %d bytes",
|
syslog(LOG_WARNING, "vupslog: vsnprintf needed more than %d bytes",
|
||||||
|
@ -501,20 +329,20 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror)
|
||||||
snprintfcat(buf, sizeof(buf), ": %s", strerror(errno));
|
snprintfcat(buf, sizeof(buf), ": %s", strerror(errno));
|
||||||
|
|
||||||
if (nut_debug_level > 0) {
|
if (nut_debug_level > 0) {
|
||||||
static struct timeval start = { 0, 0 };
|
static struct timeval start = { 0 };
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
|
|
||||||
if (start.tv_sec == 0) {
|
if (start.tv_sec == 0) {
|
||||||
start = now;
|
start = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start.tv_usec > now.tv_usec) {
|
if (start.tv_usec > now.tv_usec) {
|
||||||
now.tv_usec += 1000000;
|
now.tv_usec += 1000000;
|
||||||
now.tv_sec -= 1;
|
now.tv_sec -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "%4.0f.%06ld\t", difftime(now.tv_sec, start.tv_sec), (long)(now.tv_usec - start.tv_usec));
|
fprintf(stderr, "%4.0f.%06ld\t", difftime(now.tv_sec, start.tv_sec), (long)(now.tv_usec - start.tv_usec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +353,7 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the default path for the directory containing configuration files */
|
/* Return the default path for the directory containing configuration files */
|
||||||
const char * confpath(void)
|
const char * confpath(void)
|
||||||
{
|
{
|
||||||
const char * path;
|
const char * path;
|
||||||
|
|
||||||
|
@ -536,82 +364,33 @@ const char * confpath(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the default path for the directory containing state files */
|
/* Return the default path for the directory containing state files */
|
||||||
const char * dflt_statepath(void)
|
const char * dflt_statepath(void)
|
||||||
{
|
{
|
||||||
const char * path;
|
const char * path;
|
||||||
|
|
||||||
path = getenv("NUT_STATEPATH");
|
if ((path = getenv("NUT_STATEPATH")) == NULL)
|
||||||
if ( (path == NULL) || (*path == '\0') )
|
|
||||||
path = STATEPATH;
|
path = STATEPATH;
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the alternate path for pid files, for processes running as non-root
|
/* Return the alternate path for pid files */
|
||||||
* Per documentation and configure script, the fallback value is the
|
const char * altpidpath(void)
|
||||||
* state-file path as the daemon and drivers can write there too.
|
|
||||||
* Note that this differs from PIDPATH that higher-privileged daemons, such
|
|
||||||
* as upsmon, tend to use.
|
|
||||||
*/
|
|
||||||
const char * altpidpath(void)
|
|
||||||
{
|
{
|
||||||
const char * path;
|
|
||||||
|
|
||||||
path = getenv("NUT_ALTPIDPATH");
|
|
||||||
if ( (path == NULL) || (*path == '\0') )
|
|
||||||
path = getenv("NUT_STATEPATH");
|
|
||||||
|
|
||||||
if ( (path != NULL) && (*path != '\0') )
|
|
||||||
return path;
|
|
||||||
|
|
||||||
#ifdef ALTPIDPATH
|
#ifdef ALTPIDPATH
|
||||||
return ALTPIDPATH;
|
return ALTPIDPATH;
|
||||||
#else
|
#else
|
||||||
/* We assume, here and elsewhere, that at least STATEPATH is always defined */
|
return dflt_statepath();
|
||||||
return STATEPATH;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Die with a standard message if socket filename is too long */
|
|
||||||
void check_unix_socket_filename(const char *fn) {
|
|
||||||
struct sockaddr_un ssaddr;
|
|
||||||
if (strlen(fn) < sizeof(ssaddr.sun_path))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Avoid useless truncated pathnames that
|
|
||||||
* other driver instances would conflict
|
|
||||||
* with, and upsd can not discover.
|
|
||||||
* Note this is quite short on many OSes
|
|
||||||
* varying 104-108 bytes (UNIX_PATH_MAX)
|
|
||||||
* as opposed to PATH_MAX or MAXPATHLEN
|
|
||||||
* typically of a kilobyte range.
|
|
||||||
*/
|
|
||||||
fatalx(EXIT_FAILURE,
|
|
||||||
"Can't create a unix domain socket: pathname '%s' "
|
|
||||||
"is too long (%zu) for 'struct sockaddr_un->sun_path' "
|
|
||||||
"on this system (%zu)",
|
|
||||||
fn, strlen(fn), sizeof(ssaddr.sun_path));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* logs the formatted string to any configured logging devices + the output of strerror(errno) */
|
/* logs the formatted string to any configured logging devices + the output of strerror(errno) */
|
||||||
void upslog_with_errno(int priority, const char *fmt, ...)
|
void upslog_with_errno(int priority, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vupslog(priority, fmt, va, 1);
|
vupslog(priority, fmt, va, 1);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,115 +400,44 @@ void upslogx(int priority, const char *fmt, ...)
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vupslog(priority, fmt, va, 0);
|
vupslog(priority, fmt, va, 0);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
void s_upsdebug_with_errno(int level, const char *fmt, ...)
|
void upsdebug_with_errno(int level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
char fmt2[LARGEBUF];
|
|
||||||
|
|
||||||
/* Note: Thanks to macro wrapping, we do not quite need this
|
|
||||||
* test now, but we still need the "level" value to report
|
|
||||||
* below - when it is not zero.
|
|
||||||
*/
|
|
||||||
if (nut_debug_level < level)
|
if (nut_debug_level < level)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* For debugging output, we want to prepend the debug level so the user can
|
|
||||||
* e.g. lower the level (less -D's on command line) to retain just the amount
|
|
||||||
* of logging info he needs to see at the moment. Using '-DDDDD' all the time
|
|
||||||
* is too brutal and needed high-level overview can be lost. This [D#] prefix
|
|
||||||
* can help limit this debug stream quicker, than experimentally picking ;) */
|
|
||||||
if (level > 0) {
|
|
||||||
int ret;
|
|
||||||
ret = snprintf(fmt2, sizeof(fmt2), "[D%d] %s", level, fmt);
|
|
||||||
if ((ret < 0) || (ret >= (int) sizeof(fmt2))) {
|
|
||||||
syslog(LOG_WARNING, "upsdebug_with_errno: snprintf needed more than %d bytes",
|
|
||||||
LARGEBUF);
|
|
||||||
} else {
|
|
||||||
fmt = (const char *)fmt2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vupslog(LOG_DEBUG, fmt, va, 1);
|
vupslog(LOG_DEBUG, fmt, va, 1);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
void s_upsdebugx(int level, const char *fmt, ...)
|
void upsdebugx(int level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
char fmt2[LARGEBUF];
|
|
||||||
|
|
||||||
if (nut_debug_level < level)
|
if (nut_debug_level < level)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* See comments above in upsdebug_with_errno() - they apply here too. */
|
|
||||||
if (level > 0) {
|
|
||||||
int ret;
|
|
||||||
ret = snprintf(fmt2, sizeof(fmt2), "[D%d] %s", level, fmt);
|
|
||||||
if ((ret < 0) || (ret >= (int) sizeof(fmt2))) {
|
|
||||||
syslog(LOG_WARNING, "upsdebugx: snprintf needed more than %d bytes",
|
|
||||||
LARGEBUF);
|
|
||||||
} else {
|
|
||||||
fmt = (const char *)fmt2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vupslog(LOG_DEBUG, fmt, va, 0);
|
vupslog(LOG_DEBUG, fmt, va, 0);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dump message msg and len bytes from buf to upsdebugx(level) in
|
/* dump message msg and len bytes from buf to upsdebugx(level) in
|
||||||
hexadecimal. (This function replaces Philippe Marzouk's original
|
hexadecimal. (This function replaces Philippe Marzouk's original
|
||||||
dump_hex() function) */
|
dump_hex() function) */
|
||||||
void s_upsdebug_hex(int level, const char *msg, const void *buf, size_t len)
|
void upsdebug_hex(int level, const char *msg, const void *buf, int len)
|
||||||
{
|
{
|
||||||
char line[100];
|
char line[100];
|
||||||
int n; /* number of characters currently in line */
|
int n; /* number of characters currently in line */
|
||||||
size_t i; /* number of bytes output from buffer */
|
int i; /* number of bytes output from buffer */
|
||||||
|
|
||||||
n = snprintf(line, sizeof(line), "%s: (%zu bytes) =>", msg, len);
|
n = snprintf(line, sizeof(line), "%s: (%d bytes) =>", msg, len);
|
||||||
if (n < 0) goto failed;
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
|
|
||||||
|
@ -739,16 +447,9 @@ void s_upsdebug_hex(int level, const char *msg, const void *buf, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
n = snprintfcat(line, sizeof(line), n ? " %02x" : "%02x",
|
n = snprintfcat(line, sizeof(line), n ? " %02x" : "%02x",
|
||||||
((const unsigned char *)buf)[i]);
|
((unsigned char *)buf)[i]);
|
||||||
|
|
||||||
if (n < 0) goto failed;
|
|
||||||
}
|
}
|
||||||
|
upsdebugx(level, "%s", line);
|
||||||
s_upsdebugx(level, "%s", line);
|
|
||||||
return;
|
|
||||||
|
|
||||||
failed:
|
|
||||||
s_upsdebugx(level, "%s", "Failed to print a hex dump for debug");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* taken from www.asciitable.com */
|
/* taken from www.asciitable.com */
|
||||||
|
@ -788,37 +489,29 @@ static const char* ascii_symb[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* dump message msg and len bytes from buf to upsdebugx(level) in ascii. */
|
/* dump message msg and len bytes from buf to upsdebugx(level) in ascii. */
|
||||||
void s_upsdebug_ascii(int level, const char *msg, const void *buf, size_t len)
|
void upsdebug_ascii(int level, const char *msg, const void *buf, int len)
|
||||||
{
|
{
|
||||||
char line[256];
|
char line[256];
|
||||||
int n; /* number of characters currently in line */
|
int i;
|
||||||
size_t i; /* number of bytes output from buffer */
|
|
||||||
unsigned char ch;
|
unsigned char ch;
|
||||||
|
|
||||||
if (nut_debug_level < level)
|
if (nut_debug_level < level)
|
||||||
return; /* save cpu cycles */
|
return; /* save cpu cycles */
|
||||||
|
|
||||||
n = snprintf(line, sizeof(line), "%s", msg);
|
snprintf(line, sizeof(line), "%s", msg);
|
||||||
if (n < 0) goto failed;
|
|
||||||
|
|
||||||
for (i=0; i<len; ++i) {
|
for (i=0; i<len; ++i) {
|
||||||
ch = ((const unsigned char *)buf)[i];
|
ch = ((unsigned char *)buf)[i];
|
||||||
|
|
||||||
if (ch < 0x20)
|
if (ch < 0x20)
|
||||||
n = snprintfcat(line, sizeof(line), "%3s ", ascii_symb[ch]);
|
snprintfcat(line, sizeof(line), "%3s ", ascii_symb[ch]);
|
||||||
else if (ch >= 0x80)
|
else if (ch >= 0x80)
|
||||||
n = snprintfcat(line, sizeof(line), "%02Xh ", ch);
|
snprintfcat(line, sizeof(line), "%02Xh ", ch);
|
||||||
else
|
else
|
||||||
n = snprintfcat(line, sizeof(line), "'%c' ", ch);
|
snprintfcat(line, sizeof(line), "'%c' ", ch);
|
||||||
|
|
||||||
if (n < 0) goto failed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s_upsdebugx(level, "%s", line);
|
upsdebugx(level, "%s", line);
|
||||||
return;
|
|
||||||
|
|
||||||
failed:
|
|
||||||
s_upsdebugx(level, "%s", "Failed to print an ASCII data dump for debug");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vfatal(const char *fmt, va_list va, int use_strerror)
|
static void vfatal(const char *fmt, va_list va, int use_strerror)
|
||||||
|
@ -828,19 +521,7 @@ static void vfatal(const char *fmt, va_list va, int use_strerror)
|
||||||
if (xbit_test(upslog_flags, UPSLOG_SYSLOG_ON_FATAL))
|
if (xbit_test(upslog_flags, UPSLOG_SYSLOG_ON_FATAL))
|
||||||
xbit_set(&upslog_flags, UPSLOG_SYSLOG);
|
xbit_set(&upslog_flags, UPSLOG_SYSLOG);
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vupslog(LOG_ERR, fmt, va, use_strerror);
|
vupslog(LOG_ERR, fmt, va, use_strerror);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void fatal_with_errno(int status, const char *fmt, ...)
|
void fatal_with_errno(int status, const char *fmt, ...)
|
||||||
|
@ -848,19 +529,7 @@ void fatal_with_errno(int status, const char *fmt, ...)
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vfatal(fmt, va, (errno > 0) ? 1 : 0);
|
vfatal(fmt, va, (errno > 0) ? 1 : 0);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
exit(status);
|
exit(status);
|
||||||
|
@ -871,19 +540,7 @@ void fatalx(int status, const char *fmt, ...)
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
|
||||||
#endif
|
|
||||||
vfatal(fmt, va, 0);
|
vfatal(fmt, va, 0);
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
exit(status);
|
exit(status);
|
||||||
|
@ -930,7 +587,7 @@ char *xstrdup(const char *string)
|
||||||
/* Read up to buflen bytes from fd and return the number of bytes
|
/* Read up to buflen bytes from fd and return the number of bytes
|
||||||
read. If no data is available within d_sec + d_usec, return 0.
|
read. If no data is available within d_sec + d_usec, return 0.
|
||||||
On error, a value < 0 is returned (errno indicates error). */
|
On error, a value < 0 is returned (errno indicates error). */
|
||||||
ssize_t select_read(const int fd, void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec)
|
int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
|
@ -954,7 +611,7 @@ ssize_t select_read(const int fd, void *buf, const size_t buflen, const time_t d
|
||||||
/* Write up to buflen bytes to fd and return the number of bytes
|
/* Write up to buflen bytes to fd and return the number of bytes
|
||||||
written. If no data is available within d_sec + d_usec, return 0.
|
written. If no data is available within d_sec + d_usec, return 0.
|
||||||
On error, a value < 0 is returned (errno indicates error). */
|
On error, a value < 0 is returned (errno indicates error). */
|
||||||
ssize_t select_write(const int fd, const void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec)
|
int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
|
@ -974,106 +631,3 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t
|
||||||
|
|
||||||
return write(fd, buf, buflen);
|
return write(fd, buf, buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: would be good to get more from /etc/ld.so.conf[.d] and/or
|
|
||||||
* LD_LIBRARY_PATH and a smarter dependency on build bitness; also
|
|
||||||
* note that different OSes can have their pathnames set up differently
|
|
||||||
* with regard to default/preferred bitness (maybe a "32" in the name
|
|
||||||
* should also be searched explicitly - again, IFF our build is 32-bit).
|
|
||||||
*
|
|
||||||
* General premise for this solution is that some parts of NUT (e.g. the
|
|
||||||
* nut-scanner tool, or DMF feature code) must be pre-built and distributed
|
|
||||||
* in binary packages, but only at run-time it gets to know which third-party
|
|
||||||
* libraries it should use for particular operations. This differs from e.g.
|
|
||||||
* distribution packages which group NUT driver binaries explicitly dynamically
|
|
||||||
* linked against certain OS-provided libraries for accessing this or that
|
|
||||||
* communications media and/or vendor protocol.
|
|
||||||
*/
|
|
||||||
static const char * search_paths[] = {
|
|
||||||
/* Use the library path (and bitness) provided during ./configure first */
|
|
||||||
LIBDIR,
|
|
||||||
"/usr"LIBDIR,
|
|
||||||
"/usr/local"LIBDIR,
|
|
||||||
#ifdef BUILD_64
|
|
||||||
/* Fall back to explicit preference of 64-bit paths as named on some OSes */
|
|
||||||
"/usr/lib/64",
|
|
||||||
"/usr/lib64",
|
|
||||||
#endif
|
|
||||||
"/usr/lib",
|
|
||||||
#ifdef BUILD_64
|
|
||||||
"/lib/64",
|
|
||||||
"/lib64",
|
|
||||||
#endif
|
|
||||||
"/lib",
|
|
||||||
#ifdef BUILD_64
|
|
||||||
"/usr/local/lib/64",
|
|
||||||
"/usr/local/lib64",
|
|
||||||
#endif
|
|
||||||
"/usr/local/lib",
|
|
||||||
#ifdef AUTOTOOLS_TARGET_SHORT_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_TARGET_SHORT_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_TARGET_SHORT_ALIAS,
|
|
||||||
#else
|
|
||||||
# ifdef AUTOTOOLS_HOST_SHORT_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_HOST_SHORT_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_HOST_SHORT_ALIAS,
|
|
||||||
# else
|
|
||||||
# ifdef AUTOTOOLS_BUILD_SHORT_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_BUILD_SHORT_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_BUILD_SHORT_ALIAS,
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#ifdef AUTOTOOLS_TARGET_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_TARGET_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_TARGET_ALIAS,
|
|
||||||
#else
|
|
||||||
# ifdef AUTOTOOLS_HOST_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_HOST_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_HOST_ALIAS,
|
|
||||||
# else
|
|
||||||
# ifdef AUTOTOOLS_BUILD_ALIAS
|
|
||||||
"/usr/lib/" AUTOTOOLS_BUILD_ALIAS,
|
|
||||||
"/usr/lib/gcc/" AUTOTOOLS_BUILD_ALIAS,
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
char * get_libname(const char* base_libname)
|
|
||||||
{
|
|
||||||
DIR *dp;
|
|
||||||
struct dirent *dirp;
|
|
||||||
int index = 0;
|
|
||||||
char *libname_path = NULL;
|
|
||||||
char current_test_path[LARGEBUF];
|
|
||||||
size_t base_libname_length = strlen(base_libname);
|
|
||||||
|
|
||||||
for(index = 0 ; (search_paths[index] != NULL) && (libname_path == NULL) ; index++)
|
|
||||||
{
|
|
||||||
memset(current_test_path, 0, LARGEBUF);
|
|
||||||
|
|
||||||
if ((dp = opendir(search_paths[index])) == NULL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
upsdebugx(2,"Looking for lib %s in directory #%d : %s", base_libname, index, search_paths[index]);
|
|
||||||
while ((dirp = readdir(dp)) != NULL)
|
|
||||||
{
|
|
||||||
upsdebugx(5,"Comparing lib %s with dirpath %s", base_libname, dirp->d_name);
|
|
||||||
int compres = strncmp(dirp->d_name, base_libname, base_libname_length);
|
|
||||||
if(compres == 0) {
|
|
||||||
snprintf(current_test_path, LARGEBUF, "%s/%s", search_paths[index], dirp->d_name);
|
|
||||||
libname_path = realpath(current_test_path, NULL);
|
|
||||||
upsdebugx(2,"Candidate path for lib %s is %s (realpath %s)", base_libname, current_test_path, (libname_path!=NULL)?libname_path:"NULL");
|
|
||||||
if (libname_path != NULL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir(dp);
|
|
||||||
}
|
|
||||||
|
|
||||||
upsdebugx(1,"Looking for lib %s, found %s", base_libname, (libname_path!=NULL)?libname_path:"NULL");
|
|
||||||
return libname_path;
|
|
||||||
}
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* There is now a context buffer, and you call pconf_init to set it up.
|
* There is now a context buffer, and you call pconf_init to set it up.
|
||||||
* All subsequent calls must have it as the first argument. There are
|
* All subsequent calls must have it as the first argument. There are
|
||||||
* two entry points for parsing lines. You can have it read a file
|
* two entry points for parsing lines. You can have it read a file
|
||||||
* (pconf_file_begin and pconf_file_next), take lines directly from
|
* (pconf_file_begin and pconf_file_next), take lines directly from
|
||||||
* the caller (pconf_line), or go along a character at a time (pconf_char).
|
* the caller (pconf_line), or go along a character at a time (pconf_char).
|
||||||
* The parsing is identical no matter how you feed it.
|
* The parsing is identical no matter how you feed it.
|
||||||
*
|
*
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
*
|
*
|
||||||
* Fatal errors are those that involve memory allocation. If the user
|
* Fatal errors are those that involve memory allocation. If the user
|
||||||
* defines an error handler when calling pconf_init, that function will
|
* defines an error handler when calling pconf_init, that function will
|
||||||
* be called with the error message before parseconf exits. By default
|
* be called with the error message before parseconf exits. By default
|
||||||
* it will just write the message to stderr before exiting.
|
* it will just write the message to stderr before exiting.
|
||||||
*
|
*
|
||||||
* Input vs. Output:
|
* Input vs. Output:
|
||||||
|
@ -57,12 +57,12 @@
|
||||||
* also allows you to join lines, allowing you to have logical lines
|
* also allows you to join lines, allowing you to have logical lines
|
||||||
* that span physical lines, just like you can do in some shells.
|
* that span physical lines, just like you can do in some shells.
|
||||||
*
|
*
|
||||||
* Lines normally end with a newline, but reaching EOF will also force
|
* Lines normally end with a newline, but reaching EOF will also force
|
||||||
* parsing on what's been scanned so far.
|
* parsing on what's been scanned so far.
|
||||||
*
|
*
|
||||||
* Design:
|
* Design:
|
||||||
*
|
*
|
||||||
* Characters are read one at a time to drive the state machine.
|
* Characters are read one at a time to drive the state machine.
|
||||||
* As words are completed (by hitting whitespace or ending a "" item),
|
* As words are completed (by hitting whitespace or ending a "" item),
|
||||||
* they are committed to the next buffer in the arglist. realloc is
|
* they are committed to the next buffer in the arglist. realloc is
|
||||||
* used, so the buffer can grow to handle bigger words.
|
* used, so the buffer can grow to handle bigger words.
|
||||||
|
@ -76,20 +76,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include "parseconf.h"
|
#include "parseconf.h"
|
||||||
#include "attribute.h"
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
|
|
||||||
/* possible states */
|
/* possible states */
|
||||||
|
|
||||||
|
@ -102,9 +97,6 @@
|
||||||
#define STATE_ENDOFLINE 7
|
#define STATE_ENDOFLINE 7
|
||||||
#define STATE_PARSEERR 8
|
#define STATE_PARSEERR 8
|
||||||
|
|
||||||
static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt)
|
|
||||||
__attribute__((noreturn));
|
|
||||||
|
|
||||||
static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt)
|
static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt)
|
||||||
{
|
{
|
||||||
if (ctx->errhandler)
|
if (ctx->errhandler)
|
||||||
|
@ -117,7 +109,7 @@ static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt)
|
||||||
|
|
||||||
static void add_arg_word(PCONF_CTX_t *ctx)
|
static void add_arg_word(PCONF_CTX_t *ctx)
|
||||||
{
|
{
|
||||||
size_t argpos;
|
int argpos;
|
||||||
size_t wbuflen;
|
size_t wbuflen;
|
||||||
|
|
||||||
/* this is where the new value goes */
|
/* this is where the new value goes */
|
||||||
|
@ -130,13 +122,13 @@ static void add_arg_word(PCONF_CTX_t *ctx)
|
||||||
ctx->maxargs = ctx->numargs;
|
ctx->maxargs = ctx->numargs;
|
||||||
|
|
||||||
/* resize the lists */
|
/* resize the lists */
|
||||||
ctx->arglist = realloc(ctx->arglist,
|
ctx->arglist = realloc(ctx->arglist,
|
||||||
sizeof(char *) * ctx->numargs);
|
sizeof(char *) * ctx->numargs);
|
||||||
|
|
||||||
if (!ctx->arglist)
|
if (!ctx->arglist)
|
||||||
pconf_fatal(ctx, "realloc arglist failed");
|
pconf_fatal(ctx, "realloc arglist failed");
|
||||||
|
|
||||||
ctx->argsize = realloc(ctx->argsize,
|
ctx->argsize = realloc(ctx->argsize,
|
||||||
sizeof(size_t) * ctx->numargs);
|
sizeof(size_t) * ctx->numargs);
|
||||||
|
|
||||||
if (!ctx->argsize)
|
if (!ctx->argsize)
|
||||||
|
@ -179,7 +171,7 @@ static void addchar(PCONF_CTX_t *ctx)
|
||||||
|
|
||||||
wbuflen = strlen(ctx->wordbuf);
|
wbuflen = strlen(ctx->wordbuf);
|
||||||
|
|
||||||
/* CVE-2012-2944: only allow the subset of ASCII charset from Space to ~ */
|
/* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */
|
||||||
if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) {
|
if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) {
|
||||||
fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n",
|
fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n",
|
||||||
ctx->ch);
|
ctx->ch);
|
||||||
|
@ -207,7 +199,7 @@ static void addchar(PCONF_CTX_t *ctx)
|
||||||
ctx->wordptr = &ctx->wordbuf[wbuflen];
|
ctx->wordptr = &ctx->wordbuf[wbuflen];
|
||||||
}
|
}
|
||||||
|
|
||||||
*ctx->wordptr++ = (char)ctx->ch;
|
*ctx->wordptr++ = ctx->ch;
|
||||||
*ctx->wordptr = '\0';
|
*ctx->wordptr = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,8 +234,8 @@ static int findwordstart(PCONF_CTX_t *ctx)
|
||||||
return STATE_FINDEOL;
|
return STATE_FINDEOL;
|
||||||
|
|
||||||
/* space = not in a word yet, so loop back */
|
/* space = not in a word yet, so loop back */
|
||||||
if (isspace((size_t)ctx->ch))
|
if (isspace(ctx->ch))
|
||||||
return STATE_FINDWORDSTART;
|
return STATE_FINDWORDSTART;
|
||||||
|
|
||||||
/* \ = literal = accept the next char blindly */
|
/* \ = literal = accept the next char blindly */
|
||||||
if (ctx->ch == '\\')
|
if (ctx->ch == '\\')
|
||||||
|
@ -263,7 +255,7 @@ static int findwordstart(PCONF_CTX_t *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
return STATE_COLLECT;
|
return STATE_COLLECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eat characters until the end of the line is found */
|
/* eat characters until the end of the line is found */
|
||||||
static int findeol(PCONF_CTX_t *ctx)
|
static int findeol(PCONF_CTX_t *ctx)
|
||||||
|
@ -282,7 +274,7 @@ static void pconf_seterr(PCONF_CTX_t *ctx, const char *errmsg)
|
||||||
snprintf(ctx->errmsg, PCONF_ERR_LEN, "%s", errmsg);
|
snprintf(ctx->errmsg, PCONF_ERR_LEN, "%s", errmsg);
|
||||||
|
|
||||||
ctx->error = 1;
|
ctx->error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* quote characters inside a word bounded by "quotes" */
|
/* quote characters inside a word bounded by "quotes" */
|
||||||
static int quotecollect(PCONF_CTX_t *ctx)
|
static int quotecollect(PCONF_CTX_t *ctx)
|
||||||
|
@ -299,7 +291,7 @@ static int quotecollect(PCONF_CTX_t *ctx)
|
||||||
/* another " means we're done with this word */
|
/* another " means we're done with this word */
|
||||||
if (ctx->ch == '"') {
|
if (ctx->ch == '"') {
|
||||||
endofword(ctx);
|
endofword(ctx);
|
||||||
|
|
||||||
return STATE_FINDWORDSTART;
|
return STATE_FINDWORDSTART;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +334,7 @@ static int collect(PCONF_CTX_t *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* space means the word is done */
|
/* space means the word is done */
|
||||||
if (isspace((size_t)ctx->ch)) {
|
if (isspace(ctx->ch)) {
|
||||||
endofword(ctx);
|
endofword(ctx);
|
||||||
|
|
||||||
return STATE_FINDWORDSTART;
|
return STATE_FINDWORDSTART;
|
||||||
|
@ -451,9 +443,6 @@ int pconf_file_begin(PCONF_CTX_t *ctx, const char *fn)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prevent fd leaking to child processes */
|
|
||||||
fcntl(fileno(ctx->f), F_SETFD, FD_CLOEXEC);
|
|
||||||
|
|
||||||
return 1; /* OK */
|
return 1; /* OK */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,7 +571,7 @@ int pconf_line(PCONF_CTX_t *ctx, const char *line)
|
||||||
/* deal with any lingering characters */
|
/* deal with any lingering characters */
|
||||||
|
|
||||||
/* still building a word? */
|
/* still building a word? */
|
||||||
if (ctx->wordptr != ctx->wordbuf)
|
if (ctx->wordptr != ctx->wordbuf)
|
||||||
endofword(ctx); /* tie it off */
|
endofword(ctx); /* tie it off */
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -9,14 +9,13 @@ int nut_setenv(const char *name, const char *value, int overwrite)
|
||||||
char *val;
|
char *val;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
if (overwrite == 0) {
|
if (overwrite == 0) {
|
||||||
val = getenv(name);
|
val = getenv(name);
|
||||||
if (val != NULL) {
|
if (val != NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = xmalloc(strlen(value) + strlen(name) + 2);
|
buffer = xmalloc(strlen(value) + strlen(name) + 2);
|
||||||
strcpy(buffer, name);
|
strcpy(buffer, name);
|
||||||
strcat(buffer, "=");
|
strcat(buffer, "=");
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
* original. Also, there is now a builtin-test, just compile with:
|
* original. Also, there is now a builtin-test, just compile with:
|
||||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||||
* and run snprintf for results.
|
* and run snprintf for results.
|
||||||
*
|
*
|
||||||
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||||
* The PGP code was using unsigned hexadecimal formats.
|
* The PGP code was using unsigned hexadecimal formats.
|
||||||
* Unfortunately, unsigned formats simply didn't work.
|
* Unfortunately, unsigned formats simply didn't work.
|
||||||
*
|
*
|
||||||
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
# include <ctype.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||||
|
@ -102,14 +102,14 @@
|
||||||
/*int snprintf (char *str, size_t count, const char *fmt, ...);*/
|
/*int snprintf (char *str, size_t count, const char *fmt, ...);*/
|
||||||
/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/
|
/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/
|
||||||
|
|
||||||
static void dopr (char *buffer, size_t maxlen, const char *format,
|
static void dopr (char *buffer, size_t maxlen, const char *format,
|
||||||
va_list args);
|
va_list args);
|
||||||
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
char *value, int flags, int min, int max);
|
char *value, int flags, int min, int max);
|
||||||
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
long value, int base, int min, int max, int flags);
|
long value, int base, int min, int max, int flags);
|
||||||
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
LDOUBLE fvalue, int min, int max, int flags);
|
LDOUBLE fvalue, int min, int max, int flags);
|
||||||
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
|
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -137,26 +137,10 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
|
||||||
|
|
||||||
/* Conversion Flags */
|
/* Conversion Flags */
|
||||||
#define DP_C_SHORT 1
|
#define DP_C_SHORT 1
|
||||||
/* Note: Originally DP_C_SHORT converted to "short int" types, but modernish
|
|
||||||
* (C99+ or even earlier) standards require that the minimal type passed
|
|
||||||
* through variadic args '...' is an int, and smaller types are padded up
|
|
||||||
* to it - so value shifts in memory and erroneous access crashes can occur
|
|
||||||
* if smaller data is accessed blindly. Code below has been fixed to not pass
|
|
||||||
* "short int" anymore - it just casts the int to desired smaller type (and
|
|
||||||
* so drops the padding bits). */
|
|
||||||
#define DP_C_LONG 2
|
#define DP_C_LONG 2
|
||||||
#define DP_C_LDOUBLE 3
|
#define DP_C_LDOUBLE 3
|
||||||
#define DP_C_LLONG 4
|
#define DP_C_LLONG 4
|
||||||
|
|
||||||
#ifdef C89PLUS
|
|
||||||
#undef C89PLUS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__STDC__) || defined(__STDC_VERSION__)
|
|
||||||
/* C89+ and C90+ code respectively */
|
|
||||||
#define C89PLUS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define char_to_int(p) ((p)- '0')
|
#define char_to_int(p) ((p)- '0')
|
||||||
#define MAX(p,q) (((p) >= (q)) ? (p) : (q))
|
#define MAX(p,q) (((p) >= (q)) ? (p) : (q))
|
||||||
|
|
||||||
|
@ -172,7 +156,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
||||||
int flags;
|
int flags;
|
||||||
int cflags;
|
int cflags;
|
||||||
size_t currlen;
|
size_t currlen;
|
||||||
|
|
||||||
state = DP_S_DEFAULT;
|
state = DP_S_DEFAULT;
|
||||||
currlen = flags = cflags = min = 0;
|
currlen = flags = cflags = min = 0;
|
||||||
max = -1;
|
max = -1;
|
||||||
|
@ -180,259 +164,237 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
||||||
|
|
||||||
while (state != DP_S_DONE)
|
while (state != DP_S_DONE)
|
||||||
{
|
{
|
||||||
if ((ch == '\0') || (currlen >= maxlen))
|
if ((ch == '\0') || (currlen >= maxlen))
|
||||||
state = DP_S_DONE;
|
state = DP_S_DONE;
|
||||||
|
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case DP_S_DEFAULT:
|
case DP_S_DEFAULT:
|
||||||
if (ch == '%')
|
if (ch == '%')
|
||||||
state = DP_S_FLAGS;
|
state = DP_S_FLAGS;
|
||||||
else
|
else
|
||||||
dopr_outch (buffer, &currlen, maxlen, ch);
|
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case DP_S_FLAGS:
|
case DP_S_FLAGS:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case '-':
|
case '-':
|
||||||
flags |= DP_F_MINUS;
|
flags |= DP_F_MINUS;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
flags |= DP_F_PLUS;
|
flags |= DP_F_PLUS;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
flags |= DP_F_SPACE;
|
flags |= DP_F_SPACE;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case '#':
|
case '#':
|
||||||
flags |= DP_F_NUM;
|
flags |= DP_F_NUM;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case '0':
|
case '0':
|
||||||
flags |= DP_F_ZERO;
|
flags |= DP_F_ZERO;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
state = DP_S_MIN;
|
state = DP_S_MIN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DP_S_MIN:
|
case DP_S_MIN:
|
||||||
if (isdigit((unsigned char)ch))
|
if (isdigit((unsigned char)ch))
|
||||||
{
|
{
|
||||||
min = 10*min + char_to_int (ch);
|
min = 10*min + char_to_int (ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else if (ch == '*')
|
else if (ch == '*')
|
||||||
{
|
{
|
||||||
min = va_arg (args, int);
|
min = va_arg (args, int);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
state = DP_S_DOT;
|
state = DP_S_DOT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_DOT;
|
state = DP_S_DOT;
|
||||||
break;
|
break;
|
||||||
case DP_S_DOT:
|
case DP_S_DOT:
|
||||||
if (ch == '.')
|
if (ch == '.')
|
||||||
{
|
{
|
||||||
state = DP_S_MAX;
|
state = DP_S_MAX;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
break;
|
break;
|
||||||
case DP_S_MAX:
|
case DP_S_MAX:
|
||||||
if (isdigit((unsigned char)ch))
|
if (isdigit((unsigned char)ch))
|
||||||
{
|
{
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
max = 0;
|
max = 0;
|
||||||
max = 10*max + char_to_int (ch);
|
max = 10*max + char_to_int (ch);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
else if (ch == '*')
|
else if (ch == '*')
|
||||||
{
|
{
|
||||||
max = va_arg (args, int);
|
max = va_arg (args, int);
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
state = DP_S_MOD;
|
state = DP_S_MOD;
|
||||||
break;
|
break;
|
||||||
case DP_S_MOD:
|
case DP_S_MOD:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
cflags = DP_C_SHORT;
|
cflags = DP_C_SHORT;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
cflags = DP_C_LONG;
|
cflags = DP_C_LONG;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
if (ch == 'l') { /* It's a long long */
|
if (ch == 'l') { /* It's a long long */
|
||||||
cflags = DP_C_LLONG;
|
cflags = DP_C_LLONG;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
cflags = DP_C_LDOUBLE;
|
cflags = DP_C_LDOUBLE;
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
state = DP_S_CONV;
|
state = DP_S_CONV;
|
||||||
break;
|
break;
|
||||||
case DP_S_CONV:
|
case DP_S_CONV:
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
#ifdef C89PLUS
|
value = va_arg (args, short int);
|
||||||
value = (short int)va_arg (args, int);
|
else if (cflags == DP_C_LONG)
|
||||||
#else
|
value = va_arg (args, long int);
|
||||||
value = va_arg (args, short int);
|
else if (cflags == DP_C_LLONG)
|
||||||
#endif
|
value = va_arg (args, LLONG);
|
||||||
else if (cflags == DP_C_LONG)
|
else
|
||||||
value = va_arg (args, long int);
|
value = va_arg (args, int);
|
||||||
else if (cflags == DP_C_LLONG)
|
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||||
value = va_arg (args, LLONG);
|
break;
|
||||||
else
|
|
||||||
value = va_arg (args, int);
|
|
||||||
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
|
||||||
break;
|
|
||||||
case 'o':
|
case 'o':
|
||||||
flags |= DP_F_UNSIGNED;
|
flags |= DP_F_UNSIGNED;
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
#ifdef C89PLUS
|
value = va_arg (args, unsigned short int);
|
||||||
value = (unsigned short int)va_arg (args, unsigned int);
|
else if (cflags == DP_C_LONG)
|
||||||
#else
|
value = (long)va_arg (args, unsigned long int);
|
||||||
value = va_arg (args, unsigned short int);
|
else if (cflags == DP_C_LLONG)
|
||||||
#endif
|
value = (long)va_arg (args, unsigned LLONG);
|
||||||
else if (cflags == DP_C_LONG)
|
else
|
||||||
value = (long)va_arg (args, unsigned long int);
|
value = (long)va_arg (args, unsigned int);
|
||||||
else if (cflags == DP_C_LLONG)
|
fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
|
||||||
value = (long)va_arg (args, unsigned LLONG);
|
break;
|
||||||
else
|
|
||||||
value = (long)va_arg (args, unsigned int);
|
|
||||||
fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
|
|
||||||
break;
|
|
||||||
case 'u':
|
case 'u':
|
||||||
flags |= DP_F_UNSIGNED;
|
flags |= DP_F_UNSIGNED;
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
#ifdef C89PLUS
|
value = va_arg (args, unsigned short int);
|
||||||
value = (unsigned short int)va_arg (args, unsigned int);
|
else if (cflags == DP_C_LONG)
|
||||||
#else
|
value = (long)va_arg (args, unsigned long int);
|
||||||
value = va_arg (args, unsigned short int);
|
else if (cflags == DP_C_LLONG)
|
||||||
#endif
|
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||||
else if (cflags == DP_C_LONG)
|
else
|
||||||
value = (long)va_arg (args, unsigned long int);
|
value = (long)va_arg (args, unsigned int);
|
||||||
else if (cflags == DP_C_LLONG)
|
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||||
value = (LLONG)va_arg (args, unsigned LLONG);
|
break;
|
||||||
else
|
|
||||||
value = (long)va_arg (args, unsigned int);
|
|
||||||
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
|
||||||
break;
|
|
||||||
case 'X':
|
case 'X':
|
||||||
flags |= DP_F_UP;
|
flags |= DP_F_UP;
|
||||||
goto fallthrough_case_x;
|
|
||||||
case 'x':
|
case 'x':
|
||||||
fallthrough_case_x:
|
flags |= DP_F_UNSIGNED;
|
||||||
flags |= DP_F_UNSIGNED;
|
if (cflags == DP_C_SHORT)
|
||||||
if (cflags == DP_C_SHORT)
|
value = va_arg (args, unsigned short int);
|
||||||
#ifdef C89PLUS
|
else if (cflags == DP_C_LONG)
|
||||||
value = (unsigned short int)va_arg (args, unsigned int);
|
value = (long)va_arg (args, unsigned long int);
|
||||||
#else
|
else if (cflags == DP_C_LLONG)
|
||||||
value = va_arg (args, unsigned short int);
|
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||||
#endif
|
else
|
||||||
else if (cflags == DP_C_LONG)
|
value = (long)va_arg (args, unsigned int);
|
||||||
value = (long)va_arg (args, unsigned long int);
|
fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
|
||||||
else if (cflags == DP_C_LLONG)
|
break;
|
||||||
value = (LLONG)va_arg (args, unsigned LLONG);
|
|
||||||
else
|
|
||||||
value = (long)va_arg (args, unsigned int);
|
|
||||||
fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
|
|
||||||
break;
|
|
||||||
case 'f':
|
case 'f':
|
||||||
if (cflags == DP_C_LDOUBLE)
|
if (cflags == DP_C_LDOUBLE)
|
||||||
fvalue = va_arg (args, LDOUBLE);
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
else
|
else
|
||||||
fvalue = va_arg (args, double);
|
fvalue = va_arg (args, double);
|
||||||
/* um, floating point? */
|
/* um, floating point? */
|
||||||
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
|
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
flags |= DP_F_UP;
|
flags |= DP_F_UP;
|
||||||
goto fallthrough_case_e;
|
|
||||||
case 'e':
|
case 'e':
|
||||||
fallthrough_case_e:
|
if (cflags == DP_C_LDOUBLE)
|
||||||
if (cflags == DP_C_LDOUBLE)
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
fvalue = va_arg (args, LDOUBLE);
|
else
|
||||||
else
|
fvalue = va_arg (args, double);
|
||||||
fvalue = va_arg (args, double);
|
break;
|
||||||
break;
|
|
||||||
case 'G':
|
case 'G':
|
||||||
flags |= DP_F_UP;
|
flags |= DP_F_UP;
|
||||||
goto fallthrough_case_g;
|
|
||||||
case 'g':
|
case 'g':
|
||||||
fallthrough_case_g:
|
if (cflags == DP_C_LDOUBLE)
|
||||||
if (cflags == DP_C_LDOUBLE)
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
fvalue = va_arg (args, LDOUBLE);
|
else
|
||||||
else
|
fvalue = va_arg (args, double);
|
||||||
fvalue = va_arg (args, double);
|
break;
|
||||||
break;
|
|
||||||
case 'c':
|
case 'c':
|
||||||
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
|
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
strvalue = va_arg (args, char *);
|
strvalue = va_arg (args, char *);
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
max = maxlen; /* ie, no max */
|
max = maxlen; /* ie, no max */
|
||||||
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
|
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
strvalue = va_arg (args, void *);
|
strvalue = va_arg (args, void *);
|
||||||
fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
if (cflags == DP_C_SHORT)
|
if (cflags == DP_C_SHORT)
|
||||||
{
|
{
|
||||||
short int *num;
|
short int *num;
|
||||||
num = va_arg (args, short int *);
|
num = va_arg (args, short int *);
|
||||||
*num = currlen;
|
*num = currlen;
|
||||||
|
}
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
{
|
||||||
|
long int *num;
|
||||||
|
num = va_arg (args, long int *);
|
||||||
|
*num = (long int)currlen;
|
||||||
|
}
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
{
|
||||||
|
LLONG *num;
|
||||||
|
num = va_arg (args, LLONG *);
|
||||||
|
*num = (LLONG)currlen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int *num;
|
||||||
|
num = va_arg (args, int *);
|
||||||
|
*num = currlen;
|
||||||
}
|
}
|
||||||
else if (cflags == DP_C_LONG)
|
break;
|
||||||
{
|
|
||||||
long int *num;
|
|
||||||
num = va_arg (args, long int *);
|
|
||||||
*num = (long int)currlen;
|
|
||||||
}
|
|
||||||
else if (cflags == DP_C_LLONG)
|
|
||||||
{
|
|
||||||
LLONG *num;
|
|
||||||
num = va_arg (args, LLONG *);
|
|
||||||
*num = (LLONG)currlen;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int *num;
|
|
||||||
num = va_arg (args, int *);
|
|
||||||
*num = currlen;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '%':
|
case '%':
|
||||||
dopr_outch (buffer, &currlen, maxlen, ch);
|
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
/* not supported yet, treat as next char */
|
/* not supported yet, treat as next char */
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Unknown, skip */
|
/* Unknown, skip */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ch = *format++;
|
ch = *format++;
|
||||||
state = DP_S_DEFAULT;
|
state = DP_S_DEFAULT;
|
||||||
|
@ -446,18 +408,18 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
||||||
break; /* some picky compilers need this */
|
break; /* some picky compilers need this */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (currlen < maxlen - 1)
|
if (currlen < maxlen - 1)
|
||||||
buffer[currlen] = '\0';
|
buffer[currlen] = '\0';
|
||||||
else
|
else
|
||||||
buffer[maxlen - 1] = '\0';
|
buffer[maxlen - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
char *value, int flags, int min, int max)
|
char *value, int flags, int min, int max)
|
||||||
{
|
{
|
||||||
int padlen, strln; /* amount to pad */
|
int padlen, strln; /* amount to pad */
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
{
|
{
|
||||||
value = "<NULL>";
|
value = "<NULL>";
|
||||||
|
@ -465,23 +427,23 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
|
||||||
for (strln = 0; value[strln]; ++strln); /* strlen */
|
for (strln = 0; value[strln]; ++strln); /* strlen */
|
||||||
padlen = min - strln;
|
padlen = min - strln;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justify */
|
padlen = -padlen; /* Left Justify */
|
||||||
|
|
||||||
while ((padlen > 0) && (cnt < max))
|
while ((padlen > 0) && (cnt < max))
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--padlen;
|
--padlen;
|
||||||
++cnt;
|
++cnt;
|
||||||
}
|
}
|
||||||
while (*value && (cnt < max))
|
while (*value && (cnt < max))
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, *value++);
|
dopr_outch (buffer, currlen, maxlen, *value++);
|
||||||
++cnt;
|
++cnt;
|
||||||
}
|
}
|
||||||
while ((padlen < 0) && (cnt < max))
|
while ((padlen < 0) && (cnt < max))
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
++padlen;
|
++padlen;
|
||||||
|
@ -492,7 +454,7 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
|
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
|
||||||
|
|
||||||
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
long value, int base, int min, int max, int flags)
|
long value, int base, int min, int max, int flags)
|
||||||
{
|
{
|
||||||
int signvalue = 0;
|
int signvalue = 0;
|
||||||
unsigned long uvalue;
|
unsigned long uvalue;
|
||||||
|
@ -501,7 +463,7 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
int spadlen = 0; /* amount to space pad */
|
int spadlen = 0; /* amount to space pad */
|
||||||
int zpadlen = 0; /* amount to zero pad */
|
int zpadlen = 0; /* amount to zero pad */
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
|
|
||||||
if (max < 0)
|
if (max < 0)
|
||||||
max = 0;
|
max = 0;
|
||||||
|
|
||||||
|
@ -515,12 +477,12 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||||
signvalue = '+';
|
signvalue = '+';
|
||||||
else
|
else
|
||||||
if (flags & DP_F_SPACE)
|
if (flags & DP_F_SPACE)
|
||||||
signvalue = ' ';
|
signvalue = ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -541,27 +503,27 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
zpadlen = MAX(zpadlen, spadlen);
|
zpadlen = MAX(zpadlen, spadlen);
|
||||||
spadlen = 0;
|
spadlen = 0;
|
||||||
}
|
}
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
spadlen = -spadlen; /* Left Justifty */
|
spadlen = -spadlen; /* Left Justifty */
|
||||||
|
|
||||||
#ifdef DEBUG_SNPRINTF
|
#ifdef DEBUG_SNPRINTF
|
||||||
printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
|
printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
|
||||||
zpadlen, spadlen, min, max, place);
|
zpadlen, spadlen, min, max, place);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Spaces */
|
/* Spaces */
|
||||||
while (spadlen > 0)
|
while (spadlen > 0)
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--spadlen;
|
--spadlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sign */
|
/* Sign */
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
/* Zeros */
|
/* Zeros */
|
||||||
if (zpadlen > 0)
|
if (zpadlen > 0)
|
||||||
{
|
{
|
||||||
while (zpadlen > 0)
|
while (zpadlen > 0)
|
||||||
{
|
{
|
||||||
|
@ -571,9 +533,9 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Digits */
|
/* Digits */
|
||||||
while (place > 0)
|
while (place > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
||||||
|
|
||||||
/* Left Justified spaces */
|
/* Left Justified spaces */
|
||||||
while (spadlen < 0) {
|
while (spadlen < 0) {
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
@ -581,7 +543,6 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_ABS_VAL
|
|
||||||
static LDOUBLE abs_val (LDOUBLE value)
|
static LDOUBLE abs_val (LDOUBLE value)
|
||||||
{
|
{
|
||||||
LDOUBLE result = value;
|
LDOUBLE result = value;
|
||||||
|
@ -591,13 +552,7 @@ static LDOUBLE abs_val (LDOUBLE value)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_FCVT
|
|
||||||
/* The two routines that may get defined below are only used if we also don't
|
|
||||||
* have a fcvt() in the system. Defining and not using the routines may be a
|
|
||||||
* warning (fatal with -Werror), so we hide them here. */
|
|
||||||
# ifndef HAVE_POW10
|
|
||||||
static LDOUBLE pow10 (int exp)
|
static LDOUBLE pow10 (int exp)
|
||||||
{
|
{
|
||||||
LDOUBLE result = 1;
|
LDOUBLE result = 1;
|
||||||
|
@ -607,12 +562,10 @@ static LDOUBLE pow10 (int exp)
|
||||||
result *= 10;
|
result *= 10;
|
||||||
exp--;
|
exp--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef HAVE_ROUND
|
|
||||||
static long round (LDOUBLE value)
|
static long round (LDOUBLE value)
|
||||||
{
|
{
|
||||||
long intpart;
|
long intpart;
|
||||||
|
@ -624,11 +577,9 @@ static long round (LDOUBLE value)
|
||||||
|
|
||||||
return intpart;
|
return intpart;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif /* HAVE_FCVT */
|
|
||||||
|
|
||||||
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
LDOUBLE fvalue, int min, int max, int flags)
|
LDOUBLE fvalue, int min, int max, int flags)
|
||||||
{
|
{
|
||||||
int signvalue = 0;
|
int signvalue = 0;
|
||||||
LDOUBLE ufvalue;
|
LDOUBLE ufvalue;
|
||||||
|
@ -650,14 +601,12 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
int iplace = 0;
|
int iplace = 0;
|
||||||
int fplace = 0;
|
int fplace = 0;
|
||||||
int padlen = 0; /* amount to pad */
|
int padlen = 0; /* amount to pad */
|
||||||
int zpadlen = 0;
|
int zpadlen = 0;
|
||||||
#ifndef HAVE_FCVT
|
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
long intpart;
|
long intpart;
|
||||||
long fracpart;
|
long fracpart;
|
||||||
#endif
|
|
||||||
|
/*
|
||||||
/*
|
|
||||||
* AIX manpage says the default is 0, but Solaris says the default
|
* AIX manpage says the default is 0, but Solaris says the default
|
||||||
* is 6, and sprintf on AIX defaults to 6
|
* is 6, and sprintf on AIX defaults to 6
|
||||||
*/
|
*/
|
||||||
|
@ -673,7 +622,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
signvalue = '+';
|
signvalue = '+';
|
||||||
else
|
else
|
||||||
if (flags & DP_F_SPACE)
|
if (flags & DP_F_SPACE)
|
||||||
signvalue = ' ';
|
signvalue = ' ';
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||||
|
@ -682,8 +631,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
#ifndef HAVE_FCVT
|
#ifndef HAVE_FCVT
|
||||||
intpart = (long)ufvalue;
|
intpart = (long)ufvalue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sorry, we only support 9 digits past the decimal because of our
|
* Sorry, we only support 9 digits past the decimal because of our
|
||||||
* conversion method
|
* conversion method
|
||||||
*/
|
*/
|
||||||
if (max > 9)
|
if (max > 9)
|
||||||
|
@ -701,8 +650,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_SNPRINTF
|
#ifdef DEBUG_SNPRINTF
|
||||||
printf("fmtfp: %g %d.%d min=%d max=%d\n",
|
printf("fmtfp: %g %d.%d min=%d max=%d\n",
|
||||||
(double)fvalue, intpart, fracpart, min, max);
|
(double)fvalue, intpart, fracpart, min, max);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Convert integer part */
|
/* Convert integer part */
|
||||||
|
@ -758,38 +707,38 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
fconvert[fplace++] = result[--r_length];
|
fconvert[fplace++] = result[--r_length];
|
||||||
|
|
||||||
while ((dec_pt < 0) && (fplace < max)) {
|
while ((dec_pt < 0) && (fplace < max)) {
|
||||||
fconvert[fplace++] = '0';
|
fconvert[fplace++] = '0';
|
||||||
dec_pt++;
|
dec_pt++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
iplace=0;
|
iplace=0;
|
||||||
for(c=dec_pt; c; iconvert[iplace++] = result[--c])
|
for(c=dec_pt; c; iconvert[iplace++] = result[--c])
|
||||||
;
|
;
|
||||||
iconvert[iplace] = '\0';
|
iconvert[iplace] = '\0';
|
||||||
|
|
||||||
result += dec_pt;
|
result += dec_pt;
|
||||||
fplace = 0;
|
fplace = 0;
|
||||||
|
|
||||||
for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c])
|
for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
#endif /* fcvt */
|
#endif /* fcvt */
|
||||||
|
|
||||||
/* -1 for decimal point, another -1 if we are printing a sign */
|
/* -1 for decimal point, another -1 if we are printing a sign */
|
||||||
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||||
zpadlen = max - fplace;
|
zpadlen = max - fplace;
|
||||||
if (zpadlen < 0)
|
if (zpadlen < 0)
|
||||||
zpadlen = 0;
|
zpadlen = 0;
|
||||||
if (padlen < 0)
|
if (padlen < 0)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
if (flags & DP_F_MINUS)
|
if (flags & DP_F_MINUS)
|
||||||
padlen = -padlen; /* Left Justifty */
|
padlen = -padlen; /* Left Justifty */
|
||||||
|
|
||||||
if ((flags & DP_F_ZERO) && (padlen > 0))
|
if ((flags & DP_F_ZERO) && (padlen > 0))
|
||||||
{
|
{
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
--padlen;
|
--padlen;
|
||||||
|
@ -806,10 +755,10 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
--padlen;
|
--padlen;
|
||||||
}
|
}
|
||||||
if (signvalue)
|
if (signvalue)
|
||||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
while (iplace > 0)
|
while (iplace > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -822,10 +771,10 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
* char to print out.
|
* char to print out.
|
||||||
*/
|
*/
|
||||||
if (max > 0) {
|
if (max > 0) {
|
||||||
dopr_outch (buffer, currlen, maxlen, '.');
|
dopr_outch (buffer, currlen, maxlen, '.');
|
||||||
|
|
||||||
while (fplace > 0)
|
while (fplace > 0)
|
||||||
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (zpadlen > 0)
|
while (zpadlen > 0)
|
||||||
|
@ -834,7 +783,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
--zpadlen;
|
--zpadlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (padlen < 0)
|
while (padlen < 0)
|
||||||
{
|
{
|
||||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
++padlen;
|
++padlen;
|
||||||
|
@ -871,7 +820,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||||
char *fmt;
|
char *fmt;
|
||||||
#endif
|
#endif
|
||||||
VA_LOCAL_DECL;
|
VA_LOCAL_DECL;
|
||||||
|
|
||||||
VA_START (fmt);
|
VA_START (fmt);
|
||||||
VA_SHIFT (str, char *);
|
VA_SHIFT (str, char *);
|
||||||
VA_SHIFT (count, size_t );
|
VA_SHIFT (count, size_t );
|
||||||
|
@ -911,7 +860,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||||
"%.1f",
|
"%.1f",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
||||||
0.9996, 1.996, 4.136, 6442452944.1234, 0};
|
0.9996, 1.996, 4.136, 6442452944.1234, 0};
|
||||||
char *int_fmt[] = {
|
char *int_fmt[] = {
|
||||||
"%-1.5d",
|
"%-1.5d",
|
||||||
|
@ -939,9 +888,9 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||||
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
||||||
if (strcmp (buf1, buf2))
|
if (strcmp (buf1, buf2))
|
||||||
{
|
{
|
||||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
fp_fmt[x], buf1, buf2);
|
fp_fmt[x], buf1, buf2);
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
@ -953,9 +902,9 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||||
sprintf (buf2, int_fmt[x], int_nums[y]);
|
sprintf (buf2, int_fmt[x], int_nums[y]);
|
||||||
if (strcmp (buf1, buf2))
|
if (strcmp (buf1, buf2))
|
||||||
{
|
{
|
||||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
int_fmt[x], buf1, buf2);
|
int_fmt[x], buf1, buf2);
|
||||||
fail++;
|
fail++;
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -126,10 +124,7 @@ static void st_tree_node_add(st_tree_t **nptr, st_tree_t *sptr)
|
||||||
*nptr = sptr;
|
*nptr = sptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove a variable from a tree
|
/* remove a variable from a tree */
|
||||||
* except for variables with ST_FLAG_IMMUTABLE
|
|
||||||
* (for override.* to survive) per issue #737
|
|
||||||
*/
|
|
||||||
int state_delinfo(st_tree_t **nptr, const char *var)
|
int state_delinfo(st_tree_t **nptr, const char *var)
|
||||||
{
|
{
|
||||||
while (*nptr) {
|
while (*nptr) {
|
||||||
|
@ -146,11 +141,6 @@ int state_delinfo(st_tree_t **nptr, const char *var)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->flags & ST_FLAG_IMMUTABLE) {
|
|
||||||
upsdebugx(6, "%s: not deleting immutable variable [%s]", __func__, var);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* whatever is on the left, hang it off current right */
|
/* whatever is on the left, hang it off current right */
|
||||||
st_tree_node_add(&node->right, node->left);
|
st_tree_node_add(&node->right, node->left);
|
||||||
|
|
||||||
|
@ -163,7 +153,7 @@ int state_delinfo(st_tree_t **nptr, const char *var)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* not found */
|
return 0; /* not found */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* interface */
|
/* interface */
|
||||||
|
|
||||||
|
@ -228,7 +218,7 @@ static int st_tree_enum_add(enum_t **list, const char *enc)
|
||||||
list = &(*list)->next;
|
list = &(*list)->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* duplicate */
|
return 0; /* duplicate */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +303,7 @@ int state_addrange(st_tree_t *root, const char *var, const int min, const int ma
|
||||||
int state_setaux(st_tree_t *root, const char *var, const char *auxs)
|
int state_setaux(st_tree_t *root, const char *var, const char *auxs)
|
||||||
{
|
{
|
||||||
st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
long aux;
|
int aux;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -364,7 +354,7 @@ int state_getflags(st_tree_t *root, const char *var)
|
||||||
return sttmp->flags;
|
return sttmp->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
long state_getaux(st_tree_t *root, const char *var)
|
int state_getaux(st_tree_t *root, const char *var)
|
||||||
{
|
{
|
||||||
st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
|
@ -406,9 +396,9 @@ const range_t *state_getrangelist(st_tree_t *root, const char *var)
|
||||||
return sttmp->range_list;
|
return sttmp->range_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void state_setflags(st_tree_t *root, const char *var, size_t numflags, char **flag)
|
void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag)
|
||||||
{
|
{
|
||||||
size_t i;
|
int i;
|
||||||
st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
|
@ -434,11 +424,6 @@ void state_setflags(st_tree_t *root, const char *var, size_t numflags, char **fl
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcasecmp(flag[i], "NUMBER")) {
|
|
||||||
sttmp->flags |= ST_FLAG_NUMBER;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
upsdebugx(2, "Unrecognized flag [%s]", flag[i]);
|
upsdebugx(2, "Unrecognized flag [%s]", flag[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
60
common/str.c
60
common/str.c
|
@ -20,21 +20,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first */
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
|
||||||
#include <string.h> /* for strdup() and many others */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_STRINGS_H
|
|
||||||
#include <strings.h> /* for strncasecmp() and strcasecmp() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "nut_stdint.h"
|
|
||||||
#include "str.h"
|
#include "str.h"
|
||||||
|
|
||||||
char *str_trim(char *string, const char character)
|
char *str_trim(char *string, const char character)
|
||||||
|
@ -118,7 +109,7 @@ char *str_ltrim_space(char *string)
|
||||||
|
|
||||||
while (
|
while (
|
||||||
*string != '\0' &&
|
*string != '\0' &&
|
||||||
isspace((size_t)*string)
|
isspace(*string)
|
||||||
)
|
)
|
||||||
memmove(string, string + 1, strlen(string));
|
memmove(string, string + 1, strlen(string));
|
||||||
|
|
||||||
|
@ -139,7 +130,7 @@ char *str_rtrim_space(char *string)
|
||||||
|
|
||||||
while (
|
while (
|
||||||
ptr >= string &&
|
ptr >= string &&
|
||||||
isspace((size_t)*ptr)
|
isspace(*ptr)
|
||||||
)
|
)
|
||||||
*ptr-- = '\0';
|
*ptr-- = '\0';
|
||||||
|
|
||||||
|
@ -261,7 +252,7 @@ int str_to_short(const char *string, short *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (short)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +273,7 @@ int str_to_short_strict(const char *string, short *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (short)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +291,7 @@ int str_to_ushort(const char *string, unsigned short *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (unsigned short)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,13 +309,13 @@ int str_to_ushort_strict(const char *string, unsigned short *number, const int b
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (unsigned short)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int str_to_int(const char *string, int *number, const int base)
|
int str_to_int(const char *string, int *number, const int base)
|
||||||
{
|
{
|
||||||
long num; /* long >= int, make sure we fit well */
|
long num;
|
||||||
|
|
||||||
*number = 0;
|
*number = 0;
|
||||||
|
|
||||||
|
@ -339,13 +330,13 @@ int str_to_int(const char *string, int *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (int)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int str_to_int_strict(const char *string, int *number, const int base)
|
int str_to_int_strict(const char *string, int *number, const int base)
|
||||||
{
|
{
|
||||||
long num; /* long >= int, make sure we fit well */
|
long num;
|
||||||
|
|
||||||
*number = 0;
|
*number = 0;
|
||||||
|
|
||||||
|
@ -360,13 +351,13 @@ int str_to_int_strict(const char *string, int *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (int)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int str_to_uint(const char *string, unsigned int *number, const int base)
|
int str_to_uint(const char *string, unsigned int *number, const int base)
|
||||||
{
|
{
|
||||||
unsigned long num; /* long >= int, make sure we fit well */
|
unsigned long num;
|
||||||
|
|
||||||
*number = 0;
|
*number = 0;
|
||||||
|
|
||||||
|
@ -378,13 +369,13 @@ int str_to_uint(const char *string, unsigned int *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (unsigned int)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int str_to_uint_strict(const char *string, unsigned int *number, const int base)
|
int str_to_uint_strict(const char *string, unsigned int *number, const int base)
|
||||||
{
|
{
|
||||||
unsigned long num; /* long >= int, make sure we fit well */
|
unsigned long num;
|
||||||
|
|
||||||
*number = 0;
|
*number = 0;
|
||||||
|
|
||||||
|
@ -396,7 +387,7 @@ int str_to_uint_strict(const char *string, unsigned int *number, const int base)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*number = (unsigned int)num;
|
*number = num;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,7 +429,7 @@ int str_to_long_strict(const char *string, long *number, const int base)
|
||||||
if (
|
if (
|
||||||
string == NULL ||
|
string == NULL ||
|
||||||
*string == '\0' ||
|
*string == '\0' ||
|
||||||
isspace((size_t)*string)
|
isspace(*string)
|
||||||
) {
|
) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -504,7 +495,7 @@ int str_to_ulong_strict(const char *string, unsigned long *number, const int bas
|
||||||
*string == '\0' ||
|
*string == '\0' ||
|
||||||
*string == '+' ||
|
*string == '+' ||
|
||||||
*string == '-' ||
|
*string == '-' ||
|
||||||
isspace((size_t)*string)
|
isspace(*string)
|
||||||
) {
|
) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -568,7 +559,7 @@ int str_to_double_strict(const char *string, double *number, const int base)
|
||||||
if (
|
if (
|
||||||
string == NULL ||
|
string == NULL ||
|
||||||
*string == '\0' ||
|
*string == '\0' ||
|
||||||
isspace((size_t)*string)
|
isspace(*string)
|
||||||
) {
|
) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -614,16 +605,3 @@ int str_to_double_strict(const char *string, double *number, const int base)
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int str_ends_with(const char *s, const char *suff) {
|
|
||||||
size_t slen;
|
|
||||||
size_t sufflen;
|
|
||||||
|
|
||||||
if (!s) return 0; /* null string does not end with anything */
|
|
||||||
if (!suff) return 1; /* null suffix tails anything */
|
|
||||||
|
|
||||||
slen = strlen(s);
|
|
||||||
sufflen = strlen(suff);
|
|
||||||
|
|
||||||
return (slen >= sufflen) && (!memcmp(s + slen - sufflen, suff, sufflen));
|
|
||||||
}
|
|
||||||
|
|
|
@ -11,16 +11,6 @@ char *strerror(int errnum)
|
||||||
{
|
{
|
||||||
static char buf[32];
|
static char buf[32];
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK
|
|
||||||
#pragma GCC diagnostic ignored "-Wunreachable-code-break"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic ignored "-Wunreachable-code"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (errnum) {
|
switch (errnum) {
|
||||||
#if defined (EPERM)
|
#if defined (EPERM)
|
||||||
case EPERM:
|
case EPERM:
|
||||||
|
@ -508,11 +498,6 @@ char *strerror(int errnum)
|
||||||
/* Fallback: just print the error number */
|
/* Fallback: just print the error number */
|
||||||
snprintf(buf, sizeof(buf), "Error %d", errnum);
|
snprintf(buf, sizeof(buf), "Error %d", errnum);
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_STRERROR */
|
#endif /* HAVE_STRERROR */
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be the first header */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -31,14 +29,14 @@
|
||||||
static char *ups_section;
|
static char *ups_section;
|
||||||
|
|
||||||
/* handle arguments separated by parseconf */
|
/* handle arguments separated by parseconf */
|
||||||
static void conf_args(size_t numargs, char **arg)
|
static void conf_args(int numargs, char **arg)
|
||||||
{
|
{
|
||||||
if (numargs < 1)
|
if (numargs < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* look for section headers - [upsname] */
|
/* look for section headers - [upsname] */
|
||||||
if ((arg[0][0] == '[') && (arg[0][strlen(arg[0])-1] == ']')) {
|
if ((arg[0][0] == '[') && (arg[0][strlen(arg[0])-1] == ']')) {
|
||||||
|
|
||||||
free(ups_section);
|
free(ups_section);
|
||||||
|
|
||||||
arg[0][strlen(arg[0])-1] = '\0';
|
arg[0][strlen(arg[0])-1] = '\0';
|
||||||
|
|
|
@ -15,27 +15,3 @@ endif
|
||||||
|
|
||||||
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
||||||
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample
|
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample
|
||||||
|
|
||||||
SPELLCHECK_SRC = $(dist_sysconf_DATA) \
|
|
||||||
upssched.conf.sample.in upsmon.conf.sample.in
|
|
||||||
|
|
||||||
# NOTE: Due to portability, we do not use a GNU percent-wildcard extension:
|
|
||||||
#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here
|
|
||||||
# by a wildcard target in case the make implementation can put the two together.
|
|
||||||
*-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
|
|
||||||
.sample.sample-spellchecked:
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
.in.in-spellchecked:
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
spellcheck spellcheck-interactive spellcheck-sortdict:
|
|
||||||
$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
CLEANFILES = *.pdf *.html *-spellchecked
|
|
||||||
|
|
102
conf/Makefile.in
102
conf/Makefile.in
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -17,17 +17,7 @@
|
||||||
# Network UPS Tools: conf
|
# Network UPS Tools: conf
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -92,24 +82,21 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = conf
|
subdir = conf
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/upsmon.conf.sample.in \
|
||||||
|
$(srcdir)/upssched.conf.sample.in \
|
||||||
|
$(am__dist_sysconf_DATA_DIST)
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -118,18 +105,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_sysconf_DATA_DIST) \
|
|
||||||
$(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample
|
CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample
|
||||||
|
@ -187,9 +167,6 @@ am__uninstall_files_from_dir = { \
|
||||||
am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
|
am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
|
||||||
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
|
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
|
||||||
$(srcdir)/upsmon.conf.sample.in \
|
|
||||||
$(srcdir)/upssched.conf.sample.in
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
A2X = @A2X@
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
|
@ -198,7 +175,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -209,7 +185,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -223,7 +198,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -236,7 +210,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -254,8 +227,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -266,29 +237,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -308,9 +271,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -324,7 +284,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -342,7 +301,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -356,9 +314,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -384,14 +339,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -411,15 +364,9 @@ CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \
|
||||||
@WITH_CGI_TRUE@CGI_INSTALL = $(CGIPUB)
|
@WITH_CGI_TRUE@CGI_INSTALL = $(CGIPUB)
|
||||||
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
|
||||||
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample
|
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample
|
||||||
SPELLCHECK_SRC = $(dist_sysconf_DATA) \
|
|
||||||
upssched.conf.sample.in upsmon.conf.sample.in
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
CLEANFILES = *.pdf *.html *-spellchecked
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .in .in-spellchecked .sample .sample-spellchecked
|
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
|
@ -432,13 +379,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu conf/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu conf/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu conf/Makefile
|
$(AUTOMAKE) --gnu conf/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -508,10 +456,7 @@ ctags CTAGS:
|
||||||
cscope cscopelist:
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
@ -570,7 +515,6 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
@ -579,7 +523,6 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
@ -663,25 +606,6 @@ uninstall-am: uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA
|
||||||
uninstall-am uninstall-dist_sysconfDATA \
|
uninstall-am uninstall-dist_sysconfDATA \
|
||||||
uninstall-nodist_sysconfDATA
|
uninstall-nodist_sysconfDATA
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE: Due to portability, we do not use a GNU percent-wildcard extension:
|
|
||||||
#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here
|
|
||||||
# by a wildcard target in case the make implementation can put the two together.
|
|
||||||
*-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
|
|
||||||
.sample.sample-spellchecked:
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
.in.in-spellchecked:
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
spellcheck spellcheck-interactive spellcheck-sortdict:
|
|
||||||
$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
# MONITOR <system> "<host description>"
|
# MONITOR <system> "<host description>"
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
#
|
#
|
||||||
# MONITOR myups@localhost "Local UPS"
|
# MONITOR myups@localhost "Local UPS"
|
||||||
# MONITOR su2200@10.64.1.1 "Finance department"
|
# MONITOR su2200@10.64.1.1 "Finance department"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# The values of MODE can be:
|
# The values of MODE can be:
|
||||||
# - none: NUT is not configured, or use the Integrated Power Management, or use
|
# - none: NUT is not configured, or use the Integrated Power Management, or use
|
||||||
# some external system to startup NUT components. So nothing is to be started.
|
# some external system to startup NUT components. So nothing is to be started.
|
||||||
# - standalone: This mode address a local only configuration, with 1 UPS
|
# - standalone: This mode address a local only configuration, with 1 UPS
|
||||||
# protecting the local system. This implies to start the 3 NUT layers (driver,
|
# protecting the local system. This implies to start the 3 NUT layers (driver,
|
||||||
# upsd and upsmon) and the matching configuration files. This mode can also
|
# upsd and upsmon) and the matching configuration files. This mode can also
|
||||||
# address UPS redundancy.
|
# address UPS redundancy.
|
||||||
|
@ -26,14 +26,7 @@
|
||||||
# - netclient: this mode only requires upsmon.
|
# - netclient: this mode only requires upsmon.
|
||||||
#
|
#
|
||||||
# IMPORTANT NOTE:
|
# IMPORTANT NOTE:
|
||||||
# This file is intended to be sourced by standard POSIX shell scripts (so
|
# This file is intended to be sourced by shell scripts.
|
||||||
# there is no guaranteed `export VAR=VAL` syntax) and by systemd on Linux.
|
|
||||||
# You MUST NOT use spaces around the equal sign!
|
# You MUST NOT use spaces around the equal sign!
|
||||||
|
|
||||||
MODE=none
|
MODE=none
|
||||||
|
|
||||||
# Uncomment this to allow starting the service even if ups.conf has no device
|
|
||||||
# sections at the moment. This environment variable overrides the built-in
|
|
||||||
# "false" and an optional same-named default flag that can be set in upsd.conf:
|
|
||||||
#ALLOW_NO_DEVICE=true
|
|
||||||
#export ALLOW_NO_DEVICE
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# --- SECURITY NOTE ---
|
# --- SECURITY NOTE ---
|
||||||
#
|
#
|
||||||
# If you use snmp-ups and set a community string in here, you
|
# If you use snmp-ups and set a community string in here, you
|
||||||
# will have to secure this file to keep other users from obtaining
|
# will have to secure this file to keep other users from obtaining
|
||||||
# that string. It needs to be readable by upsdrvctl and any drivers,
|
# that string. It needs to be readable by upsdrvctl and any drivers,
|
||||||
# and by upsd.
|
# and by upsd.
|
||||||
|
@ -14,98 +14,69 @@
|
||||||
# USB devices and SNMP devices are also supported.
|
# USB devices and SNMP devices are also supported.
|
||||||
#
|
#
|
||||||
# This file is used by upsdrvctl to start and stop your driver(s), and
|
# This file is used by upsdrvctl to start and stop your driver(s), and
|
||||||
# is also used by upsd to determine which drivers to monitor. The
|
# is also used by upsd to determine which drivers to monitor. The
|
||||||
# drivers themselves also read this file for configuration directives.
|
# drivers themselves also read this file for configuration directives.
|
||||||
#
|
#
|
||||||
# The general form is:
|
# The general form is:
|
||||||
#
|
#
|
||||||
# [upsname]
|
# [upsname]
|
||||||
# driver = <drivername>
|
# driver = <drivername>
|
||||||
# port = <portname>
|
# port = <portname>
|
||||||
# < any other directives here >
|
# < any other directives here >
|
||||||
#
|
#
|
||||||
# The section header ([upsname]) can be just about anything as long as
|
# The section header ([upsname]) can be just about anything as long as
|
||||||
# it is a single word inside brackets. upsd uses this to uniquely
|
# it is a single word inside brackets. upsd uses this to uniquely
|
||||||
# identify a UPS on this system.
|
# identify a UPS on this system.
|
||||||
#
|
#
|
||||||
# If you have a UPS called snoopy, your section header would be "[snoopy]".
|
# If you have a UPS called snoopy, your section header would be "[snoopy]".
|
||||||
# On a system called "doghouse", the line in your upsmon.conf to monitor
|
# On a system called "doghouse", the line in your upsmon.conf to monitor
|
||||||
# and manage it would look something like this:
|
# it would look something like this:
|
||||||
#
|
#
|
||||||
# MONITOR snoopy@doghouse 1 upsmonuser mypassword primary
|
# MONITOR snoopy@doghouse 1 upsmonuser mypassword master
|
||||||
#
|
#
|
||||||
# It might look like this if monitoring in "secondary" mode (without any
|
# It might look like this if monitoring in slave mode:
|
||||||
# ability to directly manage the UPS) from a different system:
|
|
||||||
#
|
#
|
||||||
# MONITOR snoopy@doghouse 1 upsmonuser mypassword secondary
|
# MONITOR snoopy@doghouse 1 upsmonuser mypassword slave
|
||||||
#
|
#
|
||||||
# Configuration directives
|
# Configuration directives
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
#
|
||||||
|
# These directives are common to all drivers that support ups.conf:
|
||||||
#
|
#
|
||||||
# These directives are used by upsdrvctl only and should be specified outside
|
# driver: REQUIRED. Specify the program to run to talk to this UPS.
|
||||||
# of a driver definition:
|
# apcsmart, bestups, and sec are some examples.
|
||||||
#
|
#
|
||||||
# maxretry: OPTIONAL. Specify the number of attempts to start the driver(s),
|
# port: REQUIRED. The serial port where your UPS is connected.
|
||||||
# in case of failure, before giving up. A delay of 'retrydelay' is
|
# /dev/ttyS0 is usually the first port on Linux boxes, for example.
|
||||||
# inserted between each attempt. Caution should be taken when using
|
|
||||||
# this option, since it can impact the time taken by your system to
|
|
||||||
# start.
|
|
||||||
#
|
#
|
||||||
# The built-in default is 1 attempt.
|
# sdorder: optional. When you have multiple UPSes on your system, you
|
||||||
|
# usually need to turn them off in a certain order. upsdrvctl
|
||||||
|
# shuts down all the 0s, then the 1s, 2s, and so on. To exclude
|
||||||
|
# a UPS from the shutdown sequence, set this to -1.
|
||||||
#
|
#
|
||||||
# retrydelay: OPTIONAL. Specify the delay between each restart attempt of the
|
# The default value for this parameter is 0.
|
||||||
# driver(s), as specified by 'maxretry'. Caution should be taken
|
|
||||||
# when using this option, since it can impact the time taken by your
|
|
||||||
# system to start.
|
|
||||||
#
|
#
|
||||||
# The default is 5 seconds.
|
# nolock: optional, and not recommended for use in this file.
|
||||||
#
|
#
|
||||||
# chroot: OPTIONAL. Used for securing. See man page for details.
|
# If you put nolock in here, the driver will not lock the
|
||||||
|
# serial port every time it starts. This may allow other
|
||||||
|
# processes to seize the port if you start more than one by
|
||||||
|
# mistake.
|
||||||
#
|
#
|
||||||
# driverpath: OPTIONAL. Used for custom setups. See man page for details.
|
# This is only intended to be used on systems where locking
|
||||||
|
# absolutely must be disabled for the software to work.
|
||||||
#
|
#
|
||||||
# nowait: OPTIONAL. Tell upsdrvctl to not wait at all for the driver(s)
|
# maxstartdelay: optional. This can be set as a global variable
|
||||||
# to execute the requested command. Fire and forget.
|
|
||||||
#
|
|
||||||
# pollinterval: OPTIONAL. The status of the UPS will be refreshed after a
|
|
||||||
# maximum delay which is controlled by this setting (default
|
|
||||||
# 2 seconds). This may be useful if the driver is creating too
|
|
||||||
# much of a load on your system or network.
|
|
||||||
# Note that some drivers also have an option called *pollfreq*
|
|
||||||
# which controls how frequently some of the less critical
|
|
||||||
# parameters are polled. See respective driver man pages.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set maxretry to 3 by default, this should mitigate race with slow devices:
|
|
||||||
maxretry = 3
|
|
||||||
|
|
||||||
# These directives can be set outside and inside a driver definition, with
|
|
||||||
# slightly different meanings per context:
|
|
||||||
#
|
|
||||||
# maxstartdelay: OPTIONAL. This can be set as a global variable
|
|
||||||
# above your first UPS definition and it can also be
|
# above your first UPS definition and it can also be
|
||||||
# set in a UPS section. This value controls how long
|
# set in a UPS section. This value controls how long
|
||||||
# upsdrvctl will wait for the driver to finish starting.
|
# upsdrvctl will wait for the driver to finish starting.
|
||||||
# This keeps your system from getting stuck due to a
|
# This keeps your system from getting stuck due to a
|
||||||
# broken driver or UPS.
|
# broken driver or UPS.
|
||||||
|
#
|
||||||
# The default is 45 seconds.
|
# The default is 45 seconds.
|
||||||
#
|
#
|
||||||
# debug_min: OPTIONAL. Specify a minimum debug level for all driver daemons
|
# synchronous: optional. The driver work by default in asynchronous
|
||||||
# (when specified at global level), or for this driver daemon
|
# mode (i.e *synchronous=no*). This means that all data
|
||||||
# (when specified in a driver section), e.g. for troubleshooting
|
|
||||||
# a deployment. This does not directly impact the foreground or
|
|
||||||
# background running mode. If both the global and driver level
|
|
||||||
# `debug_min` are set, the driver-level setting takes precedence.
|
|
||||||
# Command-line option `-D` can only increase this verbosity level.
|
|
||||||
#
|
|
||||||
# user, group: OPTIONAL. Overrides the compiled-in (also global-section,
|
|
||||||
# when used in driver section) default unprivileged user/group
|
|
||||||
# name for NUT device driver. Impacts access rights used for
|
|
||||||
# the socket file access (group) and communication ports (user).
|
|
||||||
#
|
|
||||||
# synchronous: OPTIONAL. The driver work by default in asynchronous
|
|
||||||
# mode (like *no*) with fallback to synchronous if sending
|
|
||||||
# fails (i.e *synchronous=auto*). This means that all data
|
|
||||||
# are pushed by the driver on the communication socket to
|
# are pushed by the driver on the communication socket to
|
||||||
# upsd (Unix socket on Unix, Named pipe on Windows) without
|
# upsd (Unix socket on Unix, Named pipe on Windows) without
|
||||||
# waiting for these data to be actually consumed. With
|
# waiting for these data to be actually consumed. With
|
||||||
|
@ -120,63 +91,9 @@ maxretry = 3
|
||||||
# The default is 'no' (i.e. asynchronous mode) for backward
|
# The default is 'no' (i.e. asynchronous mode) for backward
|
||||||
# compatibility of the driver behavior.
|
# compatibility of the driver behavior.
|
||||||
#
|
#
|
||||||
|
|
||||||
# These directives are common to all drivers that support ups.conf:
|
|
||||||
#
|
|
||||||
# driver: REQUIRED. Specify the program to run to talk to this UPS.
|
|
||||||
# apcsmart, bestups, and sec are some examples.
|
|
||||||
#
|
|
||||||
# port: REQUIRED. The serial port where your UPS is connected.
|
|
||||||
# /dev/ttyS0 is usually the first port on Linux boxes, for example.
|
|
||||||
#
|
|
||||||
# sdorder: OPTIONAL. When you have multiple UPSes on your system, you
|
|
||||||
# usually need to turn them off in a certain order. upsdrvctl
|
|
||||||
# shuts down all the 0s, then the 1s, 2s, and so on. To exclude
|
|
||||||
# a UPS from the shutdown sequence, set this to -1.
|
|
||||||
#
|
|
||||||
# The default value for this parameter is 0.
|
|
||||||
#
|
|
||||||
# desc: optional, to keep a note of the UPS purpose, location, etc.
|
|
||||||
#
|
|
||||||
# nolock: optional, and not recommended for use in this file.
|
|
||||||
#
|
|
||||||
# If you put nolock in here, the driver will not lock the
|
|
||||||
# serial port every time it starts. This may allow other
|
|
||||||
# processes to seize the port if you start more than one by
|
|
||||||
# mistake.
|
|
||||||
#
|
|
||||||
# This is only intended to be used on systems where locking
|
|
||||||
# absolutely must be disabled for the software to work.
|
|
||||||
#
|
|
||||||
# ignorelb: OPTIONAL. Ignore low battery condition reported by device,
|
|
||||||
# and evaluate remaining battery charge or runtime instead.
|
|
||||||
# See man page for details.
|
|
||||||
#
|
|
||||||
# usb_set_altinterface(=num): OPTIONAL. Require that NUT calls this method
|
|
||||||
# to set the interface, even if 0 (default). Some devices require
|
|
||||||
# the call to initialize; others however can get stuck due to it -
|
|
||||||
# so it is not called by default. Yet others can be composite
|
|
||||||
# devices which use a non-zero interface to represent the UPS.
|
|
||||||
#
|
|
||||||
# default.<variable>: OPTIONAL. Set a default value for <variable> which is
|
|
||||||
# used in case the UPS doesn't provide a value, but which will be
|
|
||||||
# overwritten if a value is available from the UPS, e.g.:
|
|
||||||
# default.input.voltage.nominal = 230
|
|
||||||
# will report the nominal input voltage to be 230, unless the UPS
|
|
||||||
# eventually tells us differently.
|
|
||||||
#
|
|
||||||
# override.<variable>: OPTIONAL. Set a value for <value> that overrides
|
|
||||||
# (for NUT) any value that may be read from the UPS.
|
|
||||||
# Used for overriding values from the UPS that are clearly wrong
|
|
||||||
# (e.g. some devices report wrong values for battery voltage):
|
|
||||||
# override.battery.voltage.nominal = 12
|
|
||||||
# Use with caution! This will only change the appearance of the
|
|
||||||
# variable to the outside world (and NUT calculations), internally
|
|
||||||
# in the UPS the original value is used.
|
|
||||||
#
|
|
||||||
# Anything else is passed through to the hardware-specific part of
|
# Anything else is passed through to the hardware-specific part of
|
||||||
# the driver.
|
# the driver.
|
||||||
#
|
#
|
||||||
# Examples
|
# Examples
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
|
@ -184,19 +101,19 @@ maxretry = 3
|
||||||
# driver on /dev/ttyS0 is:
|
# driver on /dev/ttyS0 is:
|
||||||
#
|
#
|
||||||
# [powerpal]
|
# [powerpal]
|
||||||
# driver = blazer_ser
|
# driver = blazer_ser
|
||||||
# port = /dev/ttyS0
|
# port = /dev/ttyS0
|
||||||
# desc = "Web server"
|
# desc = "Web server"
|
||||||
#
|
#
|
||||||
# If your UPS driver requires additional settings, you can specify them
|
# If your UPS driver requires additional settings, you can specify them
|
||||||
# here. For example, if it supports a setting of "1234" for the
|
# here. For example, if it supports a setting of "1234" for the
|
||||||
# variable "cable", it would look like this:
|
# variable "cable", it would look like this:
|
||||||
#
|
#
|
||||||
# [myups]
|
# [myups]
|
||||||
# driver = mydriver
|
# driver = mydriver
|
||||||
# port = /dev/ttyS1
|
# port = /dev/ttyS1
|
||||||
# cable = 1234
|
# cable = 1234
|
||||||
# desc = "Something descriptive"
|
# desc = "Something descriptive"
|
||||||
#
|
#
|
||||||
# To find out if your driver supports any extra settings, start it with
|
# To find out if your driver supports any extra settings, start it with
|
||||||
# the -h option and/or read the driver's documentation.
|
# the -h option and/or read the driver's documentation.
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
# It should only be readable by the user that upsd becomes. See the FAQ.
|
# It should only be readable by the user that upsd becomes. See the FAQ.
|
||||||
#
|
#
|
||||||
# Each entry below provides usage and default value.
|
# Each entry below provides usage and default value.
|
||||||
#
|
|
||||||
# For more information, refer to upsd.conf manual page.
|
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# MAXAGE <seconds>
|
# MAXAGE <seconds>
|
||||||
|
@ -21,29 +19,6 @@
|
||||||
# the data fresh within the normal 15 second interval. Watch the syslog
|
# the data fresh within the normal 15 second interval. Watch the syslog
|
||||||
# for notifications from upsd about staleness.
|
# for notifications from upsd about staleness.
|
||||||
|
|
||||||
# =======================================================================
|
|
||||||
# TRACKINGDELAY <seconds>
|
|
||||||
# TRACKINGDELAY 3600
|
|
||||||
#
|
|
||||||
# This defaults to 1 hour. When instant commands and variables setting status
|
|
||||||
# tracking is enabled, status execution information are kept during this
|
|
||||||
# amount of time, and then cleaned up.
|
|
||||||
|
|
||||||
# =======================================================================
|
|
||||||
# ALLOW_NO_DEVICE <Boolean>
|
|
||||||
# ALLOW_NO_DEVICE true
|
|
||||||
#
|
|
||||||
# Normally upsd requires that at least one device section is defined in ups.conf
|
|
||||||
# when the daemon starts, to serve its data. For automatically managed services
|
|
||||||
# it may be preferred to have upsd always running, and reload the configuration
|
|
||||||
# when power devices become defined.
|
|
||||||
#
|
|
||||||
# Boolean values 'true', 'yes', 'on' and '1' mean that the server would not
|
|
||||||
# refuse to start with zero device sections found in ups.conf.
|
|
||||||
#
|
|
||||||
# Boolean values 'false', 'no', 'off' and '0' mean that the server should refuse
|
|
||||||
# to start if zero device sections were found in ups.conf. This is the default.
|
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# STATEPATH <path>
|
# STATEPATH <path>
|
||||||
# STATEPATH /var/run/nut
|
# STATEPATH /var/run/nut
|
||||||
|
@ -52,17 +27,15 @@
|
||||||
# than the default that was compiled into the program.
|
# than the default that was compiled into the program.
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# LISTEN <IP address or name> [<port>]
|
# LISTEN <address> [<port>]
|
||||||
# LISTEN 127.0.0.1 3493
|
# LISTEN 127.0.0.1 3493
|
||||||
# LISTEN ::1 3493
|
# LISTEN ::1 3493
|
||||||
# LISTEN myhostname 83493
|
|
||||||
# LISTEN myhostname.mydomain
|
|
||||||
#
|
#
|
||||||
# This defaults to the localhost listening addresses and port 3493.
|
# This defaults to the localhost listening addresses and port 3493.
|
||||||
# In case of IP v4 or v6 disabled kernel, only the available one will be used.
|
# In case of IP v4 or v6 disabled kernel, only the available one will be used.
|
||||||
#
|
#
|
||||||
# You may specify each interface IP address or name that you want upsd to
|
# You may specify each interface you want upsd to listen on for connections,
|
||||||
# listen on for connections, optionally with a port number.
|
# optionally with a port number.
|
||||||
#
|
#
|
||||||
# You may need this if you have multiple interfaces on your machine and
|
# You may need this if you have multiple interfaces on your machine and
|
||||||
# you don't want upsd to listen to all interfaces (for instance on a
|
# you don't want upsd to listen to all interfaces (for instance on a
|
||||||
|
@ -101,9 +74,9 @@
|
||||||
#
|
#
|
||||||
# When compiled with SSL support with NSS backend,
|
# When compiled with SSL support with NSS backend,
|
||||||
# you can enter the certificate path here.
|
# you can enter the certificate path here.
|
||||||
# Certificates are stored in a dedicated database (split into 3 files).
|
# Certificates are stored in a dedicated database (splitted in 3 files).
|
||||||
# Specify the path of the database directory.
|
# Specify the path of the database directory.
|
||||||
#
|
#
|
||||||
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
||||||
# for more information on the SSL support in NUT.
|
# for more information on the SSL support in NUT.
|
||||||
|
|
||||||
|
@ -115,7 +88,7 @@
|
||||||
# you can specify the certificate name to retrieve from database to
|
# you can specify the certificate name to retrieve from database to
|
||||||
# authenticate itself and the password
|
# authenticate itself and the password
|
||||||
# required to access certificate related private key.
|
# required to access certificate related private key.
|
||||||
#
|
#
|
||||||
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
||||||
# for more information on the SSL support in NUT.
|
# for more information on the SSL support in NUT.
|
||||||
|
|
||||||
|
@ -130,39 +103,7 @@
|
||||||
# - 0 to not request to clients to provide any certificate
|
# - 0 to not request to clients to provide any certificate
|
||||||
# - 1 to require to all clients a certificate
|
# - 1 to require to all clients a certificate
|
||||||
# - 2 to require to all clients a valid certificate
|
# - 2 to require to all clients a valid certificate
|
||||||
#
|
#
|
||||||
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
||||||
# for more information on the SSL support in NUT.
|
# for more information on the SSL support in NUT.
|
||||||
|
|
||||||
# =======================================================================
|
|
||||||
# DISABLE_WEAK_SSL <Boolean>
|
|
||||||
# DISABLE_WEAK_SSL true
|
|
||||||
#
|
|
||||||
# Tell upsd to disable older/weak SSL/TLS protocols and ciphers.
|
|
||||||
#
|
|
||||||
# With relatively recent versions of OpenSSL or NSS it will be restricted
|
|
||||||
# to TLSv1.2 or better.
|
|
||||||
#
|
|
||||||
# Unless you have really ancient clients, you probably want to enable this.
|
|
||||||
# Currently disabled by default to ensure compatibility with existing setups.
|
|
||||||
|
|
||||||
# =======================================================================
|
|
||||||
# DEBUG_MIN <Integer>
|
|
||||||
# DEBUG_MIN 2
|
|
||||||
#
|
|
||||||
# Optionally specify a minimum debug level for `upsd` data daemon, e.g. for
|
|
||||||
# troubleshooting a deployment, without impacting foreground or background
|
|
||||||
# running mode directly, and without need to edit init-scripts or service
|
|
||||||
# unit definitions. Note that command-line option `-D` can only increase
|
|
||||||
# this verbosity level.
|
|
||||||
#
|
|
||||||
# NOTE: if the running daemon receives a `reload` command, presence of the
|
|
||||||
# `DEBUG_MIN NUMBER` value in the configuration file can be used to tune
|
|
||||||
# debugging verbosity in the running service daemon (it is recommended to
|
|
||||||
# comment it away or set the minimum to explicit zero when done, to avoid
|
|
||||||
# huge journals and I/O system abuse). Keep in mind that for this run-time
|
|
||||||
# tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files
|
|
||||||
# is applied instantly and overrides any previously set value, from file
|
|
||||||
# or CLI options, regardless of older logging level being higher or lower
|
|
||||||
# than the newly found number; a missing (or commented away) value however
|
|
||||||
# does not change the previously active logging verbosity.
|
|
||||||
|
|
|
@ -18,25 +18,25 @@
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# actions: Let the user do certain things with upsd.
|
# actions: Let the user do certain things with upsd.
|
||||||
#
|
#
|
||||||
# Valid actions are:
|
# Valid actions are:
|
||||||
#
|
#
|
||||||
# SET - change the value of certain variables in the UPS
|
# SET - change the value of certain variables in the UPS
|
||||||
# FSD - set the "forced shutdown" flag in the UPS
|
# FSD - set the "forced shutdown" flag in the UPS
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# instcmds: Let the user initiate specific instant commands. Use "ALL"
|
# instcmds: Let the user initiate specific instant commands. Use "ALL"
|
||||||
# to grant all commands automatically. There are many possible
|
# to grant all commands automatically. There are many possible
|
||||||
# commands, so use 'upscmd -l' to see what your hardware supports. Here
|
# commands, so use 'upscmd -l' to see what your hardware supports. Here
|
||||||
# are a few examples:
|
# are a few examples:
|
||||||
#
|
#
|
||||||
# test.panel.start - Start a front panel test
|
# test.panel.start - Start a front panel test
|
||||||
# test.battery.start - Start battery test
|
# test.battery.start - Start battery test
|
||||||
# test.battery.stop - Stop battery test
|
# test.battery.stop - Stop battery test
|
||||||
# calibrate.start - Start calibration
|
# calibrate.start - Start calibration
|
||||||
# calibrate.stop - Stop calibration
|
# calibrate.stop - Stop calibration
|
||||||
#
|
#
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -61,15 +61,12 @@
|
||||||
#
|
#
|
||||||
# To add a user for your upsmon, use this example:
|
# To add a user for your upsmon, use this example:
|
||||||
#
|
#
|
||||||
# [upsmon]
|
# [upsmon]
|
||||||
# password = pass
|
# password = pass
|
||||||
# upsmon primary
|
# upsmon master
|
||||||
# or
|
# or
|
||||||
# upsmon secondary
|
# upsmon slave
|
||||||
#
|
#
|
||||||
# The matching MONITOR line in your upsmon.conf would look like this:
|
# The matching MONITOR line in your upsmon.conf would look like this:
|
||||||
#
|
#
|
||||||
# MONITOR myups@localhost 1 upsmon pass primary (or secondary)
|
# MONITOR myups@localhost 1 upsmon pass master (or slave)
|
||||||
#
|
|
||||||
# See comments in the upsmon.conf(.sample) file for details about this
|
|
||||||
# keyword and the difference of NUT secondary and primary systems.
|
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
# waits to run the SHUTDOWNCMD. The other one switches to another userid
|
# waits to run the SHUTDOWNCMD. The other one switches to another userid
|
||||||
# and does everything else.
|
# and does everything else.
|
||||||
#
|
#
|
||||||
# The default unprivileged user is set at compile-time with the option
|
# The default nonprivileged user is set at compile-time with
|
||||||
# 'configure --with-user=...'
|
# 'configure --with-user=...'.
|
||||||
#
|
#
|
||||||
# You can override it with '-u <user>' when starting upsmon, or just
|
# You can override it with '-u <user>' when starting upsmon, or just
|
||||||
# define it here for convenience.
|
# define it here for convenience.
|
||||||
#
|
#
|
||||||
|
@ -30,19 +30,19 @@
|
||||||
# RUN_AS_USER @RUN_AS_USER@
|
# RUN_AS_USER @RUN_AS_USER@
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# MONITOR <system> <powervalue> <username> <password> ("primary"|"secondary")
|
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
|
||||||
#
|
#
|
||||||
# List systems you want to monitor. Not all of these may supply power
|
# List systems you want to monitor. Not all of these may supply power
|
||||||
# to the system running upsmon, but if you want to watch it, it has to
|
# to the system running upsmon, but if you want to watch it, it has to
|
||||||
# be in this section.
|
# be in this section.
|
||||||
#
|
#
|
||||||
# You must have at least one of these declared.
|
# You must have at least one of these declared.
|
||||||
#
|
#
|
||||||
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
|
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
|
||||||
# like ups@localhost, su700@mybox, etc.
|
# like ups@localhost, su700@mybox, etc.
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
#
|
#
|
||||||
# - "su700@mybox" means a UPS called "su700" on a system called "mybox"
|
# - "su700@mybox" means a UPS called "su700" on a system called "mybox"
|
||||||
#
|
#
|
||||||
# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
|
# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
|
||||||
|
@ -54,67 +54,34 @@
|
||||||
# If the ups.conf on host "doghouse" has a section called "snoopy", the
|
# If the ups.conf on host "doghouse" has a section called "snoopy", the
|
||||||
# identifier for it would be "snoopy@doghouse".
|
# identifier for it would be "snoopy@doghouse".
|
||||||
#
|
#
|
||||||
# <powervalue> is an integer - the number of power supplies that this UPS
|
# <powervalue> is an integer - the number of power supplies that this UPS
|
||||||
# feeds on this system. Most personal computers only have one power supply,
|
# feeds on this system. Most computers only have one power supply, so this
|
||||||
# so this value is normally set to 1, while most modern servers have at least
|
# is normally set to 1. You need a pretty big or special box to have any
|
||||||
# two. You need a pretty big or special box to have any other value here.
|
# other value here.
|
||||||
#
|
#
|
||||||
# You can also set this to 0 for a system that doesn't take any power
|
# You can also set this to 0 for a system that doesn't supply any power,
|
||||||
# from the MONITORed supply, which you still want to monitor (e.g. for an
|
# but you still want to monitor. Use this when you want to hear about
|
||||||
# administrative workstation fed from a different circuit than the datacenter
|
# changes for a given UPS without shutting down when it goes critical,
|
||||||
# servers it monitors). Use <powervalue> if 0 when you want to hear about
|
# unless <powervalue> is 0.
|
||||||
# changes for a given UPS without shutting down when it goes critical.
|
|
||||||
#
|
#
|
||||||
# <username> and <password> must match an entry in that system's
|
# <username> and <password> must match an entry in that system's
|
||||||
# upsd.users. If your username is "upsmon" and your password is
|
# upsd.users. If your username is "monmaster" and your password is
|
||||||
# "blah", the upsd.users would look like this:
|
# "blah", the upsd.users would look like this:
|
||||||
#
|
#
|
||||||
# [upsmon]
|
# [monmaster]
|
||||||
# password = blah
|
# password = blah
|
||||||
# upsmon primary # (or secondary)
|
# upsmon master (or slave)
|
||||||
|
#
|
||||||
|
# "master" means this system will shutdown last, allowing the slaves
|
||||||
|
# time to shutdown first.
|
||||||
#
|
#
|
||||||
# "primary" means this system will shutdown last, allowing the secondary
|
# "slave" means this system shuts down immediately when power goes critical.
|
||||||
# systems time to shutdown first.
|
|
||||||
#
|
#
|
||||||
# "secondary" means this system shuts down immediately when power goes
|
# Examples:
|
||||||
# critical and less than MINSUPPLIES power sources have reliable input feeds.
|
|
||||||
#
|
#
|
||||||
# The general assumption is that the "primary" system is the one with direct
|
# MONITOR myups@bigserver 1 monmaster blah master
|
||||||
# connection to an UPS (such as serial or USB cable), so the primary system
|
# MONITOR su700@server.example.com 1 upsmon secretpass slave
|
||||||
# runs the NUT driver and 'upsd' server locally and can manage the device,
|
# MONITOR myups@localhost 1 upsmon pass master (or slave)
|
||||||
# and it would often tell the UPS to completely power itself off as a step
|
|
||||||
# in power-race avoidance (see POWERDOWNFLAG for details).
|
|
||||||
#
|
|
||||||
# Also, since the primary system stays up the longest, it suffers higher risks
|
|
||||||
# of ungraceful shutdown if the estimation of remaining runtime (or of the
|
|
||||||
# time it takes to shut down this system) was guessed wrong. By consequence,
|
|
||||||
# the "secondary" systems typically monitor the power environment state
|
|
||||||
# through the 'upsd' processes running on the remote (often "primary") systems
|
|
||||||
# and do not directly interact with an UPS (no local NUT drivers are running
|
|
||||||
# on the secondary systems). As such, secondaries typically shut down as
|
|
||||||
# soon as there is a sufficiently long power outage, or a low-battery alert
|
|
||||||
# from the UPS, or a loss of connection to the primary while the power was
|
|
||||||
# last known to be missing.
|
|
||||||
#
|
|
||||||
# This assumption and configuration can also make sense for networked UPSes,
|
|
||||||
# where a rack full of servers might overload the communications capacity
|
|
||||||
# of the networked management card on the UPS - in this case you might either
|
|
||||||
# reduce the 'snmp-ups' or 'netxml-ups' driver polling rate, or dedicate a
|
|
||||||
# "primary" server and set up the rest as "secondary" systems.
|
|
||||||
#
|
|
||||||
# In case of such large setups as mentioned above, beware also that shutdown
|
|
||||||
# times of the rack done all at once can substantially differ from smaller
|
|
||||||
# scale experiments with single-server shutdowns, since systems can compete
|
|
||||||
# for shared storage and other limited resources as they go down (and also
|
|
||||||
# not everyone may safely shut down simultaneously - e.g. a NAS or DB server
|
|
||||||
# would better go down after all its clients). You would be well served by
|
|
||||||
# higher-end UPSes with manageable thresholds to declare a critical state.
|
|
||||||
#
|
|
||||||
# Examples:
|
|
||||||
#
|
|
||||||
# MONITOR myups@bigserver 1 upswired blah primary
|
|
||||||
# MONITOR su700@server.example.com 1 upsmon secretpass secondary
|
|
||||||
# MONITOR myups@localhost 1 upsmon pass primary # (or secondary)
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# MINSUPPLIES <num>
|
# MINSUPPLIES <num>
|
||||||
|
@ -124,7 +91,7 @@
|
||||||
# put "1" in this field.
|
# put "1" in this field.
|
||||||
#
|
#
|
||||||
# Large/expensive server type systems usually have more, and can run with
|
# Large/expensive server type systems usually have more, and can run with
|
||||||
# a few missing. Some of these can run with 2 out of 4, for example,
|
# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example,
|
||||||
# so you'd set that to 2. The idea is to keep the box running as long
|
# so you'd set that to 2. The idea is to keep the box running as long
|
||||||
# as possible, right?
|
# as possible, right?
|
||||||
#
|
#
|
||||||
|
@ -139,15 +106,7 @@ MINSUPPLIES 1
|
||||||
#
|
#
|
||||||
# upsmon runs this command when the system needs to be brought down.
|
# upsmon runs this command when the system needs to be brought down.
|
||||||
#
|
#
|
||||||
# This should work just about everywhere ... if it doesn't, well, change it,
|
# This should work just about everywhere ... if it doesn't, well, change it.
|
||||||
# perhaps to a more complicated custom script.
|
|
||||||
#
|
|
||||||
# Note that while you experiment with the initial setup and want to test how
|
|
||||||
# your configuration reacts to power state changes and ultimately when power
|
|
||||||
# is reported to go critical, but do not want your system to actually turn
|
|
||||||
# off, consider setting the SHUTDOWNCMD temporarily to do something benign -
|
|
||||||
# such as posting a message with 'logger' or 'wall' or 'mailx'. Do be careful
|
|
||||||
# to plug the UPS back into the wall in a timely fashion.
|
|
||||||
|
|
||||||
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||||
|
|
||||||
|
@ -156,32 +115,25 @@ SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||||
#
|
#
|
||||||
# upsmon calls this to send messages when things happen
|
# upsmon calls this to send messages when things happen
|
||||||
#
|
#
|
||||||
# This command is called with the full text of the message (from NOTIFYMSG)
|
# This command is called with the full text of the message as one argument.
|
||||||
# as one argument.
|
|
||||||
#
|
|
||||||
# The environment string NOTIFYTYPE will contain the type string of
|
# The environment string NOTIFYTYPE will contain the type string of
|
||||||
# whatever caused this event to happen.
|
# whatever caused this event to happen.
|
||||||
#
|
#
|
||||||
# The environment string UPSNAME will contain the name of the system/device
|
|
||||||
# that generated the change.
|
|
||||||
#
|
|
||||||
# Note that this is only called for NOTIFY events that have EXEC set with
|
# Note that this is only called for NOTIFY events that have EXEC set with
|
||||||
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
|
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
|
||||||
#
|
#
|
||||||
# Making this some sort of shell script might not be a bad idea.
|
# Making this some sort of shell script might not be a bad idea. For more
|
||||||
# Alternately you can use the upssched program as your NOTIFYCMD for some
|
# information and ideas, see docs/scheduling.txt
|
||||||
# more complex setups (e.g. to ease handling of notification storms).
|
|
||||||
# For more information and ideas, see docs/scheduling.txt
|
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# NOTIFYCMD @BINDIR@/notifyme
|
# NOTIFYCMD @BINDIR@/notifyme
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# POLLFREQ <n>
|
# POLLFREQ <n>
|
||||||
#
|
#
|
||||||
# Polling frequency for normal activities, measured in seconds.
|
# Polling frequency for normal activities, measured in seconds.
|
||||||
#
|
#
|
||||||
# Adjust this to keep upsmon from flooding your network, but don't make
|
# Adjust this to keep upsmon from flooding your network, but don't make
|
||||||
# it too high or it may miss certain short-lived power events.
|
# it too high or it may miss certain short-lived power events.
|
||||||
|
|
||||||
POLLFREQ 5
|
POLLFREQ 5
|
||||||
|
@ -192,8 +144,8 @@ POLLFREQ 5
|
||||||
# Polling frequency in seconds while UPS on battery.
|
# Polling frequency in seconds while UPS on battery.
|
||||||
#
|
#
|
||||||
# You can make this number lower than POLLFREQ, which will make updates
|
# You can make this number lower than POLLFREQ, which will make updates
|
||||||
# faster when any UPS is running on battery. This is a good way to tune
|
# faster when any UPS is running on battery. This is a good way to tune
|
||||||
# network load if you have a lot of these things running.
|
# network load if you have a lot of these things running.
|
||||||
#
|
#
|
||||||
# The default is 5 seconds for both this and POLLFREQ.
|
# The default is 5 seconds for both this and POLLFREQ.
|
||||||
|
|
||||||
|
@ -202,17 +154,17 @@ POLLFREQALERT 5
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
|
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
|
||||||
#
|
#
|
||||||
# The primary upsmon process uses this number when waiting for secondary
|
# The master upsmon process uses this number when waiting for slaves to
|
||||||
# systems to disconnect once it has set the forced shutdown (FSD) flag.
|
# disconnect once it has set the forced shutdown (FSD) flag. If they
|
||||||
# If they don't disconnect after this many seconds, it goes on without them.
|
# don't disconnect after this many seconds, it goes on without them.
|
||||||
#
|
#
|
||||||
# Similarly, upsmon secondary processes wait up to this interval for the
|
# Similarly, upsmon slave processes wait up to this interval for the
|
||||||
# primary upsmon to set FSD when an UPS they are monitoring goes critical -
|
# master upsmon to set FSD when a UPS they are monitoring goes critical -
|
||||||
# that is, on battery and low battery. If the primary doesn't do its job,
|
# that is, on battery and low battery. If the master doesn't do its job,
|
||||||
# the secondaries will shut down anyway to avoid damage to the file systems.
|
# the slaves will shut down anyway to avoid damage to the file systems.
|
||||||
#
|
#
|
||||||
# This "wait for FSD" is done to avoid races where the status changes
|
# This "wait for FSD" is done to avoid races where the status changes
|
||||||
# to critical and back between polls by the primary.
|
# to critical and back between polls by the master.
|
||||||
|
|
||||||
HOSTSYNC 15
|
HOSTSYNC 15
|
||||||
|
|
||||||
|
@ -236,12 +188,11 @@ HOSTSYNC 15
|
||||||
DEADTIME 15
|
DEADTIME 15
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the primary system
|
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system
|
||||||
#
|
#
|
||||||
# upsmon will create a file with this name in primary mode when it's time
|
# upsmon will create a file with this name in master mode when it's time
|
||||||
# to shut down the load. You should check for this file's existence in
|
# to shut down the load. You should check for this file's existence in
|
||||||
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists, to tell
|
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists.
|
||||||
# the UPS(es) to power off.
|
|
||||||
#
|
#
|
||||||
# See the config-notes.txt file in the docs subdirectory for more information.
|
# See the config-notes.txt file in the docs subdirectory for more information.
|
||||||
# Refer to the section:
|
# Refer to the section:
|
||||||
|
@ -275,7 +226,7 @@ POWERDOWNFLAG /etc/killpower
|
||||||
# ONLINE : UPS is back online
|
# ONLINE : UPS is back online
|
||||||
# ONBATT : UPS is on battery
|
# ONBATT : UPS is on battery
|
||||||
# LOWBATT : UPS has a low battery (if also on battery, it's "critical")
|
# LOWBATT : UPS has a low battery (if also on battery, it's "critical")
|
||||||
# FSD : UPS is being shutdown by the primary (FSD = "Forced Shutdown")
|
# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown")
|
||||||
# COMMOK : Communications established with the UPS
|
# COMMOK : Communications established with the UPS
|
||||||
# COMMBAD : Communications lost to the UPS
|
# COMMBAD : Communications lost to the UPS
|
||||||
# SHUTDOWN : The system is being shutdown
|
# SHUTDOWN : The system is being shutdown
|
||||||
|
@ -304,7 +255,7 @@ POWERDOWNFLAG /etc/killpower
|
||||||
#
|
#
|
||||||
# Possible values for the flags:
|
# Possible values for the flags:
|
||||||
#
|
#
|
||||||
# SYSLOG - Write the message in the syslog
|
# SYSLOG - Write the message in the syslog
|
||||||
# WALL - Write the message to all users on the system
|
# WALL - Write the message to all users on the system
|
||||||
# EXEC - Execute NOTIFYCMD (see above) with the message
|
# EXEC - Execute NOTIFYCMD (see above) with the message
|
||||||
# IGNORE - Don't do anything
|
# IGNORE - Don't do anything
|
||||||
|
@ -318,7 +269,7 @@ POWERDOWNFLAG /etc/killpower
|
||||||
# every 43200 seconds, which is 12 hours. It does this by triggering a
|
# every 43200 seconds, which is 12 hours. It does this by triggering a
|
||||||
# NOTIFY_REPLBATT which is then handled by the usual notify structure
|
# NOTIFY_REPLBATT which is then handled by the usual notify structure
|
||||||
# you've defined above.
|
# you've defined above.
|
||||||
#
|
#
|
||||||
# If this number is not to your liking, override it here.
|
# If this number is not to your liking, override it here.
|
||||||
|
|
||||||
RBWARNTIME 43200
|
RBWARNTIME 43200
|
||||||
|
@ -328,7 +279,7 @@ RBWARNTIME 43200
|
||||||
#
|
#
|
||||||
# upsmon will let you know through the usual notify system if it can't
|
# upsmon will let you know through the usual notify system if it can't
|
||||||
# talk to any of the UPS entries that are defined in this file. It will
|
# talk to any of the UPS entries that are defined in this file. It will
|
||||||
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
|
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
|
||||||
# change the interval with this directive.
|
# change the interval with this directive.
|
||||||
|
|
||||||
NOCOMMWARNTIME 300
|
NOCOMMWARNTIME 300
|
||||||
|
@ -336,20 +287,17 @@ NOCOMMWARNTIME 300
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# FINALDELAY - last sleep interval before shutting down the system
|
# FINALDELAY - last sleep interval before shutting down the system
|
||||||
#
|
#
|
||||||
# On a primary, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
|
# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
|
||||||
# before executing your SHUTDOWNCMD. If you need to do something in between
|
# before executing your SHUTDOWNCMD. If you need to do something in between
|
||||||
# those events, increase this number. Remember, at this point your UPS is
|
# those events, increase this number. Remember, at this point your UPS is
|
||||||
# almost depleted, so don't make this too high. If needed, on high-end UPS
|
# almost depleted, so don't make this too high.
|
||||||
# devices you can usually configure when the low-battery state is announced
|
|
||||||
# based on estimated remaining run-time or on charge level of the batteries.
|
|
||||||
#
|
#
|
||||||
# Alternatively, you can set this very low so you don't wait around when
|
# Alternatively, you can set this very low so you don't wait around when
|
||||||
# it's time to shut down. Some UPSes don't give much warning for low
|
# it's time to shut down. Some UPSes don't give much warning for low
|
||||||
# battery and will require a value of 0 here for a safe shutdown.
|
# battery and will require a value of 0 here for a safe shutdown.
|
||||||
#
|
#
|
||||||
# Note: If FINALDELAY on the secondary is greater than HOSTSYNC on the
|
# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
|
||||||
# primary, the primary will give up waiting for that secondary system
|
# the master will give up waiting for the slave to disconnect.
|
||||||
# to disconnect.
|
|
||||||
|
|
||||||
FINALDELAY 5
|
FINALDELAY 5
|
||||||
|
|
||||||
|
@ -359,9 +307,9 @@ FINALDELAY 5
|
||||||
# When compiled with SSL support, you can enter the certificate path here.
|
# When compiled with SSL support, you can enter the certificate path here.
|
||||||
#
|
#
|
||||||
# With NSS:
|
# With NSS:
|
||||||
# Certificates are stored in a dedicated database (split into 3 files).
|
# Certificates are stored in a dedicated database (splitted in 3 files).
|
||||||
# Specify the path of the database directory.
|
# Specify the path of the database directory.
|
||||||
#
|
#
|
||||||
# CERTPATH @CONFPATH@/cert/upsmon
|
# CERTPATH @CONFPATH@/cert/upsmon
|
||||||
#
|
#
|
||||||
# With OpenSSL:
|
# With OpenSSL:
|
||||||
|
@ -371,7 +319,7 @@ FINALDELAY 5
|
||||||
# name hash value, which must hence be available.
|
# name hash value, which must hence be available.
|
||||||
#
|
#
|
||||||
# CERTPATH /usr/ssl/certs
|
# CERTPATH /usr/ssl/certs
|
||||||
#
|
#
|
||||||
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
||||||
# for more information on the SSL support in NUT.
|
# for more information on the SSL support in NUT.
|
||||||
|
|
||||||
|
@ -384,7 +332,7 @@ FINALDELAY 5
|
||||||
# required to access certificate related private key.
|
# required to access certificate related private key.
|
||||||
#
|
#
|
||||||
# CERTIDENT "my nut monitor" "MyPasSw0rD"
|
# CERTIDENT "my nut monitor" "MyPasSw0rD"
|
||||||
#
|
#
|
||||||
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
# See 'docs/security.txt' or the Security chapter of NUT user manual
|
||||||
# for more information on the SSL support in NUT.
|
# for more information on the SSL support in NUT.
|
||||||
|
|
||||||
|
@ -407,14 +355,14 @@ FINALDELAY 5
|
||||||
# CERTVERIFY - make upsmon verify all connections with certificates
|
# CERTVERIFY - make upsmon verify all connections with certificates
|
||||||
# CERTVERIFY 1
|
# CERTVERIFY 1
|
||||||
#
|
#
|
||||||
# When compiled with SSL support, make upsmon verify all connections with
|
# When compiled with SSL support, make upsmon verify all connections with
|
||||||
# certificates.
|
# certificates.
|
||||||
# Without this, there is no guarantee that the upsd is the right host.
|
# Without this, there is no guarantee that the upsd is the right host.
|
||||||
# Enabling this greatly reduces the risk of man in the middle attacks.
|
# Enabling this greatly reduces the risk of man in the middle attacks.
|
||||||
# This effectively forces the use of SSL, so don't use this unless
|
# This effectively forces the use of SSL, so don't use this unless
|
||||||
# all of your upsd hosts are ready for SSL and have their certificates
|
# all of your upsd hosts are ready for SSL and have their certificates
|
||||||
# in order.
|
# in order.
|
||||||
# When compiled with NSS support of SSL, can be overridden for host
|
# When compiled with NSS support of SSL, can be overriden for host
|
||||||
# specified with a CERTHOST directive.
|
# specified with a CERTHOST directive.
|
||||||
|
|
||||||
|
|
||||||
|
@ -428,26 +376,5 @@ FINALDELAY 5
|
||||||
# that nobody can sniff your sessions without a large effort. Setting
|
# that nobody can sniff your sessions without a large effort. Setting
|
||||||
# this will make upsmon drop connections if the remote upsd doesn't
|
# this will make upsmon drop connections if the remote upsd doesn't
|
||||||
# support SSL, so don't use it unless all of them have it running.
|
# support SSL, so don't use it unless all of them have it running.
|
||||||
# When compiled with NSS support of SSL, can be overridden for host
|
# When compiled with NSS support of SSL, can be overriden for host
|
||||||
# specified with a CERTHOST directive.
|
# specified with a CERTHOST directive.
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
|
||||||
# DEBUG_MIN - specify minimal debugging level for upsmon daemon
|
|
||||||
# e.g. DEBUG_MIN 6
|
|
||||||
#
|
|
||||||
# Optionally specify a minimum debug level for `upsmon` daemon, e.g. for
|
|
||||||
# troubleshooting a deployment, without impacting foreground or background
|
|
||||||
# running mode directly, and without need to edit init-scripts or service
|
|
||||||
# unit definitions. Note that command-line option `-D` can only increase
|
|
||||||
# this verbosity level.
|
|
||||||
#
|
|
||||||
# NOTE: if the running daemon receives a `reload` command, presence of the
|
|
||||||
# `DEBUG_MIN NUMBER` value in the configuration file can be used to tune
|
|
||||||
# debugging verbosity in the running service daemon (it is recommended to
|
|
||||||
# comment it away or set the minimum to explicit zero when done, to avoid
|
|
||||||
# huge journals and I/O system abuse). Keep in mind that for this run-time
|
|
||||||
# tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files
|
|
||||||
# is applied instantly and overrides any previously set value, from file
|
|
||||||
# or CLI options, regardless of older logging level being higher or lower
|
|
||||||
# than the newly found number; a missing (or commented away) value however
|
|
||||||
# does not change the previously active logging verbosity.
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ CMDSCRIPT @BINDIR@/upssched-cmd
|
||||||
# normal users can't create the file, due to the possibility of symlinking
|
# normal users can't create the file, due to the possibility of symlinking
|
||||||
# and other evil.
|
# and other evil.
|
||||||
#
|
#
|
||||||
# Note: if you are running Solaris or similar, the permissions that
|
# Note: if you are running Solaris or similar, the permissions that
|
||||||
# upssched sets on this file *are not enough* to keep you safe. If
|
# upssched sets on this file *are not enough* to keep you safe. If
|
||||||
# your OS ignores the permissions on a FIFO, then you MUST put this in
|
# your OS ignores the permissions on a FIFO, then you MUST put this in
|
||||||
# a protected directory!
|
# a protected directory!
|
||||||
|
@ -67,9 +67,9 @@ CMDSCRIPT @BINDIR@/upssched-cmd
|
||||||
# <upsname> can be the special value * to apply this handler to every
|
# <upsname> can be the special value * to apply this handler to every
|
||||||
# possible value of <upsname>.
|
# possible value of <upsname>.
|
||||||
#
|
#
|
||||||
# Run the command <command> via your CMDSCRIPT when it happens.
|
# Run the command <command> via your CMDSCRIPT when it happens.
|
||||||
#
|
#
|
||||||
# Note that any AT that matches both the <notifytype> and the <upsname>
|
# Note that any AT that matches both the <notifytype> and the <upsname>
|
||||||
# for the current event will be used.
|
# for the current event will be used.
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
@ -83,15 +83,9 @@ CMDSCRIPT @BINDIR@/upssched-cmd
|
||||||
# argument.
|
# argument.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# 1) Start a timer that will execute when communication with any UPS (*) has
|
# Start a timer that'll execute when any UPS (*) has been gone 10 seconds
|
||||||
# been gone for 10 seconds
|
|
||||||
#
|
#
|
||||||
# AT COMMBAD * START-TIMER upsgone 10
|
# AT COMMBAD * START-TIMER upsgone 10
|
||||||
#
|
|
||||||
# 2) Start a timer that will execute when any UPS (*) has been running
|
|
||||||
# on battery for 30 seconds
|
|
||||||
#
|
|
||||||
# AT ONBATT * START-TIMER onbattwarn 30
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -101,15 +95,10 @@ CMDSCRIPT @BINDIR@/upssched-cmd
|
||||||
# has passed then pass the optional argument <cmd> to CMDSCRIPT.
|
# has passed then pass the optional argument <cmd> to CMDSCRIPT.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# 1) If a specific UPS (myups@localhost) communication is restored, then stop
|
# If a specific UPS (myups@localhost) comes back online, then stop the
|
||||||
# the timer before it triggers
|
# timer before it triggers
|
||||||
#
|
#
|
||||||
# AT COMMOK myups@localhost CANCEL-TIMER upsgone
|
# AT COMMOK myups@localhost CANCEL-TIMER upsgone
|
||||||
#
|
|
||||||
# 2) If any UPS (*) reverts to utility power, then stop the timer before it
|
|
||||||
# triggers
|
|
||||||
#
|
|
||||||
# AT ONLINE * CANCEL-TIMER onbattwarn
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#
|
#
|
||||||
# This file is provided to ensure that you do not expose your upsd server
|
# This file is provided to ensure that you do not expose your upsd server
|
||||||
# to the world upon installing the CGI programs. Specifically, it keeps
|
# to the world upon installing the CGI programs. Specifically, it keeps
|
||||||
# the upsset.cgi program from running until you have assured it that you
|
# the upsset.cgi program from running until you have assured it that you
|
||||||
# have secured your web server's CGI directory.
|
# have secured your web server's CGI directory.
|
||||||
#
|
#
|
||||||
# By default, your web server will probably let anyone access upsset.cgi
|
# By default, your web server will probably let anyone access upsset.cgi
|
||||||
# once it is installed. This means that anyone could attempt to crack
|
# once it is installed. This means that anyone could attempt to crack
|
||||||
# upsd logins since they would appear to be coming from your web server,
|
# upsd logins since they would appear to be coming from your web server,
|
||||||
# rather than the outside world, slipping through any ACL/ACCESS definitions.
|
# rather than the outside world, slipping through any ACL/ACCESS definitions.
|
||||||
#
|
#
|
||||||
# For this reason, you *MUST* first secure your CGI programs before
|
# For this reason, you *MUST* first secure your CGI programs before
|
||||||
|
@ -17,17 +17,17 @@
|
||||||
# For Apache, the .htaccess file can be used in the directory with the
|
# For Apache, the .htaccess file can be used in the directory with the
|
||||||
# programs. You'll need something like this:
|
# programs. You'll need something like this:
|
||||||
#
|
#
|
||||||
# <Files upsset.cgi>
|
# <Files upsset.cgi>
|
||||||
# deny from all
|
# deny from all
|
||||||
# allow from your.network.addresses
|
# allow from your.network.addresses
|
||||||
# </Files>
|
# </Files>
|
||||||
#
|
#
|
||||||
# You will probably have to set "AllowOverride Limit" for this directory in
|
# You will probably have to set "AllowOverride Limit" for this directory in
|
||||||
# your server-level configuration file as well.
|
# your server-level configuration file as well.
|
||||||
#
|
#
|
||||||
# If this doesn't make sense, then stop reading and leave this program alone.
|
# If this doesn't make sense, then stop reading and leave this program alone.
|
||||||
#
|
#
|
||||||
# Assuming you have all this done (and it works), then you may uncomment
|
# Assuming you have all this done (and it works), then you may uncomment
|
||||||
# the line below and start using upsset.cgi through your web browser.
|
# the line below and start using upsset.cgi through your web browser.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
@UPSSTATSPATH upsstats.cgi@
|
@UPSSTATSPATH upsstats.cgi@
|
||||||
@UPSIMAGEPATH upsimage.cgi@
|
@UPSIMAGEPATH upsimage.cgi@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
@ -26,16 +26,10 @@
|
||||||
@REFRESH@
|
@REFRESH@
|
||||||
<title>@HOSTDESC@ : @VAR ups.model@ on @HOST@</title>
|
<title>@HOSTDESC@ : @VAR ups.model@ on @HOST@</title>
|
||||||
<!-- LINK REL="stylesheet" TYPE="text/css" HREF="http://localhost/nut/nut.css" / -->
|
<!-- LINK REL="stylesheet" TYPE="text/css" HREF="http://localhost/nut/nut.css" / -->
|
||||||
<style type="text/css">
|
|
||||||
body{color:#00fc00; background:#808080; font-family:"Times New Roman", Times, serif;}
|
|
||||||
a:link{color:#00e;}
|
|
||||||
a:visited{color:#551a8b;}
|
|
||||||
table{background:#000;}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body BGCOLOR="#808080" TEXT="#00FC00" LINK="#0000EE" VLINK="#551A8B">
|
||||||
|
|
||||||
<table style="margin:auto" BORDER="1" CELLSPACING="0" CELLPADDING="10">
|
<table BORDER="1" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="10" BGCOLOR="#000000">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th COLSPAN="20">Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ - @VAR ups.model@ on @HOST@</th>
|
<th COLSPAN="20">Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ - @VAR ups.model@ on @HOST@</th>
|
||||||
|
@ -57,7 +51,7 @@ table{background:#000;}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td VALIGN="TOP">
|
<td BGCOLOR="#000000" VALIGN="TOP">
|
||||||
|
|
||||||
<table BORDER="0"> <!-- table 2 -->
|
<table BORDER="0"> <!-- table 2 -->
|
||||||
|
|
||||||
|
@ -201,7 +195,7 @@ table{background:#000;}
|
||||||
|
|
||||||
@IFSUPP ambient.temperature@
|
@IFSUPP ambient.temperature@
|
||||||
@IFSUPP ambient.humidity@
|
@IFSUPP ambient.humidity@
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50 width=90@</td>
|
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50 width=90@</td>
|
||||||
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity width=90@</td>
|
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity width=90@</td>
|
||||||
|
@ -209,21 +203,21 @@ table{background:#000;}
|
||||||
</td>
|
</td>
|
||||||
@ELSE@
|
@ELSE@
|
||||||
@IFSUPP ambient.temperature@
|
@IFSUPP ambient.temperature@
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50@</td>
|
<td ALIGN="CENTER">Temperature<br>@IMG ambient.temperature tempmin=0 tempmax=50@</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</td>
|
</td>
|
||||||
@ELSE@
|
@ELSE@
|
||||||
@IFSUPP ambient.humidity@
|
@IFSUPP ambient.humidity@
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity@</td>
|
<td ALIGN="CENTER">Humidity<br>@IMG ambient.humidity@</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</td>
|
</td>
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
|
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
@IFSUPP battery.charge@
|
@IFSUPP battery.charge@
|
||||||
@IFSUPP battery.voltage@
|
@IFSUPP battery.voltage@
|
||||||
|
@ -238,7 +232,7 @@ table{background:#000;}
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
@IFSUPP input.L2-L3.voltage@
|
@IFSUPP input.L2-L3.voltage@
|
||||||
<td ALIGN="CENTER">L1-L2<br>@IMG input.L1-L2.voltage width=68@</td>
|
<td ALIGN="CENTER">L1-L2<br>@IMG input.L1-L2.voltage width=68@</td>
|
||||||
|
@ -255,7 +249,7 @@ table{background:#000;}
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
@IFSUPP output.L2-L3.voltage@
|
@IFSUPP output.L2-L3.voltage@
|
||||||
<td ALIGN="CENTER">L1-L2<br>@IMG output.L1-L2.voltage width=68@</td>
|
<td ALIGN="CENTER">L1-L2<br>@IMG output.L1-L2.voltage width=68@</td>
|
||||||
|
@ -272,7 +266,7 @@ table{background:#000;}
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td ALIGN="CENTER" VALIGN="TOP">
|
<td ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#000000">
|
||||||
<table BORDER="0"><tr>
|
<table BORDER="0"><tr>
|
||||||
@IFSUPP output.L2.power.percent@
|
@IFSUPP output.L2.power.percent@
|
||||||
<td ALIGN="CENTER">L1<br>@IMG output.L1.power.percent width=68@</td>
|
<td ALIGN="CENTER">L1<br>@IMG output.L1.power.percent width=68@</td>
|
||||||
|
@ -292,12 +286,9 @@ table{background:#000;}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<div><a href="https://jigsaw.w3.org/css-validator/check/referer"><img
|
<a href="http://validator.w3.org/check?uri=referer"><img style="float:right"
|
||||||
style="float:right" src="https://jigsaw.w3.org/css-validator/images/vcss"
|
src="http://www.w3.org/Icons/valid-html40"
|
||||||
alt="Valid CSS" title="Valid CSS" height="31" width="88"></a>
|
alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
|
||||||
<a href="https://validator.w3.org/check?uri=referer"><img
|
|
||||||
style="float:right" src="https://www.w3.org/Icons/valid-html401"
|
|
||||||
alt="Valid HTML 4.01 Strict" title="Valid HTML 4.01 Strict"
|
|
||||||
height="31" width="88"></a></div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- upsstats template file -->
|
<!-- upsstats template file -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This (upsstats.html) is the default template file which is used
|
This (upsstats.html) is the default template file which is used
|
||||||
when upsstats.cgi is loaded with no arguments.
|
when upsstats.cgi is loaded with no arguments.
|
||||||
|
|
||||||
|
@ -16,41 +16,33 @@
|
||||||
@UPSSTATSPATH upsstats.cgi@
|
@UPSSTATSPATH upsstats.cgi@
|
||||||
@UPSIMAGEPATH upsimage.cgi@
|
@UPSIMAGEPATH upsimage.cgi@
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
@REFRESH@
|
@REFRESH@
|
||||||
<title>
|
<title>
|
||||||
Network UPS Tools upsstats
|
Network UPS Tools upsstats
|
||||||
@VERSION@
|
@VERSION@
|
||||||
: UPS Status
|
: UPS Status
|
||||||
</title>
|
</title>
|
||||||
<style type="text/css">
|
|
||||||
body{font-family:"Times New Roman", Times, serif;}
|
|
||||||
a:link{color:#00e;}
|
|
||||||
a:visited{color:#551a8b;}
|
|
||||||
th, td{padding:0.5ex;}
|
|
||||||
.t1{background:#0ff;}
|
|
||||||
.t2{background:#0f0;}
|
|
||||||
</style>
|
|
||||||
<!-- link rel="stylesheet" type="text/css" href="nut.css" / -->
|
<!-- link rel="stylesheet" type="text/css" href="nut.css" / -->
|
||||||
@REFRESH@
|
@REFRESH@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B">
|
||||||
|
|
||||||
<table style="margin:auto; background:#50A0A0; text-align:center;">
|
<table BGCOLOR="#50A0A0" ALIGN="CENTER">
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
||||||
<table>
|
<table CELLPADDING="5">
|
||||||
<tr>
|
<tr>
|
||||||
<th COLSPAN="10" style="background:#60B0B0;">
|
<th COLSPAN="10" BGCOLOR="#60B0B0">
|
||||||
|
|
||||||
<span style="font-size:1.5em">Network UPS Tools upsstats
|
<font SIZE="+2">Network UPS Tools upsstats
|
||||||
@VERSION@
|
@VERSION@
|
||||||
</span>
|
</font>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@DATE %a %b %d %X %Z %Y@
|
@DATE %a %b %d %X %Z %Y@
|
||||||
|
@ -58,7 +50,7 @@ th, td{padding:0.5ex;}
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background:#60B0B0;">
|
<tr BGCOLOR="#60B0B0">
|
||||||
<th COLSPAN="1">System</th>
|
<th COLSPAN="1">System</th>
|
||||||
<th COLSPAN="1">Model</th>
|
<th COLSPAN="1">Model</th>
|
||||||
<th COLSPAN="1">Status</th>
|
<th COLSPAN="1">Status</th>
|
||||||
|
@ -73,20 +65,20 @@ th, td{padding:0.5ex;}
|
||||||
|
|
||||||
@FOREACHUPS@
|
@FOREACHUPS@
|
||||||
|
|
||||||
<tr>
|
<tr ALIGN=CENTER>
|
||||||
<td class="t1">
|
<td BGCOLOR="#00FFFF">
|
||||||
@HOSTLINK@
|
@HOSTLINK@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t1">
|
<td BGCOLOR="#00FFFF">
|
||||||
@VAR ups.model@
|
@VAR ups.model@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td style="background:@STATUSCOLOR@">
|
<td BGCOLOR="@STATUSCOLOR@">
|
||||||
@STATUS@
|
@STATUS@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@IFSUPP battery.charge@
|
@IFSUPP battery.charge@
|
||||||
@VAR battery.charge@
|
@VAR battery.charge@
|
||||||
%
|
%
|
||||||
|
@ -97,18 +89,18 @@ th, td{padding:0.5ex;}
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L1-L2.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L1-L2.voltage@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L2-L3.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L2-L3.voltage@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L3-L1.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L3-L1.voltage@
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@ELSE@
|
@ELSE@
|
||||||
@IFSUPP input.L2-N.voltage@
|
@IFSUPP input.L2-N.voltage@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L1-N.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L1-N.voltage@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L2-N.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L2-N.voltage@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.L3-N.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.L3-N.voltage@
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@ELSE@
|
@ELSE@
|
||||||
@IFBETWEEN input.transfer.low input.transfer.high input.voltage@
|
@IFBETWEEN input.transfer.low input.transfer.high input.voltage@
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@ELSE@
|
@ELSE@
|
||||||
<td style="background:red;">
|
<td BGCOLOR="#FF0000">
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
|
|
||||||
@IFSUPP input.L2-L3.voltage@
|
@IFSUPP input.L2-L3.voltage@
|
||||||
|
@ -126,7 +118,7 @@ th, td{padding:0.5ex;}
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@IFSUPP output.L2-L3.voltage@
|
@IFSUPP output.L2-L3.voltage@
|
||||||
@VAR output.L1-L2.voltage@
|
@VAR output.L1-L2.voltage@
|
||||||
@VAR output.L2-L3.voltage@
|
@VAR output.L2-L3.voltage@
|
||||||
|
@ -142,7 +134,7 @@ th, td{padding:0.5ex;}
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@IFSUPP output.L2.power.percent@
|
@IFSUPP output.L2.power.percent@
|
||||||
@VAR output.L1.power.percent@
|
@VAR output.L1.power.percent@
|
||||||
@VAR output.L2.power.percent@
|
@VAR output.L2.power.percent@
|
||||||
|
@ -159,7 +151,7 @@ th, td{padding:0.5ex;}
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@IFSUPP ups.temperature@
|
@IFSUPP ups.temperature@
|
||||||
@UPSTEMP@
|
@UPSTEMP@
|
||||||
@DEGREES@
|
@DEGREES@
|
||||||
|
@ -170,13 +162,13 @@ th, td{padding:0.5ex;}
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@IFSUPP battery.runtime@
|
@IFSUPP battery.runtime@
|
||||||
@RUNTIME@
|
@RUNTIME@
|
||||||
@ENDIF@
|
@ENDIF@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="t2">
|
<td BGCOLOR="#00FF00">
|
||||||
@TREELINK@
|
@TREELINK@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -188,9 +180,11 @@ th, td{padding:0.5ex;}
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr><div><small>
|
<hr /><div><small>
|
||||||
<a href="https://jigsaw.w3.org/css-validator/check/referer"><img style="float:right" src="https://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88"></a>
|
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="float:right" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88"/></a>
|
||||||
<a href="https://validator.w3.org/check?uri=referer"><img style="float:right" src="https://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Strict" height="31" width="88"></a>
|
<a href="http://validator.w3.org/check?uri=referer"><img style="float:right"
|
||||||
|
src="http://www.w3.org/Icons/valid-html40"
|
||||||
|
alt="Valid HTML 4.0 Transitional" height="31" width="88"></a>
|
||||||
</small></div>
|
</small></div>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
|
|
692
config.guess
vendored
692
config.guess
vendored
File diff suppressed because it is too large
Load diff
310
config.sub
vendored
310
config.sub
vendored
|
@ -1,8 +1,8 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2018-02-22'
|
timestamp='2014-09-11'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# 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
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,7 +15,7 @@ timestamp='2018-02-22'
|
||||||
# General Public License for more details.
|
# General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
@ -25,7 +25,7 @@ timestamp='2018-02-22'
|
||||||
# of the GNU General Public License, version 3 ("GPLv3").
|
# of the GNU General Public License, version 3 ("GPLv3").
|
||||||
|
|
||||||
|
|
||||||
# Please send patches to <config-patches@gnu.org>.
|
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||||
#
|
#
|
||||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
|
@ -33,7 +33,7 @@ timestamp='2018-02-22'
|
||||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||||
|
|
||||||
# You can get the latest version of this script from:
|
# You can get the latest version of this script from:
|
||||||
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||||
|
|
||||||
# This file is supposed to be the same for all GNU packages
|
# This file is supposed to be the same for all GNU packages
|
||||||
# and recognize all the CPU types, system types and aliases
|
# and recognize all the CPU types, system types and aliases
|
||||||
|
@ -53,11 +53,12 @@ timestamp='2018-02-22'
|
||||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
|
|
||||||
usage="\
|
usage="\
|
||||||
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
|
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||||
|
$0 [OPTION] ALIAS
|
||||||
|
|
||||||
Canonicalize a configuration name.
|
Canonicalize a configuration name.
|
||||||
|
|
||||||
Options:
|
Operation modes:
|
||||||
-h, --help print this help, then exit
|
-h, --help print this help, then exit
|
||||||
-t, --time-stamp print date of last modification, then exit
|
-t, --time-stamp print date of last modification, then exit
|
||||||
-v, --version print version number, then exit
|
-v, --version print version number, then exit
|
||||||
|
@ -67,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
@ -94,7 +95,7 @@ while test $# -gt 0 ; do
|
||||||
|
|
||||||
*local*)
|
*local*)
|
||||||
# First pass through any local machine types.
|
# First pass through any local machine types.
|
||||||
echo "$1"
|
echo $1
|
||||||
exit ;;
|
exit ;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
|
@ -112,24 +113,24 @@ esac
|
||||||
|
|
||||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
# 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.
|
# 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
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||||
kopensolaris*-gnu* | cloudabi*-eabi* | \
|
kopensolaris*-gnu* | \
|
||||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
;;
|
;;
|
||||||
android-linux)
|
android-linux)
|
||||||
os=-linux-android
|
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/-[^-]*$//'`
|
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||||
if [ "$basic_machine" != "$1" ]
|
if [ $basic_machine != $1 ]
|
||||||
then os=`echo "$1" | sed 's/.*-/-/'`
|
then os=`echo $1 | sed 's/.*-/-/'`
|
||||||
else os=; fi
|
else os=; fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -178,44 +179,44 @@ case $os in
|
||||||
;;
|
;;
|
||||||
-sco6)
|
-sco6)
|
||||||
os=-sco5v6
|
os=-sco5v6
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco5)
|
-sco5)
|
||||||
os=-sco3.2v5
|
os=-sco3.2v5
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-sco4)
|
-sco4)
|
||||||
os=-sco3.2v4
|
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]*)
|
-sco3.2.[4-9]*)
|
||||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
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]*)
|
-sco3.2v[4-9]*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# 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*)
|
-sco5v6*)
|
||||||
# Don't forget version if it is 3.2v4 or newer.
|
# 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*)
|
-sco*)
|
||||||
os=-sco3.2v2
|
os=-sco3.2v2
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-udk*)
|
-udk*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-isc)
|
-isc)
|
||||||
os=-isc2.2
|
os=-isc2.2
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-clix*)
|
-clix*)
|
||||||
basic_machine=clipper-intergraph
|
basic_machine=clipper-intergraph
|
||||||
;;
|
;;
|
||||||
-isc*)
|
-isc*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
-lynx*178)
|
-lynx*178)
|
||||||
os=-lynxos178
|
os=-lynxos178
|
||||||
|
@ -227,7 +228,10 @@ case $os in
|
||||||
os=-lynxos
|
os=-lynxos
|
||||||
;;
|
;;
|
||||||
-ptx*)
|
-ptx*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||||
|
;;
|
||||||
|
-windowsnt*)
|
||||||
|
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||||
;;
|
;;
|
||||||
-psos*)
|
-psos*)
|
||||||
os=-psos
|
os=-psos
|
||||||
|
@ -251,16 +255,15 @@ case $basic_machine in
|
||||||
| arc | arceb \
|
| arc | arceb \
|
||||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||||
| avr | avr32 \
|
| avr | avr32 \
|
||||||
| ba \
|
|
||||||
| be32 | be64 \
|
| be32 | be64 \
|
||||||
| bfin \
|
| bfin \
|
||||||
| c4x | c8051 | clipper \
|
| c4x | c8051 | clipper \
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| e2k | epiphany \
|
| epiphany \
|
||||||
| fido | fr30 | frv | ft32 \
|
| fido | fr30 | frv \
|
||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i860 | i960 | ia16 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
| k1om \
|
| k1om \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
|
@ -296,14 +299,13 @@ case $basic_machine in
|
||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| open8 | or1k | or1knd | or32 \
|
| open8 | or1k | or1knd | or32 \
|
||||||
| pdp10 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||||
| pru \
|
|
||||||
| pyramid \
|
| pyramid \
|
||||||
| riscv32 | riscv64 \
|
| riscv32 | riscv64 \
|
||||||
| rl78 | rx \
|
| rl78 | rx \
|
||||||
| score \
|
| score \
|
||||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
| sh64 | sh64le \
|
| sh64 | sh64le \
|
||||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||||
|
@ -311,8 +313,7 @@ case $basic_machine in
|
||||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||||
| visium \
|
| we32k \
|
||||||
| wasm32 \
|
|
||||||
| x86 | xc16x | xstormy16 | xtensa \
|
| x86 | xc16x | xstormy16 | xtensa \
|
||||||
| z8k | z80)
|
| z8k | z80)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
|
@ -326,14 +327,11 @@ case $basic_machine in
|
||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
leon|leon[3-9])
|
|
||||||
basic_machine=sparc-$basic_machine
|
|
||||||
;;
|
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
|
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||||
;;
|
;;
|
||||||
ms1)
|
ms1)
|
||||||
basic_machine=mt-unknown
|
basic_machine=mt-unknown
|
||||||
|
@ -362,7 +360,7 @@ case $basic_machine in
|
||||||
;;
|
;;
|
||||||
# Object if more than one company name word.
|
# 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
|
exit 1
|
||||||
;;
|
;;
|
||||||
# Recognize the basic CPU types with company name.
|
# Recognize the basic CPU types with company name.
|
||||||
|
@ -374,18 +372,17 @@ case $basic_machine in
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
| ba-* \
|
|
||||||
| be32-* | be64-* \
|
| be32-* | be64-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| e2k-* | elxsi-* \
|
| elxsi-* \
|
||||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||||
| h8300-* | h8500-* \
|
| h8300-* | h8500-* \
|
||||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
| k1om-* \
|
| k1om-* \
|
||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
|
@ -426,15 +423,13 @@ case $basic_machine in
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||||
| pru-* \
|
|
||||||
| pyramid-* \
|
| pyramid-* \
|
||||||
| riscv32-* | riscv64-* \
|
|
||||||
| rl78-* | romp-* | rs6000-* | rx-* \
|
| rl78-* | romp-* | rs6000-* | rx-* \
|
||||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
|
||||||
| tahoe-* \
|
| tahoe-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
| tile*-* \
|
| tile*-* \
|
||||||
|
@ -442,8 +437,6 @@ case $basic_machine in
|
||||||
| ubicom32-* \
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||||
| vax-* \
|
| vax-* \
|
||||||
| visium-* \
|
|
||||||
| wasm32-* \
|
|
||||||
| we32k-* \
|
| we32k-* \
|
||||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||||
| xstormy16-* | xtensa*-* \
|
| xstormy16-* | xtensa*-* \
|
||||||
|
@ -457,7 +450,7 @@ case $basic_machine in
|
||||||
# Recognize the various machine names and aliases which stand
|
# Recognize the various machine names and aliases which stand
|
||||||
# for a CPU type and a company and sometimes even an OS.
|
# for a CPU type and a company and sometimes even an OS.
|
||||||
386bsd)
|
386bsd)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-unknown
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||||
|
@ -491,7 +484,7 @@ case $basic_machine in
|
||||||
basic_machine=x86_64-pc
|
basic_machine=x86_64-pc
|
||||||
;;
|
;;
|
||||||
amd64-*)
|
amd64-*)
|
||||||
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
amdahl)
|
amdahl)
|
||||||
basic_machine=580-amdahl
|
basic_machine=580-amdahl
|
||||||
|
@ -520,9 +513,6 @@ case $basic_machine in
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-aros
|
os=-aros
|
||||||
;;
|
;;
|
||||||
asmjs)
|
|
||||||
basic_machine=asmjs-unknown
|
|
||||||
;;
|
|
||||||
aux)
|
aux)
|
||||||
basic_machine=m68k-apple
|
basic_machine=m68k-apple
|
||||||
os=-aux
|
os=-aux
|
||||||
|
@ -536,7 +526,7 @@ case $basic_machine in
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
blackfin-*)
|
blackfin-*)
|
||||||
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
bluegene*)
|
bluegene*)
|
||||||
|
@ -544,13 +534,13 @@ case $basic_machine in
|
||||||
os=-cnk
|
os=-cnk
|
||||||
;;
|
;;
|
||||||
c54x-*)
|
c54x-*)
|
||||||
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c55x-*)
|
c55x-*)
|
||||||
basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c6x-*)
|
c6x-*)
|
||||||
basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
|
@ -639,18 +629,10 @@ case $basic_machine in
|
||||||
basic_machine=rs6000-bull
|
basic_machine=rs6000-bull
|
||||||
os=-bosx
|
os=-bosx
|
||||||
;;
|
;;
|
||||||
dpx2*)
|
dpx2* | dpx2*-bull)
|
||||||
basic_machine=m68k-bull
|
basic_machine=m68k-bull
|
||||||
os=-sysv3
|
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)
|
ebmon29k)
|
||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-ebmon
|
os=-ebmon
|
||||||
|
@ -740,6 +722,9 @@ case $basic_machine in
|
||||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||||
basic_machine=hppa1.0-hp
|
basic_machine=hppa1.0-hp
|
||||||
;;
|
;;
|
||||||
|
hppa-next)
|
||||||
|
os=-nextstep3
|
||||||
|
;;
|
||||||
hppaosf)
|
hppaosf)
|
||||||
basic_machine=hppa1.1-hp
|
basic_machine=hppa1.1-hp
|
||||||
os=-osf
|
os=-osf
|
||||||
|
@ -752,26 +737,26 @@ case $basic_machine in
|
||||||
basic_machine=i370-ibm
|
basic_machine=i370-ibm
|
||||||
;;
|
;;
|
||||||
i*86v32)
|
i*86v32)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv32
|
os=-sysv32
|
||||||
;;
|
;;
|
||||||
i*86v4*)
|
i*86v4*)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
i*86v)
|
i*86v)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
i*86sol2)
|
i*86sol2)
|
||||||
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
i386mach)
|
i386mach)
|
||||||
basic_machine=i386-mach
|
basic_machine=i386-mach
|
||||||
os=-mach
|
os=-mach
|
||||||
;;
|
;;
|
||||||
vsta)
|
i386-vsta | vsta)
|
||||||
basic_machine=i386-unknown
|
basic_machine=i386-unknown
|
||||||
os=-vsta
|
os=-vsta
|
||||||
;;
|
;;
|
||||||
|
@ -789,17 +774,17 @@ case $basic_machine in
|
||||||
basic_machine=m68k-isi
|
basic_machine=m68k-isi
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
leon-*|leon[3-9]-*)
|
|
||||||
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
|
|
||||||
;;
|
|
||||||
m68knommu)
|
m68knommu)
|
||||||
basic_machine=m68k-unknown
|
basic_machine=m68k-unknown
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
m68knommu-*)
|
m68knommu-*)
|
||||||
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
|
m88k-omron*)
|
||||||
|
basic_machine=m88k-omron
|
||||||
|
;;
|
||||||
magnum | m3230)
|
magnum | m3230)
|
||||||
basic_machine=mips-mips
|
basic_machine=mips-mips
|
||||||
os=-sysv
|
os=-sysv
|
||||||
|
@ -831,10 +816,10 @@ case $basic_machine in
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
mips3*-*)
|
mips3*-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||||
;;
|
;;
|
||||||
mips3*)
|
mips3*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||||
;;
|
;;
|
||||||
monitor)
|
monitor)
|
||||||
basic_machine=m68k-rom68k
|
basic_machine=m68k-rom68k
|
||||||
|
@ -853,7 +838,7 @@ case $basic_machine in
|
||||||
os=-msdos
|
os=-msdos
|
||||||
;;
|
;;
|
||||||
ms1-*)
|
ms1-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
|
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||||
;;
|
;;
|
||||||
msys)
|
msys)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
|
@ -895,7 +880,7 @@ case $basic_machine in
|
||||||
basic_machine=v70-nec
|
basic_machine=v70-nec
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
next | m*-next)
|
next | m*-next )
|
||||||
basic_machine=m68k-next
|
basic_machine=m68k-next
|
||||||
case $os in
|
case $os in
|
||||||
-nextstep* )
|
-nextstep* )
|
||||||
|
@ -940,12 +925,6 @@ case $basic_machine in
|
||||||
nsr-tandem)
|
nsr-tandem)
|
||||||
basic_machine=nsr-tandem
|
basic_machine=nsr-tandem
|
||||||
;;
|
;;
|
||||||
nsv-tandem)
|
|
||||||
basic_machine=nsv-tandem
|
|
||||||
;;
|
|
||||||
nsx-tandem)
|
|
||||||
basic_machine=nsx-tandem
|
|
||||||
;;
|
|
||||||
op50n-* | op60c-*)
|
op50n-* | op60c-*)
|
||||||
basic_machine=hppa1.1-oki
|
basic_machine=hppa1.1-oki
|
||||||
os=-proelf
|
os=-proelf
|
||||||
|
@ -978,7 +957,7 @@ case $basic_machine in
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
parisc-*)
|
parisc-*)
|
||||||
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
pbd)
|
pbd)
|
||||||
|
@ -994,7 +973,7 @@ case $basic_machine in
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
;;
|
;;
|
||||||
pc98-*)
|
pc98-*)
|
||||||
basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||||
basic_machine=i586-pc
|
basic_machine=i586-pc
|
||||||
|
@ -1009,16 +988,16 @@ case $basic_machine in
|
||||||
basic_machine=i786-pc
|
basic_machine=i786-pc
|
||||||
;;
|
;;
|
||||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
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-*)
|
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||||
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pentium4-*)
|
pentium4-*)
|
||||||
basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
pn)
|
pn)
|
||||||
basic_machine=pn-gould
|
basic_machine=pn-gould
|
||||||
|
@ -1028,23 +1007,23 @@ case $basic_machine in
|
||||||
ppc | ppcbe) basic_machine=powerpc-unknown
|
ppc | ppcbe) basic_machine=powerpc-unknown
|
||||||
;;
|
;;
|
||||||
ppc-* | ppcbe-*)
|
ppc-* | ppcbe-*)
|
||||||
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppcle | powerpclittle)
|
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||||
basic_machine=powerpcle-unknown
|
basic_machine=powerpcle-unknown
|
||||||
;;
|
;;
|
||||||
ppcle-* | powerpclittle-*)
|
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-unknown
|
||||||
;;
|
;;
|
||||||
ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ppc64le | powerpc64little)
|
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||||
basic_machine=powerpc64le-unknown
|
basic_machine=powerpc64le-unknown
|
||||||
;;
|
;;
|
||||||
ppc64le-* | powerpc64little-*)
|
ppc64le-* | powerpc64little-*)
|
||||||
basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
ps2)
|
ps2)
|
||||||
basic_machine=i386-ibm
|
basic_machine=i386-ibm
|
||||||
|
@ -1098,10 +1077,17 @@ case $basic_machine in
|
||||||
sequent)
|
sequent)
|
||||||
basic_machine=i386-sequent
|
basic_machine=i386-sequent
|
||||||
;;
|
;;
|
||||||
|
sh)
|
||||||
|
basic_machine=sh-hitachi
|
||||||
|
os=-hms
|
||||||
|
;;
|
||||||
sh5el)
|
sh5el)
|
||||||
basic_machine=sh5le-unknown
|
basic_machine=sh5le-unknown
|
||||||
;;
|
;;
|
||||||
simso-wrs)
|
sh64)
|
||||||
|
basic_machine=sh64-unknown
|
||||||
|
;;
|
||||||
|
sparclite-wrs | simso-wrs)
|
||||||
basic_machine=sparclite-wrs
|
basic_machine=sparclite-wrs
|
||||||
os=-vxworks
|
os=-vxworks
|
||||||
;;
|
;;
|
||||||
|
@ -1120,7 +1106,7 @@ case $basic_machine in
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
strongarm-* | thumb-*)
|
strongarm-* | thumb-*)
|
||||||
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
|
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
;;
|
;;
|
||||||
sun2)
|
sun2)
|
||||||
basic_machine=m68000-sun
|
basic_machine=m68000-sun
|
||||||
|
@ -1242,9 +1228,6 @@ case $basic_machine in
|
||||||
basic_machine=hppa1.1-winbond
|
basic_machine=hppa1.1-winbond
|
||||||
os=-proelf
|
os=-proelf
|
||||||
;;
|
;;
|
||||||
x64)
|
|
||||||
basic_machine=x86_64-pc
|
|
||||||
;;
|
|
||||||
xbox)
|
xbox)
|
||||||
basic_machine=i686-pc
|
basic_machine=i686-pc
|
||||||
os=-mingw32
|
os=-mingw32
|
||||||
|
@ -1253,12 +1236,20 @@ case $basic_machine in
|
||||||
basic_machine=xps100-honeywell
|
basic_machine=xps100-honeywell
|
||||||
;;
|
;;
|
||||||
xscale-* | xscalee[bl]-*)
|
xscale-* | xscalee[bl]-*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
|
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
|
||||||
;;
|
;;
|
||||||
ymp)
|
ymp)
|
||||||
basic_machine=ymp-cray
|
basic_machine=ymp-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
|
z8k-*-coff)
|
||||||
|
basic_machine=z8k-unknown
|
||||||
|
os=-sim
|
||||||
|
;;
|
||||||
|
z80-*-coff)
|
||||||
|
basic_machine=z80-unknown
|
||||||
|
os=-sim
|
||||||
|
;;
|
||||||
none)
|
none)
|
||||||
basic_machine=none-none
|
basic_machine=none-none
|
||||||
os=-none
|
os=-none
|
||||||
|
@ -1287,6 +1278,10 @@ case $basic_machine in
|
||||||
vax)
|
vax)
|
||||||
basic_machine=vax-dec
|
basic_machine=vax-dec
|
||||||
;;
|
;;
|
||||||
|
pdp10)
|
||||||
|
# there are many clones, so DEC is not a safe bet
|
||||||
|
basic_machine=pdp10-unknown
|
||||||
|
;;
|
||||||
pdp11)
|
pdp11)
|
||||||
basic_machine=pdp11-dec
|
basic_machine=pdp11-dec
|
||||||
;;
|
;;
|
||||||
|
@ -1296,6 +1291,9 @@ case $basic_machine in
|
||||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||||
basic_machine=sh-unknown
|
basic_machine=sh-unknown
|
||||||
;;
|
;;
|
||||||
|
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||||
|
basic_machine=sparc-sun
|
||||||
|
;;
|
||||||
cydra)
|
cydra)
|
||||||
basic_machine=cydra-cydrome
|
basic_machine=cydra-cydrome
|
||||||
;;
|
;;
|
||||||
|
@ -1315,7 +1313,7 @@ case $basic_machine in
|
||||||
# Make sure to match an already-canonicalized machine name.
|
# 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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1323,10 +1321,10 @@ esac
|
||||||
# Here we canonicalize certain aliases for manufacturers.
|
# Here we canonicalize certain aliases for manufacturers.
|
||||||
case $basic_machine in
|
case $basic_machine in
|
||||||
*-digital*)
|
*-digital*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
|
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||||
;;
|
;;
|
||||||
*-commodore*)
|
*-commodore*)
|
||||||
basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
|
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
@ -1337,8 +1335,8 @@ esac
|
||||||
if [ x"$os" != x"" ]
|
if [ x"$os" != x"" ]
|
||||||
then
|
then
|
||||||
case $os in
|
case $os in
|
||||||
# First match some system type aliases that might get confused
|
# First match some system type aliases
|
||||||
# with valid system types.
|
# that might get confused with valid system types.
|
||||||
# -solaris* is a basic system type, with this one exception.
|
# -solaris* is a basic system type, with this one exception.
|
||||||
-auroraux)
|
-auroraux)
|
||||||
os=-auroraux
|
os=-auroraux
|
||||||
|
@ -1349,48 +1347,45 @@ case $os in
|
||||||
-solaris)
|
-solaris)
|
||||||
os=-solaris2
|
os=-solaris2
|
||||||
;;
|
;;
|
||||||
|
-svr4*)
|
||||||
|
os=-sysv4
|
||||||
|
;;
|
||||||
-unixware*)
|
-unixware*)
|
||||||
os=-sysv4.2uw
|
os=-sysv4.2uw
|
||||||
;;
|
;;
|
||||||
-gnu/linux*)
|
-gnu/linux*)
|
||||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
# es1800 is here to avoid being matched by es* (a different OS)
|
# First accept the basic system types.
|
||||||
-es1800*)
|
|
||||||
os=-ose
|
|
||||||
;;
|
|
||||||
# Now accept the basic system types.
|
|
||||||
# The portable systems comes first.
|
# 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.
|
# -sysv* is not here because it comes later, after sysvr4.
|
||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||||
| -sym* | -kopensolaris* | -plan9* \
|
| -sym* | -kopensolaris* | -plan9* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* | -aros* | -cloudabi* | -sortix* \
|
| -aos* | -aros* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||||
| -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
|
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||||
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
|
| -bitrig* | -openbsd* | -solidbsd* \
|
||||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
|
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
|
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||||
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
|
|
||||||
| -midnightbsd*)
|
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
|
@ -1407,12 +1402,12 @@ case $os in
|
||||||
-nto*)
|
-nto*)
|
||||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||||
;;
|
;;
|
||||||
-sim | -xray | -os68k* | -v88r* \
|
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||||
| -windows* | -osx | -abug | -netware* | -os9* \
|
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
|
||||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||||
;;
|
;;
|
||||||
-mac*)
|
-mac*)
|
||||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
os=`echo $os | sed -e 's|mac|macos|'`
|
||||||
;;
|
;;
|
||||||
-linux-dietlibc)
|
-linux-dietlibc)
|
||||||
os=-linux-dietlibc
|
os=-linux-dietlibc
|
||||||
|
@ -1421,10 +1416,10 @@ case $os in
|
||||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||||
;;
|
;;
|
||||||
-sunos5*)
|
-sunos5*)
|
||||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||||
;;
|
;;
|
||||||
-sunos6*)
|
-sunos6*)
|
||||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||||
;;
|
;;
|
||||||
-opened*)
|
-opened*)
|
||||||
os=-openedition
|
os=-openedition
|
||||||
|
@ -1435,6 +1430,12 @@ case $os in
|
||||||
-wince*)
|
-wince*)
|
||||||
os=-wince
|
os=-wince
|
||||||
;;
|
;;
|
||||||
|
-osfrose*)
|
||||||
|
os=-osfrose
|
||||||
|
;;
|
||||||
|
-osf*)
|
||||||
|
os=-osf
|
||||||
|
;;
|
||||||
-utek*)
|
-utek*)
|
||||||
os=-bsd
|
os=-bsd
|
||||||
;;
|
;;
|
||||||
|
@ -1459,7 +1460,7 @@ case $os in
|
||||||
-nova*)
|
-nova*)
|
||||||
os=-rtmk-nova
|
os=-rtmk-nova
|
||||||
;;
|
;;
|
||||||
-ns2)
|
-ns2 )
|
||||||
os=-nextstep2
|
os=-nextstep2
|
||||||
;;
|
;;
|
||||||
-nsk*)
|
-nsk*)
|
||||||
|
@ -1481,7 +1482,7 @@ case $os in
|
||||||
-oss*)
|
-oss*)
|
||||||
os=-sysv3
|
os=-sysv3
|
||||||
;;
|
;;
|
||||||
-svr4*)
|
-svr4)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
-svr3)
|
-svr3)
|
||||||
|
@ -1496,38 +1497,32 @@ case $os in
|
||||||
-ose*)
|
-ose*)
|
||||||
os=-ose
|
os=-ose
|
||||||
;;
|
;;
|
||||||
|
-es1800*)
|
||||||
|
os=-ose
|
||||||
|
;;
|
||||||
|
-xenix)
|
||||||
|
os=-xenix
|
||||||
|
;;
|
||||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
|
-aros*)
|
||||||
|
os=-aros
|
||||||
|
;;
|
||||||
-zvmoe)
|
-zvmoe)
|
||||||
os=-zvmoe
|
os=-zvmoe
|
||||||
;;
|
;;
|
||||||
-dicos*)
|
-dicos*)
|
||||||
os=-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*)
|
-nacl*)
|
||||||
;;
|
;;
|
||||||
-ios)
|
|
||||||
;;
|
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Get rid of the `-' at the beginning of $os.
|
# Get rid of the `-' at the beginning of $os.
|
||||||
os=`echo $os | sed 's/[^-]*-//'`
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -1617,12 +1612,12 @@ case $basic_machine in
|
||||||
sparc-* | *-sun)
|
sparc-* | *-sun)
|
||||||
os=-sunos4.1.1
|
os=-sunos4.1.1
|
||||||
;;
|
;;
|
||||||
pru-*)
|
|
||||||
os=-elf
|
|
||||||
;;
|
|
||||||
*-be)
|
*-be)
|
||||||
os=-beos
|
os=-beos
|
||||||
;;
|
;;
|
||||||
|
*-haiku)
|
||||||
|
os=-haiku
|
||||||
|
;;
|
||||||
*-ibm)
|
*-ibm)
|
||||||
os=-aix
|
os=-aix
|
||||||
;;
|
;;
|
||||||
|
@ -1662,7 +1657,7 @@ case $basic_machine in
|
||||||
m88k-omron*)
|
m88k-omron*)
|
||||||
os=-luna
|
os=-luna
|
||||||
;;
|
;;
|
||||||
*-next)
|
*-next )
|
||||||
os=-nextstep
|
os=-nextstep
|
||||||
;;
|
;;
|
||||||
*-sequent)
|
*-sequent)
|
||||||
|
@ -1677,6 +1672,9 @@ case $basic_machine in
|
||||||
i370-*)
|
i370-*)
|
||||||
os=-mvs
|
os=-mvs
|
||||||
;;
|
;;
|
||||||
|
*-next)
|
||||||
|
os=-nextstep3
|
||||||
|
;;
|
||||||
*-gould)
|
*-gould)
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
|
@ -1786,15 +1784,15 @@ case $basic_machine in
|
||||||
vendor=stratus
|
vendor=stratus
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
|
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$basic_machine$os"
|
echo $basic_machine$os
|
||||||
exit
|
exit
|
||||||
|
|
||||||
# Local variables:
|
# Local variables:
|
||||||
# eval: (add-hook 'write-file-functions 'time-stamp)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "timestamp='"
|
# time-stamp-start: "timestamp='"
|
||||||
# time-stamp-format: "%:y-%02m-%02d"
|
# time-stamp-format: "%:y-%02m-%02d"
|
||||||
# time-stamp-end: "'"
|
# time-stamp-end: "'"
|
||||||
|
|
2177
configure.ac
2177
configure.ac
File diff suppressed because it is too large
Load diff
|
@ -5,16 +5,3 @@ SUBDIRS = html
|
||||||
dist_data_DATA = cmdvartab
|
dist_data_DATA = cmdvartab
|
||||||
nodist_data_DATA = driver.list
|
nodist_data_DATA = driver.list
|
||||||
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
||||||
|
|
||||||
# NOTE: Due to portability, we do not use a GNU percent-wildcard extension:
|
|
||||||
#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
spellcheck spellcheck-interactive spellcheck-sortdict:
|
|
||||||
$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="cmdvartab" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
CLEANFILES = *.pdf *.html *-spellchecked
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -17,17 +17,7 @@
|
||||||
# Network UPS Tools: data
|
# Network UPS Tools: data
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -92,24 +82,19 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = data
|
subdir = data
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/driver.list.in $(dist_data_DATA)
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -118,18 +103,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(dist_data_DATA) \
|
|
||||||
$(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES = driver.list
|
CONFIG_CLEAN_FILES = driver.list
|
||||||
|
@ -197,7 +175,7 @@ am__recursive_targets = \
|
||||||
$(RECURSIVE_CLEAN_TARGETS) \
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
$(am__extra_recursive_targets)
|
$(am__extra_recursive_targets)
|
||||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
distdir distdir-am
|
distdir
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
# Read a list of newline-separated strings from the standard input,
|
# Read a list of newline-separated strings from the standard input,
|
||||||
# and print each of them once, without duplicates. Input order is
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
@ -218,7 +196,6 @@ am__define_uniq_tagged_files = \
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/driver.list.in
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
am__relativize = \
|
am__relativize = \
|
||||||
dir0=`pwd`; \
|
dir0=`pwd`; \
|
||||||
|
@ -252,7 +229,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -263,7 +239,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -277,7 +252,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -290,7 +264,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -308,8 +281,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -320,29 +291,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -362,9 +325,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -378,7 +338,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -396,7 +355,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -410,9 +368,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -438,14 +393,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -459,8 +412,6 @@ SUBDIRS = html
|
||||||
dist_data_DATA = cmdvartab
|
dist_data_DATA = cmdvartab
|
||||||
nodist_data_DATA = driver.list
|
nodist_data_DATA = driver.list
|
||||||
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
CLEANFILES = *.pdf *.html *-spellchecked
|
|
||||||
all: all-recursive
|
all: all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -476,13 +427,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu data/Makefile
|
$(AUTOMAKE) --gnu data/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -643,10 +595,7 @@ cscopelist-am: $(am__tagged_files)
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
@ -731,7 +680,6 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
@ -740,7 +688,6 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
@ -824,18 +771,6 @@ uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA
|
||||||
ps ps-am tags tags-am uninstall uninstall-am \
|
ps ps-am tags tags-am uninstall uninstall-am \
|
||||||
uninstall-dist_dataDATA uninstall-nodist_dataDATA
|
uninstall-dist_dataDATA uninstall-nodist_dataDATA
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE: Due to portability, we do not use a GNU percent-wildcard extension:
|
|
||||||
#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
|
|
||||||
$(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
spellcheck spellcheck-interactive spellcheck-sortdict:
|
|
||||||
$(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="cmdvartab" SPELLCHECK_DIR="$(srcdir)" $@
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -84,7 +84,7 @@ VARDESC input.load "Load on (ePDU) input (percent of full)"
|
||||||
VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)"
|
VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)"
|
||||||
VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)"
|
VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)"
|
||||||
VARDESC input.source "The current input power source"
|
VARDESC input.source "The current input power source"
|
||||||
VARDESC input.source.preferred "The preferred input power source"
|
VARDESC input.source.preferred "The prefered input power source"
|
||||||
|
|
||||||
VARDESC output.voltage "Output voltage (V)"
|
VARDESC output.voltage "Output voltage (V)"
|
||||||
VARDESC output.voltage.nominal "Nominal output voltage (V)"
|
VARDESC output.voltage.nominal "Nominal output voltage (V)"
|
||||||
|
@ -94,7 +94,6 @@ VARDESC output.current "Output current (A)"
|
||||||
VARDESC output.current.nominal "Nominal output current (A)"
|
VARDESC output.current.nominal "Nominal output current (A)"
|
||||||
|
|
||||||
VARDESC battery.charge "Battery charge (percent of full)"
|
VARDESC battery.charge "Battery charge (percent of full)"
|
||||||
VARDESC battery.charge.approx "Rough approximation of battery charge"
|
|
||||||
VARDESC battery.charge.low "Remaining battery level when UPS switches to LB (percent)"
|
VARDESC battery.charge.low "Remaining battery level when UPS switches to LB (percent)"
|
||||||
VARDESC battery.charge.restart "Minimum battery level for restart after power off (percent)"
|
VARDESC battery.charge.restart "Minimum battery level for restart after power off (percent)"
|
||||||
VARDESC battery.charge.warning "Battery level when UPS switches to Warning state (percent)"
|
VARDESC battery.charge.warning "Battery level when UPS switches to Warning state (percent)"
|
||||||
|
@ -146,7 +145,7 @@ VARDESC ambient.present "Ambient sensor presence"
|
||||||
VARDESC ambient.contacts.1.status "State of the dry contact sensor 1"
|
VARDESC ambient.contacts.1.status "State of the dry contact sensor 1"
|
||||||
VARDESC ambient.contacts.2.status "State of the dry contact sensor 2"
|
VARDESC ambient.contacts.2.status "State of the dry contact sensor 2"
|
||||||
|
|
||||||
# FIXME: the outlet collection is indexed - solve with regexps?
|
# FIXME: the outlet collection is indexed - solve with regexs?
|
||||||
#
|
#
|
||||||
# VARDESC outlet.[[:digit:]]+.id "Outlet system identifier (<index>)"
|
# VARDESC outlet.[[:digit:]]+.id "Outlet system identifier (<index>)"
|
||||||
|
|
||||||
|
@ -178,7 +177,6 @@ VARDESC outlet.2.delay.start "Interval to wait before restarting this outlet (se
|
||||||
VARDESC driver.name "Driver name"
|
VARDESC driver.name "Driver name"
|
||||||
VARDESC driver.version "Driver version - NUT release"
|
VARDESC driver.version "Driver version - NUT release"
|
||||||
VARDESC driver.version.internal "Internal driver version"
|
VARDESC driver.version.internal "Internal driver version"
|
||||||
VARDESC driver.version.usb "USB library version"
|
|
||||||
|
|
||||||
VARDESC device.part "Device Part Number"
|
VARDESC device.part "Device Part Number"
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
# ========
|
# ========
|
||||||
# - device type:
|
# - device type:
|
||||||
# "ups" for Uninterruptible Power Supply
|
# "ups" for Uninterruptible Power Supply
|
||||||
# "pdu" for Power Distribution Unit
|
# "pdu" for Power Distributions Unit
|
||||||
# "scd" for Solar Controller Device
|
# "scd" for Solar Controlers Device
|
||||||
# "ats" for Automatic Transfer Switch
|
# "ats" for Automatic Transfer Switch
|
||||||
#
|
#
|
||||||
# - support level: a number from "1" to "5" (stars) meaning:
|
# - support level: a number from "1" to "5" (stars) meaning:
|
||||||
|
@ -35,25 +35,15 @@
|
||||||
# Duplicate text in the last field will be cooked out during the conversion
|
# Duplicate text in the last field will be cooked out during the conversion
|
||||||
# to HTML with ROWSPAN magic. They must be an exact match for this to work.
|
# to HTML with ROWSPAN magic. They must be an exact match for this to work.
|
||||||
|
|
||||||
|
"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser"
|
||||||
"Ablerex" "ups" "2" "625L" "USB" "blazer_usb"
|
"Ablerex" "ups" "2" "625L" "USB" "blazer_usb"
|
||||||
"Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser"
|
"Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser"
|
||||||
"Ablerex" "ups" "2" "MARS MS3000RT" "" "blazer_ser"
|
|
||||||
"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser"
|
|
||||||
"Ablerex" "ups" "2" "MP series" "USB" "nutdrv_qx"
|
|
||||||
"Ablerex" "ups" "2" "ARES Plus series" "USB" "nutdrv_qx"
|
|
||||||
"Ablerex" "ups" "2" "MSII series" "USB" "nutdrv_qx"
|
|
||||||
"Ablerex" "ups" "2" "MSIII series" "USB" "nutdrv_qx"
|
|
||||||
"Ablerex" "ups" "2" "GRs series" "USB" "nutdrv_qx"
|
|
||||||
"Ablerex" "ups" "2" "GRs Plus series" "USB" "nutdrv_qx"
|
|
||||||
|
|
||||||
"ActivePower" "ups" "2" "400VA" "" "blazer_ser"
|
"ActivePower" "ups" "2" "400VA" "" "blazer_ser"
|
||||||
"ActivePower" "ups" "2" "1400VA" "" "blazer_ser"
|
"ActivePower" "ups" "2" "1400VA" "" "blazer_ser"
|
||||||
"ActivePower" "ups" "2" "2000VA" "" "blazer_ser"
|
"ActivePower" "ups" "2" "2000VA" "" "blazer_ser"
|
||||||
|
|
||||||
"Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser"
|
"Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser"
|
||||||
"Advice" "ups" "2" "Top V Pro 6-10K" "USB" "blazer_usb" # https://www.advice.co.il/en/advice-products/ups-systems/ups-online-systems/one-phase-ups-5k-10k/%D7%90%D7%9C-%D7%A4%D7%A1%D7%A7-%D7%90%D7%95%D7%9F-%D7%9C%D7%99%D7%99%D7%9F-top-v-pro-6-10k-detail https://github.com/networkupstools/nut/issues/744
|
|
||||||
"Advice" "ups" "2" "PRS850" "USB" "blazer_usb"
|
|
||||||
"Advice" "ups" "2" "PRV700 Pro" "USB" "blazer_usb"
|
|
||||||
|
|
||||||
"AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21"
|
"AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21"
|
||||||
|
|
||||||
|
@ -61,7 +51,6 @@
|
||||||
"AEG Power Solutions" "ups" "3" "PROTECT NAS" "" "usbhid-ups"
|
"AEG Power Solutions" "ups" "3" "PROTECT NAS" "" "usbhid-ups"
|
||||||
"AEG Power Solutions" "ups" "3" "PROTECT B" "" "usbhid-ups"
|
"AEG Power Solutions" "ups" "3" "PROTECT B" "" "usbhid-ups"
|
||||||
|
|
||||||
"APC" "ups" "3" "APC AP9584 Serial-to-USB kit" "USB" "usbhid-ups" # Allows USB connections to Serial-port APC devices, https://github.com/networkupstools/nut/pull/181
|
|
||||||
"APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis"
|
"APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis"
|
||||||
"APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis"
|
"APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis"
|
||||||
"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart"
|
"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart"
|
||||||
|
@ -69,16 +58,13 @@
|
||||||
"APC" "ups" "1" "Smart-UPS" "" "apcsmart"
|
"APC" "ups" "1" "Smart-UPS" "" "apcsmart"
|
||||||
"APC" "ups" "1" "Smart-UPS SMT/SMX/SURTD" "Microlink models with RJ45 socket - they *require* AP9620 SmartSlot expansion card and smart cable" "apcsmart"
|
"APC" "ups" "1" "Smart-UPS SMT/SMX/SURTD" "Microlink models with RJ45 socket - they *require* AP9620 SmartSlot expansion card and smart cable" "apcsmart"
|
||||||
"APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS (USB)" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS USB" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS CS USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups"
|
"APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups"
|
"APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "Back-UPS XS 1000M (Back-UPS Pro 1000, Model BX1000M)" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/139
|
"APC" "ups" "2" "Smart-UPS USB" "USB" "usbhid-ups"
|
||||||
"APC" "ups" "2" "SMC2200BI-BR" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/557
|
|
||||||
"APC" "ups" "2" "Smart-UPS (USB)" "USB" "usbhid-ups"
|
|
||||||
"APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1"
|
"APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1"
|
||||||
"APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2"
|
"APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2"
|
||||||
"APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9"
|
"APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9"
|
||||||
|
@ -91,7 +77,7 @@
|
||||||
"APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12"
|
"APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12"
|
||||||
"APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)"
|
"APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)"
|
||||||
"APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)"
|
"APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)"
|
||||||
"APC" "pdu" "3" "(various APxxxx)" "SNMP monitoring card" "snmp-ups"
|
"APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)"
|
||||||
"APC" "ats" "3" "ATS AP7724" "" "snmp-ups (experimental)"
|
"APC" "ats" "3" "ATS AP7724" "" "snmp-ups (experimental)"
|
||||||
|
|
||||||
"Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)"
|
"Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)"
|
||||||
|
@ -102,8 +88,6 @@
|
||||||
|
|
||||||
"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)"
|
"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"ARES" "ups" "2" "AR265i" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 did not explicitly mention the driver parameters, but other reports in the discussion did
|
|
||||||
|
|
||||||
"ARTronic" "ups" "2" "ARTon Millenium 1/2/3/6/10 kVA" "Serial" "blazer_ser"
|
"ARTronic" "ups" "2" "ARTon Millenium 1/2/3/6/10 kVA" "Serial" "blazer_ser"
|
||||||
"ARTronic" "ups" "2" "ARTon Millenium 3.1 10/15/20 kVA" "Serial" "blazer_ser"
|
"ARTronic" "ups" "2" "ARTon Millenium 3.1 10/15/20 kVA" "Serial" "blazer_ser"
|
||||||
"ARTronic" "ups" "2" "ARTon Titanium 6/10 kVA" "Serial" "blazer_ser"
|
"ARTronic" "ups" "2" "ARTon Titanium 6/10 kVA" "Serial" "blazer_ser"
|
||||||
|
@ -114,8 +98,6 @@
|
||||||
"ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb"
|
"ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb"
|
||||||
"ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb"
|
"ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb"
|
||||||
|
|
||||||
"Armac" "ups" "2" "R/2000I/PSW" "(USB ID 0925:1234)" "nutdrv_qx"
|
|
||||||
|
|
||||||
"ASEM SPA" "ups" "5" "PB1300 UPS" "i2c" "asem"
|
"ASEM SPA" "ups" "5" "PB1300 UPS" "i2c" "asem"
|
||||||
|
|
||||||
"Asium" "ups" "3" "P700" "USB" "blazer_usb" # http://www.asiumpower.com/Asium-ASIUM-P700-650VA-360W/dp/B009SMEQ10
|
"Asium" "ups" "3" "P700" "USB" "blazer_usb" # http://www.asiumpower.com/Asium-ASIUM-P700-650VA-360W/dp/B009SMEQ10
|
||||||
|
@ -136,7 +118,6 @@
|
||||||
"Atlantis Land" "ups" "2" "(various)" "USB" "nutdrv_qx"
|
"Atlantis Land" "ups" "2" "(various)" "USB" "nutdrv_qx"
|
||||||
|
|
||||||
"Aviem Systems" "ups" "2" "Aviem Power RT 1000-3000VA" "" "blazer_ser"
|
"Aviem Systems" "ups" "2" "Aviem Power RT 1000-3000VA" "" "blazer_ser"
|
||||||
"Aviem Systems" "ups" "2" "Aviem Pro 2000VA" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/827
|
|
||||||
|
|
||||||
"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)"
|
"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)"
|
||||||
"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)"
|
"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
@ -204,63 +185,45 @@
|
||||||
"COVER ENERGY SA" "ups" "2" "COVER PRM 1K/2K/3K/6K/10K EC" "" "blazer_usb"
|
"COVER ENERGY SA" "ups" "2" "COVER PRM 1K/2K/3K/6K/10K EC" "" "blazer_usb"
|
||||||
"COVER ENERGY SA" "ups" "2" "COVER PRM 6K/10K PR" "" "blazer_usb"
|
"COVER ENERGY SA" "ups" "2" "COVER PRM 6K/10K PR" "" "blazer_usb"
|
||||||
|
|
||||||
"CPC" "ups" "2" "RACK850VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537
|
|
||||||
|
|
||||||
"Crown" "ups" "2" "CMU-SP1200IEC" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/1014
|
|
||||||
|
|
||||||
"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7"
|
|
||||||
"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS1100AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS1200AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS1250AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS1500AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS1500AVR-HO" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS320AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS320AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS500AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS500AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS650AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS650AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS700AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS700AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS800AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS800AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "ups" "1" "CPS850AVR" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS850AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "CPS900AVR" "" "powerpanel" # http://www.cyberpowersystems.com/products/ups-systems/other-ups/CPS900AVR.html
|
"Cyber Power Systems" "ups" "1" "CPS900AVR" "" "powerpanel" # http://www.cyberpowersystems.com/products/ups-systems/other-ups/CPS900AVR.html
|
||||||
"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel"
|
"Cyber Power Systems" "ups" "1" "CPS1250AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "CPS1500AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7"
|
"Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7"
|
||||||
"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7"
|
||||||
"Cyber Power Systems" "ups" "3" "BL1250U" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/battery-backup/bl1250u/ https://github.com/networkupstools/nut/issues/1012
|
"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7"
|
||||||
"Cyber Power Systems" "ups" "2" "BR1000ELCD" "USB" "usbhid-ups" # https://www.cyberpower.com/eu/en/product/sku/BR1000ELCD https://github.com/networkupstools/nut/issues/552
|
"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "1" "CPS1100AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "1" "CPS1200AVR" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CP850PFCLCD" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/605
|
"Cyber Power Systems" "ups" "1" "CPS1500AVR-HO" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CP1500PFCLCD" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/cp1500pfclcd/ https://github.com/networkupstools/nut/issues/520
|
"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CP900AVR" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "2" "OL3000RMXL2U" "" "powerpanel"
|
||||||
"Cyber Power Systems" "ups" "2" "CPS685AVR" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "CPS685AVR" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "CPS800AVR" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "CPS800AVR" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "OL3000RMXL2U" "" "powerpanel"
|
"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel"
|
"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "Value 1500ELCD-RU" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "3" "CP825AVR-G / LE825G" "USB" "usbhid-ups" # http://www.cyberpowersystems.com/products/ups-systems/retail-products/LE825G.html
|
||||||
|
"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "3" "OR700LCDRM1U" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "3" "PR6000LCDRTXL5U" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "Value 1500ELCD-RU" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "CP1000PFCLCD" "USB" "usbhid-ups"
|
"Cyber Power Systems" "ups" "2" "CP900AVR" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "CP1500EPFCLCD" "USB" "usbhid-ups" # http://www.cyberpower-eu.com/products/ups_systems/pfc-sinewave/cp1500epfclcd.htm
|
"Cyber Power Systems" "ups" "2" "CP1000AVRLCD" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "CP825AVR-G / LE825G" "USB" "usbhid-ups" # http://www.cyberpowersystems.com/products/ups-systems/retail-products/LE825G.html
|
"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "EC350G" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/products/ups/ecologic/ec350g
|
"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "EC750G" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/products/ups/desktop/ec750g
|
"Cyber Power Systems" "ups" "2" "CP1000PFCLCD" "USB" "usbhid-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "EC850LCD" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/ec850lcd/ https://github.com/networkupstools/nut/issues/622
|
|
||||||
"Cyber Power Systems" "ups" "3" "OR1500ERM1U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/1338
|
|
||||||
"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "ups" "3" "OR700LCDRM1U" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "ups" "3" "OR500LCDRM1U" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/or500lcdrm1u/ https://github.com/networkupstools/nut/issues/578
|
|
||||||
"Cyber Power Systems" "ups" "3" "RT650EI" "USB" "usbhid-ups" # http://www.cyberpowersystems.de/produkte/backup-usv-serien/rt-serie.html https://github.com/networkupstools/nut/issues/453
|
|
||||||
"Cyber Power Systems" "ups" "3" "UT2200E" "USB" "usbhid-ups" # https://www.cyberpower.com/ww/en/product/sku/UT2200E https://github.com/networkupstools/nut/issues/556
|
|
||||||
"Cyber Power Systems" "ups" "3" "PR1500RT2U" "" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/new-smart-app-sinewave/pr1500rt2u/ https://github.com/networkupstools/nut/issues/1191
|
|
||||||
"Cyber Power Systems" "ups" "3" "PR6000LCDRTXL5U" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "ups" "3" "PR2200LCDRT2U" "" "snmp-ups"
|
|
||||||
"Cyber Power Systems" "ups" "3" "RMCARD100" "" "snmp-ups"
|
"Cyber Power Systems" "ups" "3" "RMCARD100" "" "snmp-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "RMCARD201" "" "snmp-ups"
|
"Cyber Power Systems" "ups" "3" "RMCARD201" "" "snmp-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "RMCARD202" "" "snmp-ups"
|
"Cyber Power Systems" "ups" "3" "RMCARD202" "" "snmp-ups"
|
||||||
"Cyber Power Systems" "ups" "3" "RMCARD205" "" "snmp-ups"
|
|
||||||
"Cyber Power Systems" "ups" "3" "RMCARD301" "" "snmp-ups"
|
"Cyber Power Systems" "ups" "3" "RMCARD301" "" "snmp-ups"
|
||||||
|
|
||||||
"Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)"
|
"Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
@ -290,24 +253,14 @@
|
||||||
"Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card" "netxml-ups (experimental)"
|
"Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card" "netxml-ups (experimental)"
|
||||||
|
|
||||||
"Delta" "ups" "1" "GES602N" "" "belkin"
|
"Delta" "ups" "1" "GES602N" "" "belkin"
|
||||||
"Delta" "ups" "4" "Delta UPS Amplon R Series" "USB port" "usbhid-ups"
|
|
||||||
|
|
||||||
"Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15"
|
"Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15"
|
||||||
"Deltec" "ups" "4" "PRM 450/700/1000/1500" "" "upscode2"
|
"Deltec" "ups" "4" "PRM 450/700/1000/1500" "" "upscode2"
|
||||||
|
|
||||||
"DEXP" "ups" "2" "MIX 850VA" "USB" "blazer_usb langid_fix=0x0409 runtimecal=240,100,720,50 default.battery.voltage.high=2.27 default.battery.voltage.low=1.72" # https://github.com/networkupstools/nut/issues/721
|
|
||||||
|
|
||||||
"Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)"
|
"Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"DigiTECH" "ups" "2" "Computer 650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/674 (may need longer pollinterval)
|
|
||||||
|
|
||||||
"Digitus" "ups" "1" "DN-170014" "USB" "richcomm_usb" # http://www.digitus.info/en/products/professional-network/security-and-surveillance/power-supply/uninterrruptable-power-supplies/ups-uninterruptible-power-systems-dn-170014/section/prof/
|
"Digitus" "ups" "1" "DN-170014" "USB" "richcomm_usb" # http://www.digitus.info/en/products/professional-network/security-and-surveillance/power-supply/uninterrruptable-power-supplies/ups-uninterruptible-power-systems-dn-170014/section/prof/
|
||||||
"Digitus" "ups" "2" "DN-170020" "" "blazer_ser"
|
"Digitus" "ups" "2" "DN-170020" "" "blazer_ser"
|
||||||
"Digitus" "ups" "2" "DN-170040" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Digitus" "ups" "2" "DN-170041" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Digitus" "ups" "2" "DN-170040" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Digitus" "ups" "2" "DN-170041" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Digitus" "ups" "2" "DN-170076" "USB" "nutdrv_qx" # https://www.digitus.info/en/products/network-and-server-cabinets/power-supply/uninterruptible-power-supplies/dn-170076/ https://github.com/networkupstools/nut/issues/948
|
|
||||||
|
|
||||||
"Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser"
|
"Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser"
|
||||||
"Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser"
|
"Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser"
|
||||||
|
@ -321,7 +274,6 @@
|
||||||
"Eaton" "ups" "5" "Ellipse ECO 650/800/1200/1600 VA" "USB" "usbhid-ups"
|
"Eaton" "ups" "5" "Ellipse ECO 650/800/1200/1600 VA" "USB" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "Ellipse PRO 650 VA" "USB cable" "usbhid-ups"
|
|
||||||
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups"
|
||||||
|
@ -332,32 +284,24 @@
|
||||||
"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups"
|
"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "5E650iUSB" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "5E650iUSB" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "5E1100iUSB" "USB port" "usbhid-ups" # http://powerquality.eaton.com/5E1100iUSB.aspx?CX&GUID=8D85FE66-3102-427C-8F33-B8D56BBDD4D3
|
"Eaton" "ups" "5" "5E1100iUSB" "USB port" "usbhid-ups" # http://powerquality.eaton.com/5E1100iUSB.aspx?CX&GUID=8D85FE66-3102-427C-8F33-B8D56BBDD4D3
|
||||||
"Eaton" "ups" "4" "5E2200" "USB port" "nutdrv_qx"
|
|
||||||
"Eaton" "ups" "5" "5S" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "5S" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "5SC" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "5SC" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "5P" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "5P" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "9SX" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "9SX" "USB port" "usbhid-ups"
|
||||||
"Eaton" "ups" "5" "9PX" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "USB port" "usbhid-ups"
|
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut"
|
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut"
|
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut"
|
"Eaton" "ups" "5" "5SC" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut"
|
"Eaton" "ups" "5" "5P" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "5SC" "Serial port" "mge-shut"
|
"Eaton" "ups" "5" "9SX" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"Eaton" "ups" "5" "5P" "Serial port" "mge-shut"
|
|
||||||
"Eaton" "ups" "5" "9SX" "Serial port" "mge-shut"
|
|
||||||
"Eaton" "ups" "5" "9PX" "Serial port" "mge-shut"
|
|
||||||
"Eaton" "ups" "5" "9PX 2000 RT" "USB port" "mge-shut" # https://github.com/networkupstools/nut/issues/540
|
|
||||||
"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "Serial port" "mge-shut"
|
|
||||||
"Eaton" "ups" "5" "9PX" "SNMP/Web card" "netxml-ups"
|
|
||||||
"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "SNMP/Web card" "netxml-ups"
|
|
||||||
"Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
"Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
||||||
"Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
"Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
"Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb"
|
"Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb"
|
||||||
|
@ -384,21 +328,14 @@
|
||||||
"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups"
|
"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups"
|
||||||
"Eaton" "ups" "5" "Management Card Contact" "Config 3 - Cable 66033" "genericups upstype=7"
|
"Eaton" "ups" "5" "Management Card Contact" "Config 3 - Cable 66033" "genericups upstype=7"
|
||||||
"Eaton" "ats" "5" "Eaton ATS16" "" "snmp-ups"
|
"Eaton" "ats" "5" "Eaton ATS16" "" "snmp-ups"
|
||||||
"Eaton" "ats" "5" "Eaton ATS30" "" "snmp-ups"
|
|
||||||
|
|
||||||
"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser"
|
"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser"
|
||||||
"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser"
|
"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser"
|
||||||
|
|
||||||
"Electrys" "ups" "2" "UPS 2500" "" "nutdrv_qx or blazer_ser"
|
"Electrys" "ups" "2" "UPS 2500" "" "nutdrv_qx or blazer_ser"
|
||||||
|
|
||||||
"Elsist" "ups" "2" "Nemo2.0 160" "USB" "blazer_usb" # http://www.naicon.com/company/wp-content/uploads/2017/05/Manual-NEMO2.0-Ver.02-Eng.pdf https://github.com/networkupstools/nut/issues/719
|
|
||||||
|
|
||||||
"Emerson" "pdu" "3" "PM3000 metered & switched" "" "snmp-ups"
|
|
||||||
|
|
||||||
"Energy Sistem" "ups" "2" "(various)" "" "blazer_ser"
|
"Energy Sistem" "ups" "2" "(various)" "" "blazer_ser"
|
||||||
|
|
||||||
"Energy Technologies" "ups" "2" "DPK1/1-3" "Serial" "blazer_ser" # https://www.tensy.ru/podderzhka/dokumentatsiya/ibp-serii-dpk/ https://github.com/networkupstools/nut/issues/762
|
|
||||||
|
|
||||||
"ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7"
|
"ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7"
|
||||||
"ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro"
|
"ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro"
|
||||||
|
|
||||||
|
@ -414,7 +351,6 @@
|
||||||
"EVER" "ups" "2" "DUO II Pro series" "USB port" "blazer_usb"
|
"EVER" "ups" "2" "DUO II Pro series" "USB port" "blazer_usb"
|
||||||
"EVER" "ups" "2" "POWERLINE RT 1-3kVA series" "USB port" "blazer_usb"
|
"EVER" "ups" "2" "POWERLINE RT 1-3kVA series" "USB port" "blazer_usb"
|
||||||
"EVER" "ups" "2" "POWERLINE RT 6-10kVA series" "USB port" "blazer_usb"
|
"EVER" "ups" "2" "POWERLINE RT 6-10kVA series" "USB port" "blazer_usb"
|
||||||
"EVER" "ups" "4" "ECO Pro AVR CDS series" "USB port" "usbhid-ups"
|
|
||||||
|
|
||||||
"Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15"
|
"Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15"
|
||||||
"Exide" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2"
|
"Exide" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2"
|
||||||
|
@ -466,9 +402,6 @@
|
||||||
|
|
||||||
"Grafenthal" "ups" "2" "PR-3000-HS" "SNMP/Web Minislot card (ref 149G0006)" "snmp-ups" # http://grafenthal.de/produkte/usv/online/pr-hs-serie/pr-3000-hs/?L=3et8
|
"Grafenthal" "ups" "2" "PR-3000-HS" "SNMP/Web Minislot card (ref 149G0006)" "snmp-ups" # http://grafenthal.de/produkte/usv/online/pr-hs-serie/pr-3000-hs/?L=3et8
|
||||||
|
|
||||||
"Greencell" "ups" "2" "Micropower 600" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1080
|
|
||||||
"Greencell" "ups" "2" "Micropower 600" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1080
|
|
||||||
|
|
||||||
"Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb"
|
"Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb"
|
||||||
"Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb"
|
"Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb"
|
||||||
"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb"
|
"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb"
|
||||||
|
@ -476,8 +409,6 @@
|
||||||
"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "Serial port" "blazer_ser"
|
"Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "Serial port" "blazer_ser"
|
||||||
"Gtec" "ups" "2" "AP160N-1K / AP160LCD-1K-KS / AP160N-2K / AP160LCD-2K-KS / AP160N-3K / AP160LCD-3K-KS / AP160N-6K-PDU / AP160N-10K-PDU" "Serial port" "blazer_ser"
|
"Gtec" "ups" "2" "AP160N-1K / AP160LCD-1K-KS / AP160N-2K / AP160LCD-2K-KS / AP160N-3K / AP160LCD-3K-KS / AP160N-6K-PDU / AP160N-10K-PDU" "Serial port" "blazer_ser"
|
||||||
|
|
||||||
"Guardian" "ups" "2" "LCD 1500 AP (IGA1500LCD)" "Serial" "nutdrv_qx"
|
|
||||||
|
|
||||||
"HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart"
|
"HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart"
|
||||||
"HP" "ups" "3" "T750 G2" "Serial port" "bcmxcp"
|
"HP" "ups" "3" "T750 G2" "Serial port" "bcmxcp"
|
||||||
"HP" "ups" "3" "T1000 G3" "Serial port" "bcmxcp"
|
"HP" "ups" "3" "T1000 G3" "Serial port" "bcmxcp"
|
||||||
|
@ -486,8 +417,8 @@
|
||||||
"HP" "ups" "4" "R3000 XR" "" "bcmxcp"
|
"HP" "ups" "4" "R3000 XR" "" "bcmxcp"
|
||||||
"HP" "ups" "4" "R5500 XR" "" "bcmxcp"
|
"HP" "ups" "4" "R5500 XR" "" "bcmxcp"
|
||||||
"HP" "ups" "3" "T500 / T750" "older models, USB port" "bcmxcp_usb"
|
"HP" "ups" "3" "T500 / T750" "older models, USB port" "bcmxcp_usb"
|
||||||
"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut"
|
"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut"
|
"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"HP" "ups" "3" "T750 INTL" "" "usbhid-ups"
|
"HP" "ups" "3" "T750 INTL" "" "usbhid-ups"
|
||||||
"HP" "ups" "3" "T1000 INTL" "" "usbhid-ups"
|
"HP" "ups" "3" "T1000 INTL" "" "usbhid-ups"
|
||||||
"HP" "ups" "3" "T1500 INTL" "" "usbhid-ups"
|
"HP" "ups" "3" "T1500 INTL" "" "usbhid-ups"
|
||||||
|
@ -501,15 +432,8 @@
|
||||||
"HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module" "snmp-ups"
|
"HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module" "snmp-ups"
|
||||||
"HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)"
|
"HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"HPE" "pdu" "5" "Various (SNMP mode)" "" "snmp-ups"
|
|
||||||
|
|
||||||
"Huawei" "ups" "4" "UPS5000-E" "" "snmp-ups"
|
"Huawei" "ups" "4" "UPS5000-E" "" "snmp-ups"
|
||||||
"Huawei" "ups" "3" "UPS2000-G and UPS2000-A series" "MODBUS (USB with Linux 5.12+, or Serial RS-232)" "huawei-ups2000" # https://github.com/networkupstools/nut/issues/1066 https://github.com/networkupstools/nut/pull/1198 https://github.com/networkupstools/nut/pull/954 https://github.com/networkupstools/nut/issues/1017
|
|
||||||
|
|
||||||
"Hunnox" "ups" "2" "HNX-850" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638
|
|
||||||
|
|
||||||
"IBM" "ups" "5" "Various" "USB port" "usbhid-ups"
|
|
||||||
"IBM" "ups" "5" "Various" "Serial port" "mge-shut"
|
|
||||||
"IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)"
|
"IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)"
|
"ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)"
|
||||||
|
@ -537,12 +461,10 @@
|
||||||
|
|
||||||
"IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)"
|
"IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"Ippon" "ups" "2" "Back Basic 850 Euro" "USB" "blazer_usb (experimental)" # https://github.com/networkupstools/nut/issues/802
|
|
||||||
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser"
|
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser"
|
||||||
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)"
|
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)"
|
||||||
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser"
|
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser"
|
||||||
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)"
|
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)"
|
||||||
"Ippon" "ups" "2" "Back Comfo Pro II 650/850/1050" "USB" "blazer_usb (experimental)"
|
|
||||||
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser"
|
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser"
|
||||||
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)"
|
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)"
|
||||||
"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser"
|
"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser"
|
||||||
|
@ -560,8 +482,6 @@
|
||||||
"Kanji" "ups" "1" "800 VA" "USB" "nutdrv_atcl_usb"
|
"Kanji" "ups" "1" "800 VA" "USB" "nutdrv_atcl_usb"
|
||||||
|
|
||||||
"Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser"
|
"Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser"
|
||||||
"Kebo" "ups" "2" "UPS-1000D (UPS-1000VA)" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/981
|
|
||||||
"Kebo" "ups" "2" "UPS-650VA" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K TOWER" "" "blazer_usb"
|
"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K TOWER" "" "blazer_usb"
|
||||||
"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K XL TOWER" "" "blazer_usb"
|
"KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K XL TOWER" "" "blazer_usb"
|
||||||
|
@ -575,43 +495,7 @@
|
||||||
|
|
||||||
"LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095"
|
"LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095"
|
||||||
|
|
||||||
"Legrand" "ups" "2" "Daker DK" "Serial" "nutdrv_qx"
|
"Legrand" "ups" "2" "Keor Multiplug" "" "nutdrv_qx"
|
||||||
"Legrand" "ups" "2" "Daker DK" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Daker DK Plus" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Daker DK Plus" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor Line RT" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor Line RT" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor LP" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor Multiplug" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor S" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor S" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Keor PDU" "USB" "usbhid-ups"
|
|
||||||
"Legrand" "ups" "2" "Keor SP" "USB" "usbhid-ups"
|
|
||||||
"Legrand" "ups" "2" "Keor SPX" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "4" "Megaline 1250" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 2500" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 3750" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 5000" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 5000 /2" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 6250 /2" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 7500 /2" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 8750 /2" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "Megaline 10000 /2" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "2" "Niky" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Niky" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Niky S" "Serial" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "2" "Niky S" "USB" "nutdrv_qx"
|
|
||||||
"Legrand" "ups" "4" "WHAD 800" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD 1000" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD 1250" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD 1500" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD 2000" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD 2500" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD CAB 1250" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD CAB 2500" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD HE 800" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD HE 1000" "Serial" "metasys"
|
|
||||||
"Legrand" "ups" "4" "WHAD HE 1500" "Serial" "metasys"
|
|
||||||
|
|
||||||
"Lestar" "ups" "2" "MD-800E" "" "blazer_ser"
|
"Lestar" "ups" "2" "MD-800E" "" "blazer_ser"
|
||||||
|
|
||||||
|
@ -622,8 +506,6 @@
|
||||||
"Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)"
|
"Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)"
|
||||||
"Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups"
|
"Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups"
|
||||||
"Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups"
|
"Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups"
|
||||||
"Liebert" "ups" "2" "PowerSure PSA 500" "USB" "usbhid-ups"
|
|
||||||
"Liebert" "ups" "2" "PowerSure PSA500MT3-230U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/601
|
|
||||||
"Liebert" "ups" "2" "PowerSure PSI 1440" "USB" "usbhid-ups" # http://www.emersonnetworkpower.com/en-US/Products/ACPower/Pages/LiebertPowerSurePSILineInteractiveUPS10003000VA.aspx
|
"Liebert" "ups" "2" "PowerSure PSI 1440" "USB" "usbhid-ups" # http://www.emersonnetworkpower.com/en-US/Products/ACPower/Pages/LiebertPowerSurePSILineInteractiveUPS10003000VA.aspx
|
||||||
|
|
||||||
"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)"
|
"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)"
|
||||||
|
@ -638,50 +520,48 @@
|
||||||
"Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf
|
"Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf
|
||||||
"Mecer" "ups" "2" "ME-2000" "" "blazer_ser"
|
"Mecer" "ups" "2" "ME-2000" "" "blazer_ser"
|
||||||
|
|
||||||
"Meta System" "ups" "4" "HF Line" "1..4 boards" "metasys"
|
"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys"
|
||||||
"Meta System" "ups" "4" "HF Line /2" "5..8 boards" "metasys"
|
"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys"
|
||||||
"Meta System" "ups" "4" "HF Millennium 810" "" "metasys"
|
"Meta System" "ups" "1" "HF Millennium 810" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF Millennium 820" "" "metasys"
|
"Meta System" "ups" "1" "HF Millennium 820" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 910" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 920" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 930" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 940" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 950" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 960" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 970" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys"
|
||||||
"Meta System" "ups" "4" "HF TOP Line 980" "" "metasys"
|
"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 750" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 750" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 1000" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 1000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 1050" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 1050" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 1500" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 1500" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 1800" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 1800" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 2000" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 2000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 2100" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 2100" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 2500" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 2500" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO Network 3000" "" "metasys"
|
"Meta System" "ups" "1" "ECO Network 3000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 305" "" "metasys"
|
"Meta System" "ups" "1" "ECO 305" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 308" "" "metasys"
|
"Meta System" "ups" "1" "ECO 308" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 311" "" "metasys"
|
"Meta System" "ups" "1" "ECO 311" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 511" "" "metasys"
|
"Meta System" "ups" "1" "ECO 511" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 516" "" "metasys"
|
"Meta System" "ups" "1" "ECO 516" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 519" "" "metasys"
|
"Meta System" "ups" "1" "ECO 519" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ECO 522" "" "metasys"
|
"Meta System" "ups" "1" "ECO 522" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 800" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 800" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 1000" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 1000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 1250" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 1250" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 1600" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 1600" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 2000" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 2000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "ally HF 2500" "" "metasys"
|
"Meta System" "ups" "1" "ally HF 2500" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 1250" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 1250" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 2500" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 2500" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 3750" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 3750" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 5000" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 5000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 6250" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 6250" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 7500" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 7500" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 8750" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 8750" "" "metasys"
|
||||||
"Meta System" "ups" "4" "Megaline 10000" "" "metasys"
|
"Meta System" "ups" "1" "Megaline 10000" "" "metasys"
|
||||||
"Meta System" "ups" "4" "DHEA 1000" "Serial" "metasys"
|
|
||||||
"Meta System" "ups" "4" "DHEA 1500" "Serial" "metasys"
|
|
||||||
|
|
||||||
"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups"
|
"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
||||||
|
@ -692,15 +572,15 @@
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut"
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
||||||
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
||||||
|
@ -748,45 +628,45 @@
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or oldmge-shut or mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or oldmge-shut or mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk"
|
||||||
|
@ -798,7 +678,7 @@
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut"
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or oldmge-shut"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)"
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
"MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
||||||
"MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
"MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
||||||
|
@ -871,14 +751,10 @@
|
||||||
"Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16"
|
"Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16"
|
||||||
"Nitram" "ups" "1" "Elite 2005" "" "powerpanel"
|
"Nitram" "ups" "1" "Elite 2005" "" "powerpanel"
|
||||||
|
|
||||||
"nJoy" "ups" "2" "Keen 600" "USB" "blazer_ser port=/dev/ttyUSB0" # https://www.njoy.ro/UPS/keen-600
|
|
||||||
"nJoy" "ups" "2" "Keen 600" "USB" "nutdrv_qx port=/dev/ttyUSB0" # https://www.njoy.ro/UPS/keen-600
|
|
||||||
"nJoy" "ups" "3" "Aten PRO 3000" "SNMP" "snmp-ups" # At least basic status is served; https://www.njoy.global/product/aten-pro-3000
|
|
||||||
|
|
||||||
"Novex" "ups" "1" "NUPS-650" "USB" "blazer_usb protocol=megatec" # http://komp.1k.by/periphery-ups/novex/Novex_NUPS_650-130052.html
|
"Novex" "ups" "1" "NUPS-650" "USB" "blazer_usb protocol=megatec" # http://komp.1k.by/periphery-ups/novex/Novex_NUPS_650-130052.html
|
||||||
|
|
||||||
"Numeric" "ups" "2" "3000 SW" "" "blazer_ser"
|
"Numeric" "ups" "2" "3000 SW" "" "blazer_ser"
|
||||||
"Numeric" "ups" "2" "Digital 800 plus" "USB" "nutdrv_qx or blazer_usb"
|
"Numeric" "ups" "2" "Digital 800 plus" "USB" "blazer_usb"
|
||||||
|
|
||||||
"Oneac" "ups" "1" "ON400" "advanced interface" "oneac"
|
"Oneac" "ups" "1" "ON400" "advanced interface" "oneac"
|
||||||
"Oneac" "ups" "1" "ON600" "advanced interface" "oneac"
|
"Oneac" "ups" "1" "ON600" "advanced interface" "oneac"
|
||||||
|
@ -902,24 +778,16 @@
|
||||||
"Online" "ups" "2" "Zinto A" "" "blazer_usb"
|
"Online" "ups" "2" "Zinto A" "" "blazer_usb"
|
||||||
"Online" "ups" "1" "Zinto D" "" "optiups"
|
"Online" "ups" "1" "Zinto D" "" "optiups"
|
||||||
"Online" "ups" "2" "Yunto YQ450" "" "blazer_usb"
|
"Online" "ups" "2" "Yunto YQ450" "" "blazer_usb"
|
||||||
"Online" "ups" "2" "Xanto S700" "/dev/ttyUSB0" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1279
|
|
||||||
|
|
||||||
"OnLite" "ups" "2" "AQUA" "50" "blazer_ser"
|
"OnLite" "ups" "2" "AQUA" "50" "blazer_ser"
|
||||||
|
|
||||||
"Opti-UPS" "ups" "1" "PowerES" "420E" "optiups"
|
"Opti-UPS" "ups" "1" "PowerES" "420E" "optiups"
|
||||||
"Opti-UPS" "ups" "1" "VS 575C" "type=OPTI" "powercom"
|
"Opti-UPS" "ups" "1" "VS 575C" "type=OPTI" "powercom"
|
||||||
"Opti-UPS" "ups" "1" "Power Series" "PS1500E" "blazer_usb"
|
|
||||||
|
|
||||||
"Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser"
|
"Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser"
|
||||||
"Orvaldi Power Protection" "ups" "2" "750 / 900SP" "" "blazer_usb"
|
"Orvaldi Power Protection" "ups" "2" "750 / 900SP" "" "blazer_usb"
|
||||||
|
|
||||||
"Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser"
|
"Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser"
|
||||||
"Phasak" "ups" "2" "9465 or P6N" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1187 => Voltronic-QS-Hex protocol detected
|
|
||||||
|
|
||||||
"PhoenixContact" "ups" "4" "QUINT-UPS/24DC" "2320461" "phoenixcontact_modbus" #https://www.phoenixcontact.com/online/portal/us?uri=pxc-oc-itemdetail:pid=2320461
|
|
||||||
|
|
||||||
"PiJuice" "ups" "5" "PiJuice HAT" "" "pijuice" # https://github.com/PiSupply/PiJuice/issues/124
|
|
||||||
"PiJuice" "ups" "5" "PiJuice Zero pHAT" "" "pijuice"
|
|
||||||
|
|
||||||
"Plexus" "ups" "2" "500VA" "USB" "blazer_usb"
|
"Plexus" "ups" "2" "500VA" "USB" "blazer_usb"
|
||||||
"Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb"
|
"Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb"
|
||||||
|
@ -944,14 +812,6 @@
|
||||||
"Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)"
|
"Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)"
|
||||||
"Powercom" "ups" "5" "BNT-xxxAP" "USB (product id: 0004)" "usbhid-ups (experimental)"
|
"Powercom" "ups" "5" "BNT-xxxAP" "USB (product id: 0004)" "usbhid-ups (experimental)"
|
||||||
"Powercom" "ups" "1" "BNT-xxxAP" "USB (product id: 0001)" "usbhid-ups (experimental)"
|
"Powercom" "ups" "1" "BNT-xxxAP" "USB (product id: 0001)" "usbhid-ups (experimental)"
|
||||||
"Powercom" "ups" "3" "RPT-600AP" "USB" "usbhid-ups" # http://pcmups.com.tw/eA/html/product/show.php?num=226&root=13&kind=105&page=1&keyword= https://github.com/networkupstools/nut/issues/633
|
|
||||||
"Powercom" "ups" "3" "Raptor 2000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/633
|
|
||||||
|
|
||||||
"Powercool" "ups" "1" "350VA to 1600VA" "USB" "nutdrv_atcl_usb"
|
|
||||||
"Powercool" "ups" "2" "650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537
|
|
||||||
"Powercool" "ups" "2" "650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 bus=001 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor norating noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537
|
|
||||||
"Powercool" "ups" "2" "1500VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 - e.g. battery percentage is not being returned
|
|
||||||
"Powercool" "ups" "2" "2000VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537
|
|
||||||
|
|
||||||
"POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb"
|
"POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb"
|
||||||
|
|
||||||
|
@ -979,18 +839,6 @@
|
||||||
"PowerWalker" "ups" "2" "Line-Interactive VI 850 LCD" "" "blazer_usb"
|
"PowerWalker" "ups" "2" "Line-Interactive VI 850 LCD" "" "blazer_usb"
|
||||||
"PowerWalker" "ups" "2" "Online VFI 1000RT/1500RT/2000RT/3000RT/6000RT/10000RT LCD" "" "blazer_usb"
|
"PowerWalker" "ups" "2" "Online VFI 1000RT/1500RT/2000RT/3000RT/6000RT/10000RT LCD" "" "blazer_usb"
|
||||||
"PowerWalker" "ups" "2" "Line-Interactive VI 1000RT/1500RT/2000RT/3000RT LCD" "" "blazer_usb"
|
"PowerWalker" "ups" "2" "Line-Interactive VI 1000RT/1500RT/2000RT/3000RT LCD" "" "blazer_usb"
|
||||||
"PowerWalker" "ups" "2" "VFI 1000 CG PF1" "" "nutdrv_qx" # https://powerwalker.com/?page=product&item=10122108&lang=en
|
|
||||||
"PowerWalker" "ups" "2" "VFI 2000 TGS" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/560 and https://github.com/networkupstools/nut/pull/564
|
|
||||||
"PowerWalker" "ups" "2" "VI 650 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/483
|
|
||||||
"PowerWalker" "ups" "2" "VI 650/850 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646
|
|
||||||
"PowerWalker" "ups" "2" "VI 1200 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/1270
|
|
||||||
"PowerWalker" "ups" "2" "VI 2200 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/756
|
|
||||||
"PowerWalker" "ups" "2" "VI 1200 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646
|
|
||||||
"PowerWalker" "ups" "2" "VI 2200 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646
|
|
||||||
"PowerWalker" "ups" "2" "Basic VI 1000 SB" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/818
|
|
||||||
"PowerWalker" "ups" "2" "PR1500LCDRT2U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/818
|
|
||||||
"PowerWalker" "ups" "2" "VI 3000 SCL" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/971
|
|
||||||
"PowerWalker" "ups" "2" "VI 750T/HID" "USB" "usbhid-ups" # https://powerwalker.com/?page=select&cat=VI_THID&lang=en https://github.com/networkupstools/nut/issues/774
|
|
||||||
|
|
||||||
"Powerware" "ups" "4" "3110" "" "genericups upstype=7"
|
"Powerware" "ups" "4" "3110" "" "genericups upstype=7"
|
||||||
"Powerware" "ups" "4" "3115" "" "genericups upstype=11"
|
"Powerware" "ups" "4" "3115" "" "genericups upstype=11"
|
||||||
|
@ -1020,7 +868,6 @@
|
||||||
"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)"
|
"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)"
|
"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)"
|
"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
"Raritan" "pdu" "3" "Dominion PX2" "" "snmp-ups"
|
|
||||||
|
|
||||||
"REDi" "ups" "2" "Blazer 400VA / 600VA / 800VA" "" "blazer_ser"
|
"REDi" "ups" "2" "Blazer 400VA / 600VA / 800VA" "" "blazer_ser"
|
||||||
|
|
||||||
|
@ -1030,8 +877,8 @@
|
||||||
|
|
||||||
"Riello" "ups" "3" "Riello Sentinel SDL 6000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
|
"Riello" "ups" "3" "Riello Sentinel SDL 6000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
|
||||||
"Riello" "ups" "3" "Riello Sentinel Dual SDH 1000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
|
"Riello" "ups" "3" "Riello Sentinel Dual SDH 1000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
|
||||||
"Riello" "ups" "4" "IDG 400/600/800/1200/1600" "" "riello_usb"
|
"Riello" "ups" "5" "IDG 400/600/800/1200/1600" "" "riello_usb"
|
||||||
"Riello" "ups" "4" "IPG 600/800" "" "riello_usb"
|
"Riello" "ups" "5" "IPG 600/800" "" "riello_usb"
|
||||||
"Riello" "ups" "5" "WPG 400/600/800" "" "riello_usb"
|
"Riello" "ups" "5" "WPG 400/600/800" "" "riello_usb"
|
||||||
"Riello" "ups" "5" "NPW 600/800/1000/1500/2000" "" "riello_usb"
|
"Riello" "ups" "5" "NPW 600/800/1000/1500/2000" "" "riello_usb"
|
||||||
"Riello" "ups" "5" "NDG 800/1000/1500/2000" "" "riello_usb"
|
"Riello" "ups" "5" "NDG 800/1000/1500/2000" "" "riello_usb"
|
||||||
|
@ -1071,37 +918,10 @@
|
||||||
|
|
||||||
"Rucelf" "ups" "2" "Rucelf UPOII-3000-96-EL" "" "blazer_ser" # http://www.rucelf.ua/en/catalog/upoii-3000-96-el/
|
"Rucelf" "ups" "2" "Rucelf UPOII-3000-96-EL" "" "blazer_ser" # http://www.rucelf.ua/en/catalog/upoii-3000-96-el/
|
||||||
|
|
||||||
"Salicru" "ups" "2" "SPS ONE 700VA" "USB" "blazer_usb"
|
|
||||||
"Salicru" "ups" "2" "SPS ONE 2000VA" "USB" "nutdrv_qx" # https://www.salicru.com/en/ups/sps-one.html https://github.com/networkupstools/nut/issues/554
|
|
||||||
"Salicru" "ups" "2" "SPS 650/850 HOME" "usb" "usbhid-ups (experimental)"
|
|
||||||
"Salicru" "ups" "2" "SLC TWIN PRO2" "usb" "usbhid-ups (experimental)" # https://github.com/networkupstools/nut/issues/450
|
|
||||||
"Salicru" "ups" "2" "SLC-1500-TWIN PRO3" "usb" "usbhid-ups (experimental)" # https://github.com/networkupstools/nut/issues/1142
|
|
||||||
"Salicru" "ups" "2" "SLC TWINPRO3" "usb" "usbhid-ups (experimental)"
|
|
||||||
"Salicru" "ups" "2" "SLC TWIN RT3" "usb" "usbhid-ups (experimental)"
|
|
||||||
|
|
||||||
"Santak" "ups" "2" "Castle C*K" "Serial" "blazer_ser" # https://github.com/networkupstools/nut/issues/1039
|
|
||||||
"Santak" "ups" "2" "MT*-PRO" "Serial" "blazer_ser" # https://github.com/networkupstools/nut/issues/1039
|
|
||||||
|
|
||||||
"Siemens" "ups" "4" "SITOP UPS500" "serial" "nutdrv_siemens_sitop (experimental, untested)"
|
|
||||||
"Siemens" "ups" "4" "SITOP UPS500" "USB" "nutdrv_siemens_sitop (experimental)"
|
|
||||||
|
|
||||||
"SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)"
|
"SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
"SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser"
|
"SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser"
|
||||||
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-600" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-600-XPS" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-600-LED-C13" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-600-LED-C13-PRO" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-800" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-800-LED-С13" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-1000-XPS" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-1200" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-1500" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-2000" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-2000-XPS" "" "nutdrv_qx"
|
|
||||||
"SNR" "ups" "2" "SNR-UPS-LID-3000-XPS" "" "nutdrv_qx"
|
|
||||||
|
|
||||||
"SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7"
|
"SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7"
|
||||||
"SOLA" "ups" "1" "325" "" "blazer_ser or bestups"
|
"SOLA" "ups" "1" "325" "" "blazer_ser or bestups"
|
||||||
"SOLA" "ups" "1" "520" "" "blazer_ser or bestups"
|
"SOLA" "ups" "1" "520" "" "blazer_ser or bestups"
|
||||||
|
@ -1142,13 +962,11 @@
|
||||||
"Sweex" "ups" "2" "INTELLIGENT UPS 1500VA P220" "USB" "blazer_usb (USB ID 0665:5161)" # http://www.sweex.com/en/notebook-pc-accessoires/ups/PP220/
|
"Sweex" "ups" "2" "INTELLIGENT UPS 1500VA P220" "USB" "blazer_usb (USB ID 0665:5161)" # http://www.sweex.com/en/notebook-pc-accessoires/ups/PP220/
|
||||||
|
|
||||||
"Syndome" "ups" "2" "Era 500VA" "USB" "blazer_usb"
|
"Syndome" "ups" "2" "Era 500VA" "USB" "blazer_usb"
|
||||||
"Syndome" "ups" "2" "Atom LCD-1000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/483
|
|
||||||
|
|
||||||
"Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser"
|
"Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser"
|
||||||
|
|
||||||
"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser"
|
"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser"
|
||||||
"Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "USB" "blazer_usb langid_fix=0x409"
|
"Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "" "blazer_usb langid_fix=0x409"
|
||||||
"Tecnoware" "ups" "2" "UPS ERA PLUS 1100" "USB" "blazer_usb" # https://www.tecnoware.com/Prodotti/FGCERAPL1100/ups-era-plus-1100.aspx https://github.com/networkupstools/nut/issues/747
|
|
||||||
|
|
||||||
"Tripp Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5"
|
"Tripp Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5"
|
||||||
"Tripp Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups"
|
"Tripp Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups"
|
||||||
|
@ -1250,8 +1068,7 @@
|
||||||
"Tripp Lite" "ups" "3" "SMX3000RT2UTAA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4396
|
"Tripp Lite" "ups" "3" "SMX3000RT2UTAA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4396
|
||||||
"Tripp Lite" "ups" "3" "SMX3000XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2694
|
"Tripp Lite" "ups" "3" "SMX3000XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2694
|
||||||
"Tripp Lite" "ups" "3" "SMX3000XLRT2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5658
|
"Tripp Lite" "ups" "3" "SMX3000XLRT2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5658
|
||||||
"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (older; product ID 0001, protocol 3005)" "tripplite_usb" # https://www.tripplite.com/support/product/part-number/SMX500RT1U https://github.com/networkupstools/nut/pull/584
|
"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2691
|
||||||
"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (newer; protocol/product ID 3005)" "usbhid-ups" # https://www.tripplite.com/support/product/part-number/SMX500RT1U
|
|
||||||
"Tripp Lite" "ups" "3" "SMX750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3021
|
"Tripp Lite" "ups" "3" "SMX750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3021
|
||||||
"Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194
|
"Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194
|
||||||
"Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070
|
"Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070
|
||||||
|
@ -1302,8 +1119,6 @@
|
||||||
"UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb"
|
"UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb"
|
||||||
"UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb"
|
"UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb"
|
||||||
|
|
||||||
"V7" "ups" "2" "UPS1RM2U1500-1E" "USB" "blazer_usb" # http://www.v7world.com/uk/ups-1500va-rack-mount-2u-eu.html https://github.com/networkupstools/nut/issues/716
|
|
||||||
|
|
||||||
"Various" "ups" "4" "(various)" "SEC protocol" "gamatronic"
|
"Various" "ups" "4" "(various)" "SEC protocol" "gamatronic"
|
||||||
"Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4"
|
"Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4"
|
||||||
"Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21"
|
"Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21"
|
||||||
|
@ -1334,8 +1149,6 @@
|
||||||
"Voltronic Power" "ups" "2" "Frigate TX 1KVA" "USB" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Frigate TX 1KVA" "USB" "nutdrv_qx"
|
||||||
"Voltronic Power" "ups" "2" "Galleon 1KVA" "Serial" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Galleon 1KVA" "Serial" "nutdrv_qx"
|
||||||
"Voltronic Power" "ups" "2" "Galleon 1KVA" "USB" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Galleon 1KVA" "USB" "nutdrv_qx"
|
||||||
"Voltronic Power" "ups" "2" "Galleon X9-RT LCD-1-3K" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Voltronic Power" "ups" "2" "Galleon X9-RT LCD-1-3K" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251
|
|
||||||
"Voltronic Power" "ups" "2" "Imperial 1KVA" "Serial" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Imperial 1KVA" "Serial" "nutdrv_qx"
|
||||||
"Voltronic Power" "ups" "2" "Imperial 1KVA" "USB" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Imperial 1KVA" "USB" "nutdrv_qx"
|
||||||
"Voltronic Power" "ups" "2" "Prosine 800" "Serial" "nutdrv_qx"
|
"Voltronic Power" "ups" "2" "Prosine 800" "Serial" "nutdrv_qx"
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
# Network UPS Tools: data/html
|
# Network UPS Tools: data/html
|
||||||
# install these only if configured --with-cgi
|
# install these only if configured --with-cgi
|
||||||
if WITH_CGI
|
if WITH_CGI
|
||||||
dist_html_DATA = index.html bottom.html nut-banner.png
|
dist_html_DATA = index.html bottom.html nut-banner.png
|
||||||
nodist_html_DATA = header.html
|
nodist_html_DATA = header.html
|
||||||
endif
|
endif
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
# Generated by configure script:
|
|
||||||
DISTCLEANFILES = header.html
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -15,17 +15,7 @@
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__is_gnu_make = { \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
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 = \
|
am__make_running_with_option = \
|
||||||
case $${target_option-} in \
|
case $${target_option-} in \
|
||||||
?) ;; \
|
?) ;; \
|
||||||
|
@ -90,24 +80,19 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = data/html
|
subdir = data/html
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/header.html.in $(am__dist_html_DATA_DIST) README
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
$(top_srcdir)/m4/ax_c_pragmas.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_compare_version.m4 \
|
|
||||||
$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
|
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_cppcheck.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_headers_windows.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
$(top_srcdir)/m4/nut_check_libavahi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
$(top_srcdir)/m4/nut_check_libltdl.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libmodbus.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
$(top_srcdir)/m4/nut_check_libnss.m4 \
|
||||||
|
@ -116,18 +101,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_check_python.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_compiler_family.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_stash_warnings.m4 \
|
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.ac
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_html_DATA_DIST) \
|
|
||||||
$(am__DIST_COMMON)
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES = header.html
|
CONFIG_CLEAN_FILES = header.html
|
||||||
|
@ -182,8 +160,6 @@ am__uninstall_files_from_dir = { \
|
||||||
am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"
|
am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"
|
||||||
DATA = $(dist_html_DATA) $(nodist_html_DATA)
|
DATA = $(dist_html_DATA) $(nodist_html_DATA)
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/header.html.in \
|
|
||||||
README
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
A2X = @A2X@
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
|
@ -192,7 +168,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
ASCIIDOC = @ASCIIDOC@
|
ASCIIDOC = @ASCIIDOC@
|
||||||
ASPELL = @ASPELL@
|
ASPELL = @ASPELL@
|
||||||
AUGPARSE = @AUGPARSE@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -203,7 +178,6 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CONFPATH = @CONFPATH@
|
CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPCHECK = @CPPCHECK@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
|
||||||
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
CPPUNIT_LIBS = @CPPUNIT_LIBS@
|
||||||
|
@ -217,7 +191,6 @@ DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
DLLTOOL = @DLLTOOL@
|
DLLTOOL = @DLLTOOL@
|
||||||
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DOC_CHECK_LIST = @DOC_CHECK_LIST@
|
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -230,7 +203,6 @@ ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
FGREP = @FGREP@
|
FGREP = @FGREP@
|
||||||
GDLIB_CONFIG = @GDLIB_CONFIG@
|
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
@ -248,8 +220,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@
|
||||||
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
LIBIPMI_LIBS = @LIBIPMI_LIBS@
|
||||||
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@
|
||||||
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
LIBLTDL_LIBS = @LIBLTDL_LIBS@
|
||||||
LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@
|
|
||||||
LIBMODBUS_LIBS = @LIBMODBUS_LIBS@
|
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LIBS = @LIBNEON_LIBS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
|
@ -260,29 +230,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LIBS = @LIBSSL_LIBS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBSSL_REQUIRES = @LIBSSL_REQUIRES@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_CONFIG = @LIBUSB_CONFIG@
|
|
||||||
LIBUSB_LIBS = @LIBUSB_LIBS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LN_S_R = @LN_S_R@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
NETLIBS = @NETLIBS@
|
NETLIBS = @NETLIBS@
|
||||||
NET_SNMP_CONFIG = @NET_SNMP_CONFIG@
|
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
NMEDIT = @NMEDIT@
|
NMEDIT = @NMEDIT@
|
||||||
NUT_DATADIR = @NUT_DATADIR@
|
|
||||||
NUT_LIBEXECDIR = @NUT_LIBEXECDIR@
|
|
||||||
NUT_NETVERSION = @NUT_NETVERSION@
|
NUT_NETVERSION = @NUT_NETVERSION@
|
||||||
OBJDUMP = @OBJDUMP@
|
OBJDUMP = @OBJDUMP@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
@ -302,9 +264,6 @@ PKG_CONFIG = @PKG_CONFIG@
|
||||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
PORT = @PORT@
|
PORT = @PORT@
|
||||||
PYTHON = @PYTHON@
|
|
||||||
PYTHON2 = @PYTHON2@
|
|
||||||
PYTHON3 = @PYTHON3@
|
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
RUN_AS_GROUP = @RUN_AS_GROUP@
|
RUN_AS_GROUP = @RUN_AS_GROUP@
|
||||||
RUN_AS_USER = @RUN_AS_USER@
|
RUN_AS_USER = @RUN_AS_USER@
|
||||||
|
@ -318,7 +277,6 @@ STATEPATH = @STATEPATH@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
SUN_LIBUSB = @SUN_LIBUSB@
|
SUN_LIBUSB = @SUN_LIBUSB@
|
||||||
TREE_VERSION = @TREE_VERSION@
|
TREE_VERSION = @TREE_VERSION@
|
||||||
VALGRIND = @VALGRIND@
|
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
|
||||||
XMLLINT = @XMLLINT@
|
XMLLINT = @XMLLINT@
|
||||||
|
@ -336,7 +294,6 @@ am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
auglensdir = @auglensdir@
|
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
build = @build@
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
@ -350,9 +307,6 @@ datarootdir = @datarootdir@
|
||||||
devddir = @devddir@
|
devddir = @devddir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
driverexecdir = @driverexecdir@
|
driverexecdir = @driverexecdir@
|
||||||
dummy_PKG_CONFIG = @dummy_PKG_CONFIG@
|
|
||||||
dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@
|
|
||||||
dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@
|
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
|
@ -378,14 +332,12 @@ pkgconfigdir = @pkgconfigdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
psdir = @psdir@
|
psdir = @psdir@
|
||||||
runstatedir = @runstatedir@
|
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
systemdshutdowndir = @systemdshutdowndir@
|
systemdsystemshutdowndir = @systemdsystemshutdowndir@
|
||||||
systemdsystemunitdir = @systemdsystemunitdir@
|
systemdsystemunitdir = @systemdsystemunitdir@
|
||||||
systemdtmpfilesdir = @systemdtmpfilesdir@
|
|
||||||
target = @target@
|
target = @target@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
target_cpu = @target_cpu@
|
target_cpu = @target_cpu@
|
||||||
|
@ -396,14 +348,11 @@ top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
|
|
||||||
# Network UPS Tools: data/html
|
# Network UPS Tools: data/html
|
||||||
# install these only if configured --with-cgi
|
# install these only if configured --with-cgi
|
||||||
@WITH_CGI_TRUE@dist_html_DATA = index.html bottom.html nut-banner.png
|
@WITH_CGI_TRUE@dist_html_DATA = index.html bottom.html nut-banner.png
|
||||||
@WITH_CGI_TRUE@nodist_html_DATA = header.html
|
@WITH_CGI_TRUE@nodist_html_DATA = header.html
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
MAINTAINERCLEANFILES = Makefile.in .dirstamp
|
|
||||||
# Generated by configure script:
|
|
||||||
DISTCLEANFILES = header.html
|
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -419,13 +368,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/html/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/html/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu data/html/Makefile
|
$(AUTOMAKE) --gnu data/html/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
*config.status*) \
|
*config.status*) \
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
*) \
|
*) \
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
esac;
|
esac;
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
@ -493,10 +443,7 @@ ctags CTAGS:
|
||||||
cscope cscopelist:
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(DISTFILES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
|
||||||
|
|
||||||
distdir-am: $(DISTFILES)
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
list='$(DISTFILES)'; \
|
list='$(DISTFILES)'; \
|
||||||
|
@ -559,12 +506,10 @@ clean-generic:
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
@ -647,8 +592,6 @@ uninstall-am: uninstall-dist_htmlDATA uninstall-nodist_htmlDATA
|
||||||
tags-am uninstall uninstall-am uninstall-dist_htmlDATA \
|
tags-am uninstall uninstall-am uninstall-dist_htmlDATA \
|
||||||
uninstall-nodist_htmlDATA
|
uninstall-nodist_htmlDATA
|
||||||
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
Network UPS Tools
|
Network UPS Tools
|
||||||
</title>
|
</title>
|
||||||
</head>
|
</head>
|
||||||
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B">
|
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B">
|
||||||
|
|
19
debian/NEWS
vendored
19
debian/NEWS
vendored
|
@ -1,19 +0,0 @@
|
||||||
nut (2.7.2-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
Since version 1.2 NUT-Monitor uses safer directory permissions when
|
|
||||||
creating ~/.nut-monitor.
|
|
||||||
|
|
||||||
NUT-Monitor will now detect a pre-1.2 settings directory on startup
|
|
||||||
and update its permissions.
|
|
||||||
|
|
||||||
Please note that passwords stored in NUT-Monitor prior to this change
|
|
||||||
may have been exposed, and it is recommended that they be reset.
|
|
||||||
|
|
||||||
-- Michael Fincham <michael.fincham@catalyst.net.nz> Fri, 13 Feb 2015 11:57:12 +1300
|
|
||||||
|
|
||||||
nut (2.6.5-1) experimental; urgency=low
|
|
||||||
|
|
||||||
mge-shut driver has been replaced by a new implementation (newmge-shut).
|
|
||||||
In case of issue with this new version, users can revert to oldmge-shut.
|
|
||||||
|
|
||||||
-- Laurent Bigonville <bigon@debian.org> Mon, 13 Aug 2012 00:32:18 +0200
|
|
1934
debian/changelog
vendored
1934
debian/changelog
vendored
File diff suppressed because it is too large
Load diff
1
debian/compat
vendored
1
debian/compat
vendored
|
@ -1 +0,0 @@
|
||||||
12
|
|
305
debian/control
vendored
305
debian/control
vendored
|
@ -1,305 +0,0 @@
|
||||||
Source: nut
|
|
||||||
Section: admin
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Laurent Bigonville <bigon@debian.org>
|
|
||||||
Build-Depends: debhelper (>= 12),
|
|
||||||
dh-python,
|
|
||||||
libfreeipmi-dev (>= 0.8.5) [!hurd-i386],
|
|
||||||
libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev,
|
|
||||||
libipmimonitoring-dev (>= 1.1.5-2) [!hurd-i386],
|
|
||||||
libltdl-dev,
|
|
||||||
libneon27-gnutls-dev | libneon27-dev,
|
|
||||||
libnss3-dev,
|
|
||||||
libpowerman0-dev (>= 2.3.3),
|
|
||||||
libsnmp-dev | libsnmp9-dev,
|
|
||||||
libusb-dev (>= 0.1.8),
|
|
||||||
libwrap0-dev (>= 7.6),
|
|
||||||
python3
|
|
||||||
Build-Depends-Indep: asciidoc (>= 8.6.3) <!nodoc>,
|
|
||||||
asciidoc-dblatex <!nodoc>,
|
|
||||||
dblatex (>= 0.2.5) <!nodoc>,
|
|
||||||
docbook-xsl <!nodoc>,
|
|
||||||
libxml2-utils <!nodoc>
|
|
||||||
Standards-Version: 4.6.0
|
|
||||||
Homepage: https://networkupstools.org/
|
|
||||||
Vcs-Browser: https://salsa.debian.org/debian/nut
|
|
||||||
Vcs-Git: https://salsa.debian.org/debian/nut.git
|
|
||||||
|
|
||||||
Package: nut
|
|
||||||
Architecture: all
|
|
||||||
Section: metapackages
|
|
||||||
Depends: nut-client, nut-server, ${misc:Depends}
|
|
||||||
Description: network UPS tools - metapackage
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package is a metapackage that installs both nut-server and nut-client,
|
|
||||||
in most cases it is sufficient for a basic UPS monitoring system.
|
|
||||||
|
|
||||||
Package: nut-server
|
|
||||||
Architecture: any
|
|
||||||
Depends: adduser,
|
|
||||||
lsb-base (>= 3.0-6),
|
|
||||||
nut-client (= ${binary:Version}),
|
|
||||||
udev [linux-any],
|
|
||||||
${misc:Depends},
|
|
||||||
${shlibs:Depends}
|
|
||||||
Suggests: nut-cgi, nut-ipmi, nut-snmp, nut-xml
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Description: network UPS tools - core system
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides NUT's core system, and the serial and USB UPS
|
|
||||||
drivers.
|
|
||||||
|
|
||||||
Package: nut-client
|
|
||||||
Architecture: any
|
|
||||||
Depends: adduser, lsb-base (>= 3.0-6), ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Provides: ups-monitor
|
|
||||||
Conflicts: ups-monitor
|
|
||||||
Recommends: bash-completion
|
|
||||||
Suggests: nut-monitor
|
|
||||||
Replaces: ups-monitor
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Description: network UPS tools - clients
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides NUT's clients that allows the user to control
|
|
||||||
and monitor the UPS.
|
|
||||||
|
|
||||||
Package: nut-cgi
|
|
||||||
Architecture: any
|
|
||||||
Depends: adduser, ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Recommends: apache2 | httpd-cgi
|
|
||||||
Suggests: nut
|
|
||||||
Description: network UPS tools - web interface
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides an HTTP interface for Network UPS Tools which makes
|
|
||||||
it possible to monitor the core NUT system with a web browser.
|
|
||||||
|
|
||||||
Package: nut-snmp
|
|
||||||
Architecture: any
|
|
||||||
Depends: nut (>= 1.4.1-pre1), ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: network UPS tools - SNMP driver
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides snmp-ups, the SNMP multi-MIB driver for UPS, which
|
|
||||||
supports various MIBs including IETF, MGE, and APC. It adds an SNMP
|
|
||||||
Manager interface to the core NUT system.
|
|
||||||
|
|
||||||
Package: nut-ipmi
|
|
||||||
Architecture: kfreebsd-any linux-any
|
|
||||||
Depends: nut (>= 1.4.1-pre1), ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: network UPS tools - IPMI driver
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package currently provides nut-ipmipsu, a driver which allows the user to
|
|
||||||
monitor IPMI power supply units (PSU) found in servers of popular brands, such
|
|
||||||
as Dell, HP, IBM. It adds an IPMI interface to the core NUT system.
|
|
||||||
|
|
||||||
Package: nut-xml
|
|
||||||
Architecture: any
|
|
||||||
Depends: nut (>= 2.2.2), ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: network UPS tools - XML/HTTP driver
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides netxml-ups, which supports UPS models from
|
|
||||||
Eaton or MGE that use an XML/HTTP-based Network Management Card or
|
|
||||||
Proxy.
|
|
||||||
|
|
||||||
Package: nut-powerman-pdu
|
|
||||||
Architecture: any
|
|
||||||
Depends: nut (>= 2.4.0),
|
|
||||||
powerman (>= 2.3.3),
|
|
||||||
${misc:Depends},
|
|
||||||
${shlibs:Depends}
|
|
||||||
Description: network UPS tools - PowerMan PDU driver
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides powerman-pdu, which allows NUT clients to communicate
|
|
||||||
with the PowerMan daemon to support PDUs.
|
|
||||||
|
|
||||||
Package: nut-doc
|
|
||||||
Architecture: all
|
|
||||||
Section: doc
|
|
||||||
Depends: ${misc:Depends}
|
|
||||||
Suggests: doc-base
|
|
||||||
Build-Profiles: <!nodoc>
|
|
||||||
Description: network UPS tools - documentation
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package contains FAQ, user, developer and packager documentation.
|
|
||||||
|
|
||||||
Package: libupsclient4
|
|
||||||
Section: libs
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - client library
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the shared client library.
|
|
||||||
|
|
||||||
Package: libupsclient-dev
|
|
||||||
Section: libdevel
|
|
||||||
Architecture: any
|
|
||||||
Depends: libnss3-dev,
|
|
||||||
libupsclient4 (= ${binary:Version}),
|
|
||||||
${misc:Depends},
|
|
||||||
${shlibs:Depends}
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - development files
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the development files.
|
|
||||||
|
|
||||||
Package: libnutclient0
|
|
||||||
Section: libs
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - new client library
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the new shared client library.
|
|
||||||
|
|
||||||
Package: libnutclient-dev
|
|
||||||
Section: libdevel
|
|
||||||
Architecture: any
|
|
||||||
Depends: libnutclient0 (= ${binary:Version}),
|
|
||||||
${misc:Depends},
|
|
||||||
${shlibs:Depends}
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - development files for the new client library
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the development files for the new client library.
|
|
||||||
|
|
||||||
Package: libnutscan1
|
|
||||||
Section: libs
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - scanner library
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the shared scanner library.
|
|
||||||
|
|
||||||
Package: libnutscan-dev
|
|
||||||
Section: libdevel
|
|
||||||
Architecture: any
|
|
||||||
Depends: libnutscan1 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Breaks: libupsclient-dev (<< 2.7.4-9~)
|
|
||||||
Replaces: libupsclient-dev (<< 2.7.4-9~)
|
|
||||||
Multi-Arch: same
|
|
||||||
Description: network UPS tools - development files for the scanner library
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides the development files for the scanner library.
|
|
||||||
|
|
||||||
#Package: python3-nut
|
|
||||||
#Section: python
|
|
||||||
#Architecture: all
|
|
||||||
#Depends: ${misc:Depends}, ${python3:Depends}
|
|
||||||
#Description: network UPS tools - Python3 bindings for NUT server
|
|
||||||
# Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
# allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
# power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
# through the server, and are notified whenever the power status
|
|
||||||
# changes.
|
|
||||||
# .
|
|
||||||
# This package provides Python3 bindings to connect to NUT server.
|
|
||||||
|
|
||||||
#Package: nut-monitor
|
|
||||||
#Architecture: all
|
|
||||||
#Depends: python-glade2,
|
|
||||||
# python-gobject-2,
|
|
||||||
# python-gtk2,
|
|
||||||
# python-nut,
|
|
||||||
# ${misc:Depends},
|
|
||||||
# ${python:Depends}
|
|
||||||
#Recommends: python-notify
|
|
||||||
#Description: network UPS tools - GUI application to monitor UPS status
|
|
||||||
# Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
# allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
# power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
# through the server, and are notified whenever the power status
|
|
||||||
# changes.
|
|
||||||
# .
|
|
||||||
# This package provides nut-monitor, a GUI application to monitor UPS status.
|
|
||||||
|
|
||||||
Package: libups-nut-perl
|
|
||||||
Section: perl
|
|
||||||
Architecture: all
|
|
||||||
Depends: ${misc:Depends}, ${perl:Depends}
|
|
||||||
Description: network UPS tools - Perl bindings for NUT server
|
|
||||||
Network UPS Tools (NUT) is a client/server monitoring system that
|
|
||||||
allows computers to share uninterruptible power supply (UPS) and
|
|
||||||
power distribution unit (PDU) hardware. Clients access the hardware
|
|
||||||
through the server, and are notified whenever the power status
|
|
||||||
changes.
|
|
||||||
.
|
|
||||||
This package provides Perl bindings to connect to NUT server.
|
|
69
debian/copyright
vendored
69
debian/copyright
vendored
|
@ -1,69 +0,0 @@
|
||||||
This package was debianized by Luca Filipozzi <lfilipoz@debian.org> on
|
|
||||||
Wed Jun 28 19:48:05 PDT 2000
|
|
||||||
|
|
||||||
It was downloaded from http://www.networkupstools.org/
|
|
||||||
|
|
||||||
Upstream Authors:
|
|
||||||
|
|
||||||
Russell Kroll <rkroll@exploits.org>
|
|
||||||
Arnaud Quette <http://arnaud.quette.free.fr/contact.html>
|
|
||||||
Arjen de Korte <arjen@de-korte.org>
|
|
||||||
Charles Lepple <clepple@gmail.com>
|
|
||||||
Kjell Claesson <kjell.claesson@epost.tidanet.se>
|
|
||||||
David Goncalves <david@lestat.st>
|
|
||||||
and the NUT Team
|
|
||||||
|
|
||||||
Copyright:
|
|
||||||
|
|
||||||
Copyright (C) 2000-2008 Russell Kroll, Arnaud Quette and the NUT Team
|
|
||||||
|
|
||||||
Licenses:
|
|
||||||
|
|
||||||
Most files are licensed under the GNU General Public License (GPL) version 2,
|
|
||||||
or (at your option) any later version.
|
|
||||||
|
|
||||||
The files in the scripts/python/ directory are released under GNU General
|
|
||||||
Public License (GPL) version 3, or (at your option) any later version.
|
|
||||||
|
|
||||||
GPL-2
|
|
||||||
-----
|
|
||||||
|
|
||||||
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 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, write to the Free Software Foundation, Inc.,
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
On Debian systems, the full text of the GNU General Public License v2
|
|
||||||
may be found in /usr/share/common-licenses/GPL-2.
|
|
||||||
|
|
||||||
GPL-3
|
|
||||||
-----
|
|
||||||
|
|
||||||
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/>.
|
|
||||||
|
|
||||||
On Debian systems, the full text of the GNU General Public License v3
|
|
||||||
may be found in /usr/share/common-licenses/GPL-3.
|
|
||||||
|
|
||||||
|
|
||||||
The Debian packaging is Copyright (C) 2008, Arnaud Quette <aquette@debian.org>
|
|
||||||
and is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
|
|
8
debian/gbp.conf
vendored
8
debian/gbp.conf
vendored
|
@ -1,8 +0,0 @@
|
||||||
[DEFAULT]
|
|
||||||
debian-branch = debian
|
|
||||||
upstream-branch = upstream
|
|
||||||
pristine-tar = True
|
|
||||||
|
|
||||||
[git-buildpackage]
|
|
||||||
tarball-dir = ../tarballs/
|
|
||||||
export-dir = ../build-area/
|
|
4
debian/libnutclient-dev.install
vendored
4
debian/libnutclient-dev.install
vendored
|
@ -1,4 +0,0 @@
|
||||||
usr/include/nutclient.h
|
|
||||||
usr/lib/*/libnutclient.a
|
|
||||||
usr/lib/*/libnutclient.so
|
|
||||||
usr/lib/*/pkgconfig/libnutclient.pc
|
|
1
debian/libnutclient0.install
vendored
1
debian/libnutclient0.install
vendored
|
@ -1 +0,0 @@
|
||||||
lib/*/libnutclient.so.*
|
|
199
debian/libnutclient0.symbols
vendored
199
debian/libnutclient0.symbols
vendored
|
@ -1,199 +0,0 @@
|
||||||
# SymbolsHelper-Confirmed: 2.7.4-9~ amd64 arm64 armel armhf hppa i386 ia64 m68k mips mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
|
|
||||||
libnutclient.so.0 libnutclient0 #MINVER#
|
|
||||||
* Build-Depends-Package: libnutclient-dev
|
|
||||||
(c++)"nut::Client::Client()@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::getDevice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::getDeviceVariableValues(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::getDevices()@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::hasDevice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::hasDeviceCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::hasDeviceVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Client::~Client()@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::Command(nut::Command const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::Command(nut::Device*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::execute()@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::getDescription[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::getDevice() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::getDevice()@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::getName[abi:cxx11]() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::isOk() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::operator bool() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::operator!() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::operator<(nut::Command const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::operator==(nut::Command const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Command::~Command()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::Device(nut::Client*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::Device(nut::Device const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::executeCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::forcedShutdown()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getClient() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getClient()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getCommandNames[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getCommands()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getDescription[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getName[abi:cxx11]() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getNumLogins()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getRWVariableNames[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getRWVariables()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getVariableNames[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getVariableValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getVariableValues[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::getVariables()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::isOk() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::login()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::master()@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::operator bool() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::operator!() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::operator<(nut::Device const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::operator==(nut::Device const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::setVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::setVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Device::~Device()@Base" 2.7.3
|
|
||||||
(c++)"nut::IOException::~IOException()@Base" 2.7.3
|
|
||||||
(c++)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3
|
|
||||||
(c++)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3
|
|
||||||
(c++)"nut::NutException::NutException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::NutException::str[abi:cxx11]() const@Base" 2.7.3
|
|
||||||
(c++)"nut::NutException::what() const@Base" 2.7.3
|
|
||||||
(c++)"nut::NutException::~NutException()@Base" 2.7.3
|
|
||||||
(c++)"nut::SystemException::SystemException()@Base" 2.7.3
|
|
||||||
(c++)"nut::SystemException::err[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::SystemException::~SystemException()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::TcpClient()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::TcpClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::authenticate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::connect()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::detectError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::deviceForcedShutdown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::deviceGetNumLogins(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::deviceLogin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::deviceMaster(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::disconnect()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::executeDeviceCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++|arch-bits=32)"nut::TcpClient::explode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)@Base" 2.7.4
|
|
||||||
(c++|arch-bits=64)"nut::TcpClient::explode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)@Base" 2.7.4
|
|
||||||
(c++)"nut::TcpClient::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDevice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceCommandDescription(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceCommandNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceDescription(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceNames[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceRWVariableNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceVariableDescription(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceVariableNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceVariableValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getDeviceVariableValues(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getHost[abi:cxx11]() const@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getPort() const@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::getTimeout() const@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::isConnected() const@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::logout()@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::sendQuery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::setDeviceVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::setDeviceVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::setTimeout(long)@Base" 2.7.3
|
|
||||||
(c++)"nut::TcpClient::~TcpClient()@Base" 2.7.3
|
|
||||||
(c++)"nut::TimeoutException::TimeoutException()@Base" 2.7.3
|
|
||||||
(c++)"nut::TimeoutException::~TimeoutException()@Base" 2.7.3
|
|
||||||
(c++)"nut::UnknownHostException::UnknownHostException()@Base" 2.7.3
|
|
||||||
(c++)"nut::UnknownHostException::~UnknownHostException()@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::Variable(nut::Device*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::Variable(nut::Variable const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::getDescription[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::getDevice() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::getDevice()@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::getName[abi:cxx11]() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::getValue[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::isOk() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::operator bool() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::operator!() const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::operator<(nut::Variable const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::operator==(nut::Variable const&) const@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::setValues(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
|
|
||||||
(c++)"nut::Variable::~Variable()@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::Socket()@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::disconnect()@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::isConnected() const@Base" 2.7.3
|
|
||||||
(c++|arch-bits=32)"nut::internal::Socket::read(void*, unsigned int)@Base" 2.7.4
|
|
||||||
(c++|arch-bits=64)"nut::internal::Socket::read(void*, unsigned long)@Base" 2.7.4
|
|
||||||
(c++)"nut::internal::Socket::read[abi:cxx11]()@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::setTimeout(long)@Base" 2.7.3
|
|
||||||
(c++)"nut::internal::Socket::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++|arch-bits=32)"nut::internal::Socket::write(void const*, unsigned int)@Base" 2.7.4
|
|
||||||
(c++|arch-bits=64)"nut::internal::Socket::write(void const*, unsigned long)@Base" 2.7.4
|
|
||||||
nutclient_authenticate@Base 2.7.3
|
|
||||||
nutclient_destroy@Base 2.7.3
|
|
||||||
nutclient_device_forced_shutdown@Base 2.7.3
|
|
||||||
nutclient_device_login@Base 2.7.3
|
|
||||||
nutclient_device_master@Base 2.7.3
|
|
||||||
nutclient_execute_device_command@Base 2.7.3
|
|
||||||
nutclient_get_device_command_description@Base 2.7.3
|
|
||||||
nutclient_get_device_commands@Base 2.7.3
|
|
||||||
nutclient_get_device_description@Base 2.7.3
|
|
||||||
nutclient_get_device_num_logins@Base 2.7.3
|
|
||||||
nutclient_get_device_rw_variables@Base 2.7.3
|
|
||||||
nutclient_get_device_variable_description@Base 2.7.3
|
|
||||||
nutclient_get_device_variable_values@Base 2.7.3
|
|
||||||
nutclient_get_device_variables@Base 2.7.3
|
|
||||||
nutclient_get_devices@Base 2.7.3
|
|
||||||
nutclient_has_device@Base 2.7.3
|
|
||||||
nutclient_has_device_command@Base 2.7.3
|
|
||||||
nutclient_has_device_variable@Base 2.7.3
|
|
||||||
nutclient_logout@Base 2.7.3
|
|
||||||
nutclient_set_device_variable_value@Base 2.7.3
|
|
||||||
nutclient_set_device_variable_values@Base 2.7.3
|
|
||||||
nutclient_tcp_create_client@Base 2.7.3
|
|
||||||
nutclient_tcp_disconnect@Base 2.7.3
|
|
||||||
nutclient_tcp_get_timeout@Base 2.7.3
|
|
||||||
nutclient_tcp_is_connected@Base 2.7.3
|
|
||||||
nutclient_tcp_reconnect@Base 2.7.3
|
|
||||||
nutclient_tcp_set_timeout@Base 2.7.3
|
|
||||||
(c++)"std::_Rb_tree<nut::Device, nut::Device, std::_Identity<nut::Device>, std::less<nut::Device>, std::allocator<nut::Device> >::_M_erase(std::_Rb_tree_node<nut::Device>*)@Base" 2.7.3
|
|
||||||
(c++)"std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_erase(std::_Rb_tree_node<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >*)@Base" 2.7.3
|
|
||||||
(c++)"std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::_M_erase(std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >*)@Base" 2.7.3
|
|
||||||
(c++|optional=templinst)"std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.4
|
|
||||||
(c++)"std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >::_M_get_insert_unique_pos(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
|
|
||||||
(c++)"std::pair<std::_Rb_tree_iterator<nut::Variable>, bool> std::_Rb_tree<nut::Variable, nut::Variable, std::_Identity<nut::Variable>, std::less<nut::Variable>, std::allocator<nut::Variable> >::_M_insert_unique<nut::Variable>(nut::Variable&&)@Base" 2.7.3
|
|
||||||
(c++)"std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator=(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
|
|
||||||
(c++)"std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector()@Base" 2.7.3
|
|
||||||
(c++)"std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::~vector()@Base" 2.7.3
|
|
||||||
strarr_alloc@Base 2.7.3
|
|
||||||
strarr_free@Base 2.7.3
|
|
||||||
(c++)"typeinfo for nut::Client@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::IOException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::NotConnectedException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::NutException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::SystemException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::TcpClient@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::TimeoutException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo for nut::UnknownHostException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::Client@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::IOException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::NotConnectedException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::NutException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::SystemException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::TcpClient@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::TimeoutException@Base" 2.7.3
|
|
||||||
(c++)"typeinfo name for nut::UnknownHostException@Base" 2.7.3
|
|
||||||
(c++|optional=templinst)"void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.4
|
|
||||||
(c++|optional=templinst)"void std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::_M_realloc_insert<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >(__gnu_cxx::__normal_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&&)@Base" 2.7.4
|
|
||||||
(c++)"vtable for nut::Client@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::IOException@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::NotConnectedException@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::NutException@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::SystemException@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::TcpClient@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::TimeoutException@Base" 2.7.3
|
|
||||||
(c++)"vtable for nut::UnknownHostException@Base" 2.7.3
|
|
||||||
(c++|optional=templinst)"void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)@Base" 2.7.4
|
|
||||||
(c++|optional=templinst|arch=s390x mipsel armhf)"std::pair<std::_Rb_tree_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, bool> std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_insert_unique<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.4
|
|
||||||
(c++|optional=templinst|arch=!s390x !mipsel !armhf)"std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.4
|
|
6
debian/libnutscan-dev.install
vendored
6
debian/libnutscan-dev.install
vendored
|
@ -1,6 +0,0 @@
|
||||||
usr/include/nut-scan.h
|
|
||||||
usr/include/nutscan-device.h
|
|
||||||
usr/include/nutscan-init.h
|
|
||||||
usr/include/nutscan-ip.h
|
|
||||||
usr/lib/*/libnutscan.so
|
|
||||||
usr/lib/*/pkgconfig/libnutscan.pc
|
|
1
debian/libnutscan1.install
vendored
1
debian/libnutscan1.install
vendored
|
@ -1 +0,0 @@
|
||||||
lib/*/libnutscan.so.*
|
|
157
debian/libnutscan1.symbols
vendored
157
debian/libnutscan1.symbols
vendored
|
@ -1,157 +0,0 @@
|
||||||
libnutscan.so.1 libnutscan1 #MINVER#
|
|
||||||
* Build-Depends-Package: libnutscan-dev
|
|
||||||
AUT@Base 2.7.4-9~
|
|
||||||
UPS_VERSION@Base 2.7.4-9~
|
|
||||||
altpidpath@Base 2.7.4-9~
|
|
||||||
background@Base 2.7.4-9~
|
|
||||||
become_user@Base 2.7.4-9~
|
|
||||||
calc_checksum@Base 2.7.4-9~
|
|
||||||
checksum_test@Base 2.7.4-9~
|
|
||||||
chroot_start@Base 2.7.4-9~
|
|
||||||
comm_upsdrv_info@Base 2.7.4-9~
|
|
||||||
command_read_sequence@Base 2.7.4-9~
|
|
||||||
command_write_sequence@Base 2.7.4-9~
|
|
||||||
confpath@Base 2.7.4-9~
|
|
||||||
device_path@Base 2.7.4-9~
|
|
||||||
device_portname@Base 2.7.4-9~
|
|
||||||
dflt_statepath@Base 2.7.4-9~
|
|
||||||
do_lock_port@Base 2.7.4-9~
|
|
||||||
exit_flag@Base 2.7.4-9~
|
|
||||||
fatal_with_errno@Base 2.7.4-9~
|
|
||||||
fatalx@Base 2.7.4-9~
|
|
||||||
g_usec_timeout@Base 2.7.4-9~
|
|
||||||
get_answer@Base 2.7.4-9~
|
|
||||||
get_libname@Base 2.7.4-9~
|
|
||||||
get_user_pwent@Base 2.7.4-9~
|
|
||||||
getval@Base 2.7.4-9~
|
|
||||||
(arch=!hurd-i386)is_ipmi_device_supported@Base 2.7.4-9~
|
|
||||||
nut_debug_level@Base 2.7.4-9~
|
|
||||||
nut_log_level@Base 2.7.4-9~
|
|
||||||
nut_snmp_add_null_var@Base 2.7.4-9~
|
|
||||||
nutscan_add_device_to_device@Base 2.7.4-9~
|
|
||||||
nutscan_add_option_to_device@Base 2.7.4-9~
|
|
||||||
nutscan_avail_avahi@Base 2.7.4-9~
|
|
||||||
nutscan_avail_ipmi@Base 2.7.4-9~
|
|
||||||
nutscan_avail_nut@Base 2.7.4-9~
|
|
||||||
nutscan_avail_snmp@Base 2.7.4-9~
|
|
||||||
nutscan_avail_usb@Base 2.7.4-9~
|
|
||||||
nutscan_avail_xml_http@Base 2.7.4-9~
|
|
||||||
nutscan_cidr_to_ip@Base 2.7.4-9~
|
|
||||||
nutscan_device_type_string@Base 2.7.4-9~
|
|
||||||
nutscan_device_type_strings@Base 2.7.4-9~
|
|
||||||
nutscan_display_parsable@Base 2.7.4-9~
|
|
||||||
nutscan_display_ups_conf@Base 2.7.4-9~
|
|
||||||
nutscan_free@Base 2.7.4-9~
|
|
||||||
nutscan_free_device@Base 2.7.4-9~
|
|
||||||
nutscan_get_serial_ports_list@Base 2.7.4-9~
|
|
||||||
nutscan_init@Base 2.7.4-9~
|
|
||||||
nutscan_ip_iter_inc@Base 2.7.4-9~
|
|
||||||
nutscan_ip_iter_init@Base 2.7.4-9~
|
|
||||||
(arch=!hurd-i386)nutscan_load_ipmi_library@Base 2.7.4-9~
|
|
||||||
nutscan_load_neon_library@Base 2.7.4-9~
|
|
||||||
nutscan_load_snmp_library@Base 2.7.4-9~
|
|
||||||
nutscan_load_upsclient_library@Base 2.7.4-9~
|
|
||||||
nutscan_load_usb_library@Base 2.7.4-9~
|
|
||||||
nutscan_new_device@Base 2.7.4-9~
|
|
||||||
nutscan_rewind_device@Base 2.7.4-9~
|
|
||||||
nutscan_scan_avahi@Base 2.7.4-9~
|
|
||||||
nutscan_scan_eaton_serial@Base 2.7.4-9~
|
|
||||||
nutscan_scan_eaton_serial_q1@Base 2.7.4-9~
|
|
||||||
nutscan_scan_eaton_serial_shut@Base 2.7.4-9~
|
|
||||||
nutscan_scan_eaton_serial_xcp@Base 2.7.4-9~
|
|
||||||
nutscan_scan_ipmi@Base 2.7.4-9~
|
|
||||||
nutscan_scan_nut@Base 2.7.4-9~
|
|
||||||
nutscan_scan_snmp@Base 2.7.4-9~
|
|
||||||
nutscan_scan_usb@Base 2.7.4-9~
|
|
||||||
nutscan_scan_xml_http@Base 2.7.4-9~
|
|
||||||
open_syslog@Base 2.7.4-9~
|
|
||||||
pw_baud_rates@Base 2.7.4-9~
|
|
||||||
pw_comm_setup@Base 2.7.4-9~
|
|
||||||
search_paths@Base 2.7.4-9~
|
|
||||||
select_read@Base 2.7.4-9~
|
|
||||||
select_write@Base 2.7.4-9~
|
|
||||||
send_read_command@Base 2.7.4-9~
|
|
||||||
send_write_command@Base 2.7.4-9~
|
|
||||||
sendsignal@Base 2.7.4-9~
|
|
||||||
sendsignalfn@Base 2.7.4-9~
|
|
||||||
ser_close@Base 2.7.4-9~
|
|
||||||
ser_comm_fail@Base 2.7.4-9~
|
|
||||||
ser_comm_good@Base 2.7.4-9~
|
|
||||||
ser_flush_in@Base 2.7.4-9~
|
|
||||||
ser_flush_io@Base 2.7.4-9~
|
|
||||||
ser_get_buf@Base 2.7.4-9~
|
|
||||||
ser_get_buf_len@Base 2.7.4-9~
|
|
||||||
ser_get_char@Base 2.7.4-9~
|
|
||||||
ser_get_cts@Base 2.7.4-9~
|
|
||||||
ser_get_dcd@Base 2.7.4-9~
|
|
||||||
ser_get_dsr@Base 2.7.4-9~
|
|
||||||
ser_get_line@Base 2.7.4-9~
|
|
||||||
ser_get_line_alert@Base 2.7.4-9~
|
|
||||||
ser_open@Base 2.7.4-9~
|
|
||||||
ser_open_nf@Base 2.7.4-9~
|
|
||||||
ser_send@Base 2.7.4-9~
|
|
||||||
ser_send_buf@Base 2.7.4-9~
|
|
||||||
ser_send_buf_pace@Base 2.7.4-9~
|
|
||||||
ser_send_char@Base 2.7.4-9~
|
|
||||||
ser_send_pace@Base 2.7.4-9~
|
|
||||||
ser_set_dtr@Base 2.7.4-9~
|
|
||||||
ser_set_rts@Base 2.7.4-9~
|
|
||||||
ser_set_speed@Base 2.7.4-9~
|
|
||||||
ser_set_speed_nf@Base 2.7.4-9~
|
|
||||||
shut_synchronise@Base 2.7.4-9~
|
|
||||||
snprintfcat@Base 2.7.4-9~
|
|
||||||
str_is_double@Base 2.7.4-9~
|
|
||||||
str_is_double_strict@Base 2.7.4-9~
|
|
||||||
str_is_int@Base 2.7.4-9~
|
|
||||||
str_is_int_strict@Base 2.7.4-9~
|
|
||||||
str_is_long@Base 2.7.4-9~
|
|
||||||
str_is_long_strict@Base 2.7.4-9~
|
|
||||||
str_is_short@Base 2.7.4-9~
|
|
||||||
str_is_short_strict@Base 2.7.4-9~
|
|
||||||
str_is_uint@Base 2.7.4-9~
|
|
||||||
str_is_uint_strict@Base 2.7.4-9~
|
|
||||||
str_is_ulong@Base 2.7.4-9~
|
|
||||||
str_is_ulong_strict@Base 2.7.4-9~
|
|
||||||
str_is_ushort@Base 2.7.4-9~
|
|
||||||
str_is_ushort_strict@Base 2.7.4-9~
|
|
||||||
str_ltrim@Base 2.7.4-9~
|
|
||||||
str_ltrim_m@Base 2.7.4-9~
|
|
||||||
str_ltrim_space@Base 2.7.4-9~
|
|
||||||
str_rtrim@Base 2.7.4-9~
|
|
||||||
str_rtrim_m@Base 2.7.4-9~
|
|
||||||
str_rtrim_space@Base 2.7.4-9~
|
|
||||||
str_to_double@Base 2.7.4-9~
|
|
||||||
str_to_double_strict@Base 2.7.4-9~
|
|
||||||
str_to_int@Base 2.7.4-9~
|
|
||||||
str_to_int_strict@Base 2.7.4-9~
|
|
||||||
str_to_long@Base 2.7.4-9~
|
|
||||||
str_to_long_strict@Base 2.7.4-9~
|
|
||||||
str_to_short@Base 2.7.4-9~
|
|
||||||
str_to_short_strict@Base 2.7.4-9~
|
|
||||||
str_to_uint@Base 2.7.4-9~
|
|
||||||
str_to_uint_strict@Base 2.7.4-9~
|
|
||||||
str_to_ulong@Base 2.7.4-9~
|
|
||||||
str_to_ulong_strict@Base 2.7.4-9~
|
|
||||||
str_to_ushort@Base 2.7.4-9~
|
|
||||||
str_to_ushort_strict@Base 2.7.4-9~
|
|
||||||
str_trim@Base 2.7.4-9~
|
|
||||||
str_trim_m@Base 2.7.4-9~
|
|
||||||
str_trim_space@Base 2.7.4-9~
|
|
||||||
syslogbit_set@Base 2.7.4-9~
|
|
||||||
upsdebug_ascii@Base 2.7.4-9~
|
|
||||||
upsdebug_hex@Base 2.7.4-9~
|
|
||||||
upsdebug_with_errno@Base 2.7.4-9~
|
|
||||||
upsdebugx@Base 2.7.4-9~
|
|
||||||
upsdrv_cleanup@Base 2.7.4-9~
|
|
||||||
upsdrv_comm_good@Base 2.7.4-9~
|
|
||||||
upsdrv_initups@Base 2.7.4-9~
|
|
||||||
upsdrv_reconnect@Base 2.7.4-9~
|
|
||||||
upsfd@Base 2.7.4-9~
|
|
||||||
upslog_with_errno@Base 2.7.4-9~
|
|
||||||
upslogx@Base 2.7.4-9~
|
|
||||||
writepid@Base 2.7.4-9~
|
|
||||||
xbasename@Base 2.7.4-9~
|
|
||||||
xcalloc@Base 2.7.4-9~
|
|
||||||
xmalloc@Base 2.7.4-9~
|
|
||||||
xrealloc@Base 2.7.4-9~
|
|
||||||
xstrdup@Base 2.7.4-9~
|
|
1
debian/libups-nut-perl.install
vendored
1
debian/libups-nut-perl.install
vendored
|
@ -1 +0,0 @@
|
||||||
scripts/perl/Nut.pm /usr/share/perl5/UPS/
|
|
5
debian/libupsclient-dev.install
vendored
5
debian/libupsclient-dev.install
vendored
|
@ -1,5 +0,0 @@
|
||||||
usr/include/parseconf.h
|
|
||||||
usr/include/upsclient.h
|
|
||||||
usr/lib/*/libupsclient.a
|
|
||||||
usr/lib/*/libupsclient.so
|
|
||||||
usr/lib/*/pkgconfig/libupsclient.pc
|
|
1
debian/libupsclient4.install
vendored
1
debian/libupsclient4.install
vendored
|
@ -1 +0,0 @@
|
||||||
lib/*/libupsclient.so.*
|
|
114
debian/libupsclient4.symbols
vendored
114
debian/libupsclient4.symbols
vendored
|
@ -1,114 +0,0 @@
|
||||||
libupsclient.so.4 libupsclient4 #MINVER#
|
|
||||||
* Build-Depends-Package: libupsclient-dev
|
|
||||||
UPS_VERSION@Base 2.7.2
|
|
||||||
altpidpath@Base 2.7.2
|
|
||||||
background@Base 2.7.2
|
|
||||||
become_user@Base 2.7.2
|
|
||||||
chroot_start@Base 2.7.2
|
|
||||||
confpath@Base 2.7.2
|
|
||||||
dflt_statepath@Base 2.7.2
|
|
||||||
fatal_with_errno@Base 2.7.2
|
|
||||||
fatalx@Base 2.7.2
|
|
||||||
get_user_pwent@Base 2.7.2
|
|
||||||
nut_debug_level@Base 2.7.2
|
|
||||||
nut_log_level@Base 2.7.2
|
|
||||||
open_syslog@Base 2.7.2
|
|
||||||
pconf_char@Base 2.7.2
|
|
||||||
pconf_encode@Base 2.7.2
|
|
||||||
pconf_file_begin@Base 2.7.2
|
|
||||||
pconf_file_next@Base 2.7.2
|
|
||||||
pconf_finish@Base 2.7.2
|
|
||||||
pconf_init@Base 2.7.2
|
|
||||||
pconf_line@Base 2.7.2
|
|
||||||
pconf_parse_error@Base 2.7.2
|
|
||||||
select_read@Base 2.7.2
|
|
||||||
select_write@Base 2.7.2
|
|
||||||
sendsignal@Base 2.7.2
|
|
||||||
sendsignalfn@Base 2.7.2
|
|
||||||
snprintfcat@Base 2.7.2
|
|
||||||
state_addcmd@Base 2.7.2
|
|
||||||
state_addenum@Base 2.7.2
|
|
||||||
state_addrange@Base 2.7.2
|
|
||||||
state_cmdfree@Base 2.7.2
|
|
||||||
state_delcmd@Base 2.7.2
|
|
||||||
state_delenum@Base 2.7.2
|
|
||||||
state_delinfo@Base 2.7.2
|
|
||||||
state_delrange@Base 2.7.2
|
|
||||||
state_getaux@Base 2.7.2
|
|
||||||
state_getenumlist@Base 2.7.2
|
|
||||||
state_getflags@Base 2.7.2
|
|
||||||
state_getinfo@Base 2.7.2
|
|
||||||
state_getrangelist@Base 2.7.2
|
|
||||||
state_infofree@Base 2.7.2
|
|
||||||
state_setaux@Base 2.7.2
|
|
||||||
state_setflags@Base 2.7.2
|
|
||||||
state_setinfo@Base 2.7.2
|
|
||||||
state_tree_find@Base 2.7.2
|
|
||||||
str_is_double@Base 2.7.4
|
|
||||||
str_is_double_strict@Base 2.7.4
|
|
||||||
str_is_int@Base 2.7.4
|
|
||||||
str_is_int_strict@Base 2.7.4
|
|
||||||
str_is_long@Base 2.7.4
|
|
||||||
str_is_long_strict@Base 2.7.4
|
|
||||||
str_is_short@Base 2.7.4
|
|
||||||
str_is_short_strict@Base 2.7.4
|
|
||||||
str_is_uint@Base 2.7.4
|
|
||||||
str_is_uint_strict@Base 2.7.4
|
|
||||||
str_is_ulong@Base 2.7.4
|
|
||||||
str_is_ulong_strict@Base 2.7.4
|
|
||||||
str_is_ushort@Base 2.7.4
|
|
||||||
str_is_ushort_strict@Base 2.7.4
|
|
||||||
str_ltrim@Base 2.7.4
|
|
||||||
str_ltrim_m@Base 2.7.4
|
|
||||||
str_ltrim_space@Base 2.7.4
|
|
||||||
str_rtrim@Base 2.7.4
|
|
||||||
str_rtrim_m@Base 2.7.4
|
|
||||||
str_rtrim_space@Base 2.7.4
|
|
||||||
str_to_double@Base 2.7.4
|
|
||||||
str_to_double_strict@Base 2.7.4
|
|
||||||
str_to_int@Base 2.7.4
|
|
||||||
str_to_int_strict@Base 2.7.4
|
|
||||||
str_to_long@Base 2.7.4
|
|
||||||
str_to_long_strict@Base 2.7.4
|
|
||||||
str_to_short@Base 2.7.4
|
|
||||||
str_to_short_strict@Base 2.7.4
|
|
||||||
str_to_uint@Base 2.7.4
|
|
||||||
str_to_uint_strict@Base 2.7.4
|
|
||||||
str_to_ulong@Base 2.7.4
|
|
||||||
str_to_ulong_strict@Base 2.7.4
|
|
||||||
str_to_ushort@Base 2.7.4
|
|
||||||
str_to_ushort_strict@Base 2.7.4
|
|
||||||
str_trim@Base 2.7.4
|
|
||||||
str_trim_m@Base 2.7.4
|
|
||||||
str_trim_space@Base 2.7.4
|
|
||||||
syslogbit_set@Base 2.7.2
|
|
||||||
upscli_add_host_cert@Base 2.7.2
|
|
||||||
upscli_cleanup@Base 2.7.2
|
|
||||||
upscli_connect@Base 2.7.2
|
|
||||||
upscli_disconnect@Base 2.7.2
|
|
||||||
upscli_errlist@Base 2.7.2
|
|
||||||
upscli_fd@Base 2.7.2
|
|
||||||
upscli_get@Base 2.7.2
|
|
||||||
upscli_init@Base 2.7.2
|
|
||||||
upscli_list_next@Base 2.7.2
|
|
||||||
upscli_list_start@Base 2.7.2
|
|
||||||
upscli_readline@Base 2.7.2
|
|
||||||
upscli_sendline@Base 2.7.2
|
|
||||||
upscli_splitaddr@Base 2.7.2
|
|
||||||
upscli_splitname@Base 2.7.2
|
|
||||||
upscli_ssl@Base 2.7.2
|
|
||||||
upscli_strerror@Base 2.7.2
|
|
||||||
upscli_tryconnect@Base 2.7.2
|
|
||||||
upscli_upserror@Base 2.7.2
|
|
||||||
upsdebug_ascii@Base 2.7.2
|
|
||||||
upsdebug_hex@Base 2.7.2
|
|
||||||
upsdebug_with_errno@Base 2.7.2
|
|
||||||
upsdebugx@Base 2.7.2
|
|
||||||
upslog_with_errno@Base 2.7.2
|
|
||||||
upslogx@Base 2.7.2
|
|
||||||
writepid@Base 2.7.2
|
|
||||||
xbasename@Base 2.7.2
|
|
||||||
xcalloc@Base 2.7.2
|
|
||||||
xmalloc@Base 2.7.2
|
|
||||||
xrealloc@Base 2.7.2
|
|
||||||
xstrdup@Base 2.7.2
|
|
BIN
debian/local/nut-monitor.png
vendored
BIN
debian/local/nut-monitor.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
490
debian/local/nut-monitor.svg
vendored
490
debian/local/nut-monitor.svg
vendored
|
@ -1,490 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="48"
|
|
||||||
height="48"
|
|
||||||
id="svg2"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
inkscape:version="0.45"
|
|
||||||
version="1.0"
|
|
||||||
sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/devices"
|
|
||||||
sodipodi:docname="battery.svg"
|
|
||||||
inkscape:export-filename="/home/lapo/Desktop/per jimmac/scalable/devices/battery.png"
|
|
||||||
inkscape:export-xdpi="90"
|
|
||||||
inkscape:export-ydpi="90"
|
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient3367">
|
|
||||||
<stop
|
|
||||||
id="stop3369"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#555753" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#8a8d85;stop-opacity:1;"
|
|
||||||
offset="0.32156199"
|
|
||||||
id="stop3371" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#babdb6;stop-opacity:1;"
|
|
||||||
offset="0.53021115"
|
|
||||||
id="stop3373" />
|
|
||||||
<stop
|
|
||||||
id="stop3375"
|
|
||||||
offset="0.85266888"
|
|
||||||
style="stop-color:#dcdeda;stop-opacity:1;" />
|
|
||||||
<stop
|
|
||||||
id="stop3377"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#babdb6" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3351">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#888a85"
|
|
||||||
offset="0"
|
|
||||||
id="stop3353" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#555753"
|
|
||||||
offset="1"
|
|
||||||
id="stop3355" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3290">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3292" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3294" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3280">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#000000;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3282" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#000000;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3284" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3265">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#c4a000;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3267" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#c4a000;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3269" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3254">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3256" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3258" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient3236">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3238" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#fce94f"
|
|
||||||
offset="1"
|
|
||||||
id="stop3240" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3227">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3229" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3231" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3217">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#c4a000;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3219" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#edd400"
|
|
||||||
offset="1"
|
|
||||||
id="stop3221" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient3174">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop3176" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffffff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop3178" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient3146">
|
|
||||||
<stop
|
|
||||||
id="stop3148"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#c4a000" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#d8ba00;stop-opacity:1;"
|
|
||||||
offset="0.35133624"
|
|
||||||
id="stop3160" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#edd400;stop-opacity:1;"
|
|
||||||
offset="0.50020754"
|
|
||||||
id="stop3152" />
|
|
||||||
<stop
|
|
||||||
id="stop3162"
|
|
||||||
offset="0.85000002"
|
|
||||||
style="stop-color:#fdf4a7;stop-opacity:1;" />
|
|
||||||
<stop
|
|
||||||
id="stop3158"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#fce94f" />
|
|
||||||
</linearGradient>
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3280"
|
|
||||||
id="radialGradient3286"
|
|
||||||
cx="21.34375"
|
|
||||||
cy="14.125"
|
|
||||||
fx="21.34375"
|
|
||||||
fy="14.125"
|
|
||||||
r="11.96875"
|
|
||||||
gradientTransform="matrix(1,0,0,0.302872,8.341852e-16,9.846932)"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3236"
|
|
||||||
id="radialGradient3337"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.690032,-4.583908e-18,1.406348e-18,0.228281,6.615871,10.90053)"
|
|
||||||
cx="19.717636"
|
|
||||||
cy="16.677069"
|
|
||||||
fx="19.717636"
|
|
||||||
fy="16.677069"
|
|
||||||
r="12.46875" />
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3174"
|
|
||||||
id="radialGradient3339"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(1.253821,-0.396912,0.124986,0.425706,-7.949749,14.71501)"
|
|
||||||
cx="19.161945"
|
|
||||||
cy="24.691038"
|
|
||||||
fx="19.161945"
|
|
||||||
fy="24.691038"
|
|
||||||
r="12.46875" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3265"
|
|
||||||
id="linearGradient3341"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="31.18708"
|
|
||||||
y1="9.9904861"
|
|
||||||
x2="25.531752"
|
|
||||||
y2="18.613125" />
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3174"
|
|
||||||
id="radialGradient3343"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(1.253821,-0.396912,0.124986,0.425706,-7.949749,14.71501)"
|
|
||||||
cx="19.161945"
|
|
||||||
cy="24.691038"
|
|
||||||
fx="19.161945"
|
|
||||||
fy="24.691038"
|
|
||||||
r="12.46875" />
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3227"
|
|
||||||
id="radialGradient3347"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(1.499279,-0.163895,3.603099e-2,0.557877,-10.01886,8.004429)"
|
|
||||||
cx="19.863604"
|
|
||||||
cy="11.205179"
|
|
||||||
fx="19.863604"
|
|
||||||
fy="11.205179"
|
|
||||||
r="4" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3217"
|
|
||||||
id="linearGradient3380"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2,-4.760636e-13)"
|
|
||||||
x1="18.5625"
|
|
||||||
y1="11.1875"
|
|
||||||
x2="17.71875"
|
|
||||||
y2="12.534899" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3146"
|
|
||||||
id="linearGradient3384"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2,-4.760636e-13)"
|
|
||||||
x1="25.500298"
|
|
||||||
y1="10.985043"
|
|
||||||
x2="17.499449"
|
|
||||||
y2="10.985043" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3351"
|
|
||||||
id="linearGradient3393"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="13.375"
|
|
||||||
y1="23.221346"
|
|
||||||
x2="13.375"
|
|
||||||
y2="32.383766"
|
|
||||||
gradientTransform="translate(-2,-4.760636e-13)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3290"
|
|
||||||
id="linearGradient3398"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="13.96536"
|
|
||||||
y1="10.495919"
|
|
||||||
x2="20.682875"
|
|
||||||
y2="31.382992"
|
|
||||||
gradientTransform="translate(2,0)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3254"
|
|
||||||
id="linearGradient3401"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2,-4.760636e-13)"
|
|
||||||
x1="12.25"
|
|
||||||
y1="20.230709"
|
|
||||||
x2="17.125"
|
|
||||||
y2="34.173542" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3146"
|
|
||||||
id="linearGradient3404"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2,-4.760636e-13)"
|
|
||||||
x1="33.5625"
|
|
||||||
y1="19.125"
|
|
||||||
x2="9.4987011"
|
|
||||||
y2="19.125" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient3367"
|
|
||||||
id="linearGradient3407"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(2,-4.760636e-13)"
|
|
||||||
x1="33.50008"
|
|
||||||
y1="28.375"
|
|
||||||
x2="9.4992361"
|
|
||||||
y2="28.375" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="1"
|
|
||||||
inkscape:cx="34.743513"
|
|
||||||
inkscape:cy="19.440609"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer5"
|
|
||||||
showgrid="false"
|
|
||||||
gridempspacing="2"
|
|
||||||
gridspacingx="0.5px"
|
|
||||||
gridspacingy="0.5px"
|
|
||||||
inkscape:window-width="872"
|
|
||||||
inkscape:window-height="771"
|
|
||||||
inkscape:window-x="392"
|
|
||||||
inkscape:window-y="55"
|
|
||||||
stroke="#c4a000"
|
|
||||||
inkscape:grid-points="false"
|
|
||||||
inkscape:grid-bbox="true"
|
|
||||||
fill="#555753"
|
|
||||||
showborder="false"
|
|
||||||
inkscape:showpageshadow="false" />
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:creator>
|
|
||||||
<cc:Agent>
|
|
||||||
<dc:title>Lapo Calamandrei</dc:title>
|
|
||||||
</cc:Agent>
|
|
||||||
</dc:creator>
|
|
||||||
<dc:title>Battery</dc:title>
|
|
||||||
<dc:subject>
|
|
||||||
<rdf:Bag>
|
|
||||||
<rdf:li>battery</rdf:li>
|
|
||||||
<rdf:li>recharge</rdf:li>
|
|
||||||
<rdf:li>power</rdf:li>
|
|
||||||
<rdf:li>acpi</rdf:li>
|
|
||||||
<rdf:li>apm</rdf:li>
|
|
||||||
</rdf:Bag>
|
|
||||||
</dc:subject>
|
|
||||||
<cc:license
|
|
||||||
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
|
|
||||||
</cc:Work>
|
|
||||||
<cc:License
|
|
||||||
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/SourceCode" />
|
|
||||||
</cc:License>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer6"
|
|
||||||
inkscape:label="Shadow"
|
|
||||||
style="display:inline">
|
|
||||||
<path
|
|
||||||
sodipodi:type="arc"
|
|
||||||
style="opacity:0.7254902;color:#000000;fill:url(#radialGradient3286);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
id="path3278"
|
|
||||||
sodipodi:cx="21.34375"
|
|
||||||
sodipodi:cy="14.125"
|
|
||||||
sodipodi:rx="11.96875"
|
|
||||||
sodipodi:ry="3.625"
|
|
||||||
d="M 33.3125 14.125 A 11.96875 3.625 0 1 1 9.375,14.125 A 11.96875 3.625 0 1 1 33.3125 14.125 z"
|
|
||||||
transform="matrix(1.389034,0,0,1.337644,-6.147196,18.98077)" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer2"
|
|
||||||
inkscape:label="Battery"
|
|
||||||
style="display:inline" />
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer4"
|
|
||||||
inkscape:label="inner stroke"
|
|
||||||
style="display:inline" />
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer5"
|
|
||||||
inkscape:label="tip"
|
|
||||||
style="display:inline">
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:url(#linearGradient3407);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 22,10.5 C 16.084021,10.716519 11.5,12.21646 11.5,14 L 11.5,37 C 11.5,38.932002 16.876,40.500001 23.5,40.5 C 30.124,40.5 35.5,38.932003 35.5,37 L 35.5,14 C 35.5,12.067998 30.124001,10.5 23.5,10.5 C 23.13775,10.5 22.79161,10.490818 22.4375,10.5 C 22.294038,10.50372 22.141983,10.494804 22,10.5 z "
|
|
||||||
id="path2230"
|
|
||||||
sodipodi:nodetypes="csssssssc" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:url(#linearGradient3404);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 22.4375,10.5 C 16.316456,10.658717 11.5,12.173655 11.5,14 L 11.5,20.5 C 11.5,22.432002 16.875999,24.000001 23.5,24 C 30.124,24 35.5,22.432001 35.5,20.5 L 35.5,14 C 35.5,12.067998 30.124,10.5 23.5,10.5 C 23.13775,10.5 22.79161,10.490818 22.4375,10.5 z "
|
|
||||||
id="path2232"
|
|
||||||
sodipodi:nodetypes="cssssssc" />
|
|
||||||
<path
|
|
||||||
style="opacity:0.36862745;color:#000000;fill:url(#linearGradient3401);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 15,16 L 20,16 L 20,40.3125 L 15,39.5 L 15,16 z "
|
|
||||||
id="rect3244"
|
|
||||||
sodipodi:nodetypes="ccccc" />
|
|
||||||
<path
|
|
||||||
style="opacity:0.34509804;color:#000000;fill:url(#linearGradient3398);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 22,10.5 C 16.084021,10.716519 11.5,12.21646 11.5,14 L 11.5,37 C 11.5,38.932002 16.876,40.500001 23.5,40.5 C 30.124,40.5 35.5,38.932003 35.5,37 L 35.5,14 C 35.5,12.067998 30.124001,10.5 23.5,10.5 C 23.13775,10.5 22.79161,10.490818 22.4375,10.5 C 22.294038,10.50372 22.141983,10.494804 22,10.5 z "
|
|
||||||
id="path3288"
|
|
||||||
sodipodi:nodetypes="csssssssc" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="arc"
|
|
||||||
style="color:#000000;fill:url(#radialGradient3337);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient3339);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
id="path3164"
|
|
||||||
sodipodi:cx="21.34375"
|
|
||||||
sodipodi:cy="14.125"
|
|
||||||
sodipodi:rx="11.96875"
|
|
||||||
sodipodi:ry="3.625"
|
|
||||||
d="M 33.3125 14.125 A 11.96875 3.625 0 1 1 9.375,14.125 A 11.96875 3.625 0 1 1 33.3125 14.125 z"
|
|
||||||
transform="matrix(1.002611,0,0,0.965518,2.100522,0.362061)" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="arc"
|
|
||||||
style="opacity:0.63921569;color:#000000;fill:url(#linearGradient3341);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient3343);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
id="path3263"
|
|
||||||
sodipodi:cx="21.34375"
|
|
||||||
sodipodi:cy="14.125"
|
|
||||||
sodipodi:rx="11.96875"
|
|
||||||
sodipodi:ry="3.625"
|
|
||||||
d="M 33.3125 14.125 A 11.96875 3.625 0 1 1 9.375,14.125 A 11.96875 3.625 0 1 1 33.3125 14.125 z"
|
|
||||||
transform="matrix(1.002611,0,0,0.965518,2.100522,0.362061)" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3393);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 11.5,21.5 L 11.5,37 C 11.5,38.932002 16.876,40.500001 23.5,40.5 C 30.124,40.5 35.5,38.932003 35.5,37 L 35.5,21.5"
|
|
||||||
id="path2217"
|
|
||||||
sodipodi:nodetypes="ccscc" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#c4a000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 35.5,21.5 L 35.5,14 C 35.5,12.067998 30.124001,10.5 23.5,10.5 C 23.13775,10.5 22.79161,10.490818 22.4375,10.5 C 22.294038,10.50372 22.141983,10.494804 22,10.5 C 16.084021,10.716519 11.5,12.21646 11.5,14 L 11.5,21.5"
|
|
||||||
id="path2219"
|
|
||||||
sodipodi:nodetypes="cssscsc" />
|
|
||||||
<path
|
|
||||||
style="opacity:0.49019608;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 21.84375,11.5 C 16.548895,11.680925 12.5,12.74668 12.5,14 C 12.5,15.142813 12.5,35.855219 12.5,37 C 12.5,38.38 17.427994,39.5 23.5,39.5 C 29.572006,39.5 34.5,38.38 34.5,37 C 34.5,35.940784 34.499999,15.059216 34.5,14 C 34.5,12.62 29.572007,11.5 23.5,11.5 C 23.1205,11.5 22.744639,11.49146 22.375,11.5 C 22.201732,11.504003 22.014552,11.494164 21.84375,11.5 z "
|
|
||||||
id="path2206"
|
|
||||||
sodipodi:nodetypes="csssssssc" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:url(#linearGradient3384);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 23,9.5 C 21.315666,9.5803665 19.950192,10.074035 19.59375,10.6875 C 19.587086,10.699702 19.568368,10.737692 19.5625,10.75 C 19.559767,10.75618 19.533781,10.775045 19.53125,10.78125 C 19.528923,10.78748 19.533372,10.806246 19.53125,10.8125 C 19.521672,10.843887 19.504323,10.905557 19.5,10.9375 C 19.49935,10.943909 19.500435,10.96232 19.5,10.96875 C 19.499782,10.975199 19.5,12.993531 19.5,13 C 19.5,13.006469 19.499782,13.024801 19.5,13.03125 C 19.500435,13.03768 19.49935,13.056091 19.5,13.0625 C 19.504323,13.094443 19.521672,13.156113 19.53125,13.1875 C 19.533372,13.193754 19.528923,13.21252 19.53125,13.21875 C 19.533781,13.224955 19.559767,13.24382 19.5625,13.25 C 19.568368,13.262308 19.587086,13.300298 19.59375,13.3125 C 19.985483,13.986704 21.58525,14.5 23.5,14.5 C 25.41475,14.5 27.014517,13.986704 27.40625,13.3125 C 27.412914,13.300298 27.431632,13.262308 27.4375,13.25 C 27.440233,13.24382 27.466219,13.224955 27.46875,13.21875 C 27.471077,13.21252 27.466628,13.193754 27.46875,13.1875 C 27.478328,13.156113 27.495677,13.094443 27.5,13.0625 C 27.50065,13.056091 27.499565,13.03768 27.5,13.03125 C 27.500218,13.024801 27.5,13.006469 27.5,13 C 27.5,12.993531 27.500218,10.975199 27.5,10.96875 C 27.499565,10.96232 27.50065,10.943909 27.5,10.9375 C 27.495677,10.905557 27.478328,10.843887 27.46875,10.8125 C 27.466628,10.806246 27.471077,10.78748 27.46875,10.78125 C 27.466219,10.775045 27.440233,10.75618 27.4375,10.75 C 27.431632,10.737692 27.412914,10.699702 27.40625,10.6875 C 27.014517,10.013296 25.41475,9.5 23.5,9.5 C 23.3275,9.5 23.166766,9.4920429 23,9.5 z "
|
|
||||||
id="path3198"
|
|
||||||
sodipodi:nodetypes="cssssssssssssssssssssssssssssc" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="arc"
|
|
||||||
style="color:#000000;fill:url(#radialGradient3347);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
id="path3225"
|
|
||||||
sodipodi:cx="21.5"
|
|
||||||
sodipodi:cy="11"
|
|
||||||
sodipodi:rx="4"
|
|
||||||
sodipodi:ry="1.5"
|
|
||||||
d="M 25.5 11 A 4 1.5 0 1 1 17.5,11 A 4 1.5 0 1 1 25.5 11 z"
|
|
||||||
transform="matrix(0.867417,0,0,0.666667,4.820203,3.666665)" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3380);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
|
||||||
d="M 23,9.5 C 21.315666,9.5803665 19.950192,10.074035 19.59375,10.6875 C 19.587086,10.699702 19.568368,10.737692 19.5625,10.75 C 19.559767,10.75618 19.533781,10.775045 19.53125,10.78125 C 19.528923,10.78748 19.533372,10.806246 19.53125,10.8125 C 19.521672,10.843887 19.504323,10.905557 19.5,10.9375 C 19.49935,10.943909 19.500435,10.96232 19.5,10.96875 C 19.499782,10.975199 19.5,12.993531 19.5,13 C 19.5,13.006469 19.499782,13.024801 19.5,13.03125 C 19.500435,13.03768 19.49935,13.056091 19.5,13.0625 C 19.504323,13.094443 19.521672,13.156113 19.53125,13.1875 C 19.533372,13.193754 19.528923,13.21252 19.53125,13.21875 C 19.533781,13.224955 19.559767,13.24382 19.5625,13.25 C 19.568368,13.262308 19.587086,13.300298 19.59375,13.3125 C 19.985483,13.986704 21.58525,14.5 23.5,14.5 C 25.41475,14.5 27.014517,13.986704 27.40625,13.3125 C 27.412914,13.300298 27.431632,13.262308 27.4375,13.25 C 27.440233,13.24382 27.466219,13.224955 27.46875,13.21875 C 27.471077,13.21252 27.466628,13.193754 27.46875,13.1875 C 27.478328,13.156113 27.495677,13.094443 27.5,13.0625 C 27.50065,13.056091 27.499565,13.03768 27.5,13.03125 C 27.500218,13.024801 27.5,13.006469 27.5,13 C 27.5,12.993531 27.500218,10.975199 27.5,10.96875 C 27.499565,10.96232 27.50065,10.943909 27.5,10.9375 C 27.495677,10.905557 27.478328,10.843887 27.46875,10.8125 C 27.466628,10.806246 27.471077,10.78748 27.46875,10.78125 C 27.466219,10.775045 27.440233,10.75618 27.4375,10.75 C 27.431632,10.737692 27.412914,10.699702 27.40625,10.6875 C 27.014517,10.013296 25.41475,9.5 23.5,9.5 C 23.3275,9.5 23.166766,9.4920429 23,9.5 z "
|
|
||||||
id="path3205"
|
|
||||||
sodipodi:nodetypes="cssssssssssssssssssssssssssssc" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 23 KiB |
19
debian/local/upsd
vendored
19
debian/local/upsd
vendored
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Include NUT nut.conf
|
|
||||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
|
||||||
|
|
||||||
case "$MODE" in
|
|
||||||
standalone|netserver)
|
|
||||||
exec /lib/nut/upsd "$@"
|
|
||||||
;;
|
|
||||||
none|netclient)
|
|
||||||
echo "upsd disabled, please adjust the configuration to your needs"
|
|
||||||
echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
|
|
||||||
# exit success to avoid breaking the install process!
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
19
debian/local/upsmon
vendored
19
debian/local/upsmon
vendored
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Include NUT nut.conf
|
|
||||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
|
||||||
|
|
||||||
case "$MODE" in
|
|
||||||
standalone|netserver|netclient)
|
|
||||||
exec /lib/nut/upsmon "$@"
|
|
||||||
;;
|
|
||||||
none)
|
|
||||||
echo "upsmon disabled, please adjust the configuration to your needs"
|
|
||||||
echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
|
|
||||||
# exit success to avoid breaking the install process!
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
39
debian/nut-cgi.README.Debian
vendored
39
debian/nut-cgi.README.Debian
vendored
|
@ -1,39 +0,0 @@
|
||||||
Network UPS Tools - CGI Interface - Quick Start for Debian
|
|
||||||
----------------------------------------------------------
|
|
||||||
|
|
||||||
(I) Installation
|
|
||||||
=================
|
|
||||||
|
|
||||||
1) Sample configuration files are provided in /etc/nut/
|
|
||||||
Rename without the ".sample" suffix the files hosts.conf, upsstats.html,
|
|
||||||
upsstats-single.html and optionally upsset.conf.
|
|
||||||
Then edit these to match your configuration.
|
|
||||||
|
|
||||||
2) Ensure these configuration files are readable by others
|
|
||||||
|
|
||||||
chmod 755 /etc/nut
|
|
||||||
chmod 644 /etc/nut/upsset.conf
|
|
||||||
chmod 644 /etc/nut/hosts.conf
|
|
||||||
chmod 644 /etc/nut/upsstats.html
|
|
||||||
chmod 644 /etc/nut/upsstats-single.html
|
|
||||||
|
|
||||||
3) You will then be able to access NUT CGI through a Web browser.
|
|
||||||
The URL, which depends on your httpd configuration, is:
|
|
||||||
|
|
||||||
http://localhost/cgi-bin/nut/upsstats.cgi
|
|
||||||
|
|
||||||
4) NUT also provides a set of HTML files to wrap the CGIs.
|
|
||||||
To use it, create a new virtual host with your preferred webserver, and point the
|
|
||||||
Document Root to: /usr/share/nut/www/
|
|
||||||
|
|
||||||
You can also add an alias to an existing site, if it is supported:
|
|
||||||
Alias /nut/ "/usr/share/nut/www/"
|
|
||||||
|
|
||||||
Also ensure that the files in this directory have the suitable permissions.
|
|
||||||
|
|
||||||
For more information on nut-cgi configuration, have a look at the following
|
|
||||||
manual pages:
|
|
||||||
- upsstats.html (5)
|
|
||||||
- hosts.conf (5)
|
|
||||||
- upsset.conf (5)
|
|
||||||
|
|
1
debian/nut-cgi.docs
vendored
1
debian/nut-cgi.docs
vendored
|
@ -1 +0,0 @@
|
||||||
data/html/README
|
|
6
debian/nut-cgi.install
vendored
6
debian/nut-cgi.install
vendored
|
@ -1,6 +0,0 @@
|
||||||
debian/tmp/etc/nut/hosts.conf
|
|
||||||
debian/tmp/etc/nut/upsset.conf
|
|
||||||
debian/tmp/etc/nut/upsstats-single.html
|
|
||||||
debian/tmp/etc/nut/upsstats.html
|
|
||||||
debian/tmp/usr/lib/cgi-bin/
|
|
||||||
debian/tmp/usr/share/nut/www
|
|
47
debian/nut-cgi.postinst
vendored
47
debian/nut-cgi.postinst
vendored
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/sh -e
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
|
|
||||||
configure)
|
|
||||||
|
|
||||||
# make sure the nut user exists and has correct memberships
|
|
||||||
if ! getent group nut >/dev/null; then
|
|
||||||
addgroup --quiet --system nut
|
|
||||||
fi
|
|
||||||
if ! getent passwd nut >/dev/null; then
|
|
||||||
adduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut
|
|
||||||
elif ! groups nut | grep -qw nut; then
|
|
||||||
adduser nut nut
|
|
||||||
fi
|
|
||||||
# for Ubuntu, while waiting for a proper debconf
|
|
||||||
# if ! groups nut | grep -qw dialout; then
|
|
||||||
# adduser nut dialout
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Ensure /etc/nut is readable/crossable for others
|
|
||||||
if [ -d /etc/nut/ ] ; then
|
|
||||||
chmod 755 /etc/nut
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure nut-cgi configuration files are readable by others
|
|
||||||
for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do
|
|
||||||
if [ -f /etc/nut/$file ] ; then
|
|
||||||
chmod 644 /etc/nut/$file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
|
||||||
# do nothing
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "$0: incorrect arguments: $*" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
180
debian/nut-client.init
vendored
180
debian/nut-client.init
vendored
|
@ -1,180 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: nut-client upsmon ups-monitor
|
|
||||||
# Required-Start: $local_fs $syslog $network $remote_fs
|
|
||||||
# Required-Stop: $local_fs $syslog $network $remote_fs
|
|
||||||
# Should-Start: nut-server
|
|
||||||
# Should-Stop:
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Network UPS Tools monitor initscript
|
|
||||||
# Description: This script take care of starting and stopping the
|
|
||||||
# Network UPS Tools monitoring component (upsmon).
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Arnaud Quette <aquette@debian.org>
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
|
||||||
|
|
||||||
NAME=nut-client
|
|
||||||
DESC="NUT - power device monitor and shutdown controller"
|
|
||||||
CONFIG=/etc/nut/nut.conf
|
|
||||||
pid_dir=/run/nut
|
|
||||||
upsmon_pid=${pid_dir}/upsmon.pid
|
|
||||||
upsmon=/sbin/upsmon
|
|
||||||
log=">/dev/null 2>/dev/null"
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
# set upsmon specific options. use "man upsmon" for more info
|
|
||||||
# this parameter is now located in nut.conf, and not in /etc/default/nut anymore
|
|
||||||
# FIXME: retrieved from 'nut' script during update
|
|
||||||
UPSMON_OPTIONS=""
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x "$upsmon" ] || exit 0
|
|
||||||
|
|
||||||
# Include NUT nut.conf
|
|
||||||
[ -r $CONFIG ] && . $CONFIG
|
|
||||||
|
|
||||||
# FIXME: put all common bits, between nut-client and nut-server,
|
|
||||||
# into a common nut-function
|
|
||||||
|
|
||||||
# Explicitly require the configuration to be done in /etc/nut/nut.conf
|
|
||||||
if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then
|
|
||||||
log_action_msg "$NAME disabled, please adjust the configuration to your needs"
|
|
||||||
log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it"
|
|
||||||
# exit success to avoid breaking the install process!
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if /run/nut exists and has the correct perms
|
|
||||||
check_var_directory() {
|
|
||||||
[ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \
|
|
||||||
&& chown root:nut ${pid_dir} \
|
|
||||||
&& chmod 770 ${pid_dir} \
|
|
||||||
&& [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir}
|
|
||||||
}
|
|
||||||
|
|
||||||
# check if the right components are running
|
|
||||||
check_status() {
|
|
||||||
case "$MODE" in
|
|
||||||
standalone|netserver|netclient)
|
|
||||||
status_of_proc -p $upsmon_pid $upsmon upsmon
|
|
||||||
;;
|
|
||||||
none|*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
start_stop_client () {
|
|
||||||
case "$MODE" in
|
|
||||||
standalone|netserver|netclient)
|
|
||||||
# FIXME: for standalone|netserver, ensure 'nut-server status' returns ?
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \
|
|
||||||
-- $UPSMON_OPTIONS >/dev/null 2>&1 && return 0 || return 1
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 \
|
|
||||||
&& return 0 || return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
none|*)
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
|
|
||||||
start)
|
|
||||||
log_daemon_msg "Starting $DESC" "$NAME"
|
|
||||||
check_var_directory
|
|
||||||
start_stop_client start
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
stop)
|
|
||||||
log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
start_stop_client stop
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
reload)
|
|
||||||
log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
$upsmon -c reload >/dev/null 2>&1
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
restart|force-reload)
|
|
||||||
# FIXME: lack consistency, due to initscript split.
|
|
||||||
# This only addresses partial reload.
|
|
||||||
# Full reload requires to:
|
|
||||||
# - stop nut-client
|
|
||||||
# - restart (Ie stop+start) nut-server
|
|
||||||
# - start nut-client
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
start_stop_client stop || true
|
|
||||||
# should then 'start_stop_server stop', Ie /etc/init.d/nut-server stop
|
|
||||||
#sleep 5
|
|
||||||
check_var_directory
|
|
||||||
# should first 'start_stop_server start', Ie /etc/init.d/nut-server start
|
|
||||||
start_stop_client start
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
status)
|
|
||||||
#log_daemon_msg "Checking status of $DESC"
|
|
||||||
echo "Checking status of $DESC"
|
|
||||||
check_status
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
poweroff)
|
|
||||||
case "$MODE" in
|
|
||||||
standalone|netserver)
|
|
||||||
# Sanity check
|
|
||||||
flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf`
|
|
||||||
if [ -z "$flag" ] ; then
|
|
||||||
log_action_msg "##########################################################"
|
|
||||||
log_action_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##"
|
|
||||||
log_action_msg "## ##"
|
|
||||||
log_action_msg "## Please read the Manual page upsmon.conf(5) ##"
|
|
||||||
log_action_msg "##########################################################"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Defer to nut-server to actually poweroff the UPS, if needed
|
|
||||||
# (the need is tested here though!)
|
|
||||||
if $upsmon -K >/dev/null 2>&1 ; then
|
|
||||||
log_daemon_msg "UPS poweroff required..."
|
|
||||||
log_end_msg 0
|
|
||||||
if [ -x /etc/init.d/nut-server ] ; then
|
|
||||||
exec /etc/init.d/nut-server poweroff
|
|
||||||
else
|
|
||||||
log_action_msg "Failure: /etc/init.d/nut-server script missing"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log_action_msg "Power down flag is not set (UPS poweroff not needed)"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
none|netclient|*)
|
|
||||||
# nothing to do
|
|
||||||
log_action_msg "'$MODE' configuration does not require UPS poweroff"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
N=/etc/init.d/$NAME
|
|
||||||
echo "Usage: $N {start|stop|reload|restart|force-reload|status|poweroff}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
25
debian/nut-client.install
vendored
25
debian/nut-client.install
vendored
|
@ -1,25 +0,0 @@
|
||||||
debian/tmp/bin/upsc
|
|
||||||
debian/tmp/bin/upscmd
|
|
||||||
debian/tmp/bin/upslog
|
|
||||||
debian/tmp/bin/upsrw
|
|
||||||
debian/tmp/bin/upssched-cmd
|
|
||||||
debian/tmp/etc/nut/nut.conf
|
|
||||||
debian/tmp/etc/nut/upsmon.conf
|
|
||||||
debian/tmp/etc/nut/upssched.conf
|
|
||||||
debian/tmp/lib/nut/upsmon
|
|
||||||
debian/tmp/lib/systemd/system/nut-client.service
|
|
||||||
debian/tmp/lib/systemd/system/nut-monitor.service
|
|
||||||
debian/tmp/lib/systemd/system/ups-monitor.service
|
|
||||||
debian/tmp/sbin/upsmon
|
|
||||||
debian/tmp/sbin/upssched
|
|
||||||
debian/tmp/usr/share/apport/package-hooks/source_nut-client.py
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nuthostsconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutnutconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupsconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupsdconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupsdusers.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupsmonconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupsschedconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/nutupssetconf.aug
|
|
||||||
debian/tmp/usr/share/augeas/lenses/tests/test_nut.aug
|
|
||||||
debian/tmp/usr/share/bash-completion/completions/nut
|
|
1
debian/nut-client.links
vendored
1
debian/nut-client.links
vendored
|
@ -1 +0,0 @@
|
||||||
etc/init.d/nut-client etc/init.d/ups-monitor
|
|
1
debian/nut-client.lintian-overrides
vendored
1
debian/nut-client.lintian-overrides
vendored
|
@ -1 +0,0 @@
|
||||||
nut-client: script-in-etc-init.d-not-registered-via-update-rc.d
|
|
1
debian/nut-client.maintscript
vendored
1
debian/nut-client.maintscript
vendored
|
@ -1 +0,0 @@
|
||||||
rm_conffile /etc/bash_completion.d/nut 2.7.1-1~
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue