Imported Upstream version 1.4.16_pre1

This commit is contained in:
Jan Wagner 2013-11-26 23:58:53 +01:00
parent 047baae1ca
commit 212b4b8677
69 changed files with 10803 additions and 2698 deletions

840
COPYING
View file

@ -1,284 +1,625 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 3, 29 June 2007
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The GNU General Public License is a free, copyleft license for
freedom to share and change it. By contrast, the GNU General Public software and other kinds of works.
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This The licenses for most software and other practical works are designed
General Public License applies to most of the Free Software to take away your freedom to share and change the works. By contrast,
Foundation's software and to any other program whose authors commit to the GNU General Public License is intended to guarantee your freedom to
using it. (Some other Free Software Foundation software is covered by share and change all versions of a program--to make sure it remains free
the GNU Library General Public License instead.) You can apply it to software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too. your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it them if you wish), that you receive source code or can get it if you
if you want it, that you can change the software or use pieces of it want it, that you can change the software or use pieces of it in new
in new free programs; and that you know you can do these things. free programs, and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid To protect your rights, we need to prevent others from denying you
anyone to deny you these rights or to ask you to surrender the rights. these rights or asking you to surrender the rights. Therefore, you have
These restrictions translate to certain responsibilities for you if you certain responsibilities if you distribute copies of the software, or if
distribute copies of the software, or if you modify it. you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that gratis or for a fee, you must pass on to the recipients the same
you have. You must make sure that they, too, receive or can get the freedoms that you received. You must make sure that they, too, receive
source code. And you must show them these terms so they know their or can get the source code. And you must show them these terms so they
rights. know their rights.
We protect your rights with two steps: (1) copyright the software, and Developers that use the GNU GPL protect your rights with two steps:
(2) offer you this license which gives you legal permission to copy, (1) assert copyright on the software, and (2) offer you this License
distribute and/or modify the software. giving you legal permission to copy, distribute and/or modify it.
Also, for each author's protection and ours, we want to make certain For the developers' and authors' protection, the GPL clearly explains
that everyone understands that there is no warranty for this free that there is no warranty for this free software. For both users' and
software. If the software is modified by someone else and passed on, we authors' sake, the GPL requires that modified versions be marked as
want its recipients to know that what they have is not the original, so changed, so that their problems will not be attributed erroneously to
that any problems introduced by others will not reflect on the original authors of previous versions.
authors' reputations.
Finally, any free program is threatened constantly by software Some devices are designed to deny users access to install or run
patents. We wish to avoid the danger that redistributors of a free modified versions of the software inside them, although the manufacturer
program will individually obtain patent licenses, in effect making the can do so. This is fundamentally incompatible with the aim of
program proprietary. To prevent this, we have made it clear that any protecting users' freedom to change the software. The systematic
patent must be licensed for everyone's free use or not licensed at all. pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains TERMS AND CONDITIONS
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not 0. Definitions.
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's "This License" refers to version 3 of the GNU General Public License.
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and "Copyright" also means copyright-like laws that apply to other kinds of
you may at your option offer warranty protection in exchange for a fee. works, such as semiconductor masks.
2. You may modify your copy or copies of the Program or any portion "The Program" refers to any copyrightable work licensed under this
of it, thus forming a work based on the Program, and copy and License. Each licensee is addressed as "you". "Licensees" and
distribute such modifications or work under the terms of Section 1 "recipients" may be individuals or organizations.
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices To "modify" a work means to copy from or adapt all or part of the work
stating that you changed the files and the date of any change. in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
b) You must cause any work that you distribute or publish, that in A "covered work" means either the unmodified Program or a work based
whole or in part contains or is derived from the Program or any on the Program.
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively To "propagate" a work means to do anything with it that, without
when run, you must cause it, when started running for such permission, would make you directly or secondarily liable for
interactive use in the most ordinary way, to print or display an infringement under applicable copyright law, except executing it on a
announcement including an appropriate copyright notice and a computer or modifying a private copy. Propagation includes copying,
notice that there is no warranty (or else, saying that you provide distribution (with or without modification), making available to the
a warranty) and that users may redistribute the program under public, and in some countries other activities as well.
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest To "convey" a work means any kind of propagation that enables other
your rights to work written entirely by you; rather, the intent is to parties to make or receive copies. Mere interaction with a user through
exercise the right to control the distribution of derivative or a computer network, with no transfer of a copy, is not conveying.
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program An interactive user interface displays "Appropriate Legal Notices"
with the Program (or with a work based on the Program) on a volume of to the extent that it includes a convenient and prominently visible
a storage or distribution medium does not bring the other work under feature that (1) displays an appropriate copyright notice, and (2)
the scope of this License. tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
3. You may copy and distribute the Program (or a work based on it, 1. Source Code.
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable The "source code" for a work means the preferred form of the work
source code, which must be distributed under the terms of Sections for making modifications to it. "Object code" means any non-source
1 and 2 above on a medium customarily used for software interchange; or, form of a work.
b) Accompany it with a written offer, valid for at least three A "Standard Interface" means an interface that either is an official
years, to give any third party, for a charge no more than your standard defined by a recognized standards body, or, in the case of
cost of physically performing source distribution, a complete interfaces specified for a particular programming language, one that
machine-readable copy of the corresponding source code, to be is widely used among developers working in that language.
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer The "System Libraries" of an executable work include anything, other
to distribute corresponding source code. (This alternative is than the work as a whole, that (a) is included in the normal form of
allowed only for noncommercial distribution and only if you packaging a Major Component, but which is not part of that Major
received the program in object code or executable form with such Component, and (b) serves only to enable use of the work with that
an offer, in accord with Subsection b above.) Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The source code for a work means the preferred form of the work for The "Corresponding Source" for a work in object code form means all
making modifications to it. For an executable work, complete source the source code needed to generate, install, and (for an executable
code means all the source code for all modules it contains, plus any work) run the object code and to modify the work, including scripts to
associated interface definition files, plus the scripts used to control those activities. However, it does not include the work's
control compilation and installation of the executable. However, as a System Libraries, or general-purpose tools or generally available free
special exception, the source code distributed need not include programs which are used unmodified in performing those activities but
anything that is normally distributed (in either source or binary which are not part of the work. For example, Corresponding Source
form) with the major components (compiler, kernel, and so on) of the includes interface definition files associated with source files for
operating system on which the executable runs, unless that component the work, and the source code for shared libraries and dynamically
itself accompanies the executable. linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
If distribution of executable or object code is made by offering The Corresponding Source need not include anything that users
access to copy from a designated place, then offering equivalent can regenerate automatically from other parts of the Corresponding
access to copy the source code from the same place counts as Source.
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not The Corresponding Source for a work in source code form is that
signed it. However, nothing else grants you permission to modify or same work.
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the 2. Basic Permissions.
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to All rights granted under this License are granted for the term of
these terms and conditions. You may not impose any further copyright on the Program, and are irrevocable provided the stated
restrictions on the recipients' exercise of the rights granted herein. conditions are met. This License explicitly affirms your unlimited
You are not responsible for enforcing compliance by third parties to permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License. this License.
7. If, as a consequence of a court judgment or allegation of patent Each contributor grants you a non-exclusive, worldwide, royalty-free
infringement or for any other reason (not limited to patent issues), patent license under the contributor's essential patent claims, to
conditions are imposed on you (whether by court order, agreement or make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot excuse you from the conditions of this License. If you cannot convey a
distribute so as to satisfy simultaneously your obligations under this covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you License and any other pertinent obligations, then as a consequence you may
may not distribute the Program at all. For example, if a patent not convey it at all. For example, if you agree to terms that obligate you
license would not permit royalty-free redistribution of the Program by to collect a royalty for further conveying from those to whom you convey
all those who receive copies directly or indirectly through you, then the Program, the only way you could satisfy both those terms and this
the only way you could satisfy both it and this License would be to License would be to refrain entirely from conveying the Program.
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under 13. Use with the GNU Affero General Public License.
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any Notwithstanding any other provision of this License, you have
patents or other property right claims or to contest validity of any permission to link or combine any covered work with a work licensed
such claims; this section has the sole purpose of protecting the under version 3 of the GNU Affero General Public License into a single
integrity of the free software distribution system, which is combined work, and to convey the resulting work. The terms of this
implemented by public license practices. Many people have made License will continue to apply to the part which is the covered work,
generous contributions to the wide range of software distributed but the special requirements of the GNU Affero General Public License,
through that system in reliance on consistent application of that section 13, concerning interaction through a network will apply to the
system; it is up to the author/donor to decide if he or she is willing combination as such.
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to 14. Revised Versions of this License.
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions The Free Software Foundation may publish revised and/or new versions of
of the General Public License from time to time. Such new versions will the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Program Each version is given a distinguishing version number. If the
specifies a version number of this License which applies to it and "any Program specifies that a certain numbered version of the GNU General
later version", you have the option of following the terms and conditions Public License "or any later version" applies to it, you have the
either of that version or of any later version published by the Free option of following the terms and conditions either of that numbered
Software Foundation. If the Program does not specify a version number of version or of any later version published by the Free Software
this License, you may choose any version ever published by the Free Software Foundation. If the Program does not specify a version number of the
Foundation. GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free If the Program specifies that a proxy can decide which future
programs whose distribution conditions are different, write to the author versions of the GNU General Public License can be used, that proxy's
to ask for permission. For software which is copyrighted by the Free public statement of acceptance of a version permanently authorizes you
Software Foundation, write to the Free Software Foundation; we sometimes to choose that version for the Program.
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 15. Disclaimer of Warranty.
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
POSSIBILITY OF SUCH DAMAGES.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> <one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
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
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
@ -304,37 +645,30 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details. GNU 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, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this If the program does terminal interaction, make it output a short
when it starts in an interactive mode: notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author <program> Copyright (C) <year> <name of author>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may parts of the General Public License. Of course, your program's commands
be called something other than `show w' and `show c'; they could even be might be different; for a GUI interface, you would use an "about box".
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your You should also get your employer (if you work as a programmer) or school,
school, if any, to sign a "copyright disclaimer" for the program, if if any, to sign a "copyright disclaimer" for the program, if necessary.
necessary. Here is a sample; alter the names: For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program The GNU General Public License does not permit incorporating your program
`Gnomovision' (which makes passes at compilers) written by James Hacker. into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
<signature of Ty Coon>, 1 April 1989 the library. If this is what you want to do, use the GNU Lesser General
Ty Coon, President of Vice Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View file

@ -2,7 +2,7 @@ Installation Instructions
************************* *************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006 Free Software Foundation, Inc. 2006, 2007 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it. unlimited permission to copy, distribute and modify it.
@ -67,6 +67,9 @@ The simplest way to compile this package is:
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.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options Compilers and Options
===================== =====================

View file

@ -16,7 +16,7 @@ localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" DEFS = -DLOCALEDIR=\"$(localedir)\"
dist-hook: dist-hook:
make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec $(MAKE) THANKS
echo ${VERSION} >$(distdir)/release echo ${VERSION} >$(distdir)/release
install-root: install-root:
@ -28,13 +28,6 @@ test test-debug:
cd plugins && $(MAKE) $@ cd plugins && $(MAKE) $@
cd plugins-scripts && $(MAKE) $@ cd plugins-scripts && $(MAKE) $@
nagios-plugins.spec: nagios-plugins.spec.in
sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
$(top_srcdir)/mkinstalldirs pkg/fedora
sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
# Solaris pkgmk # Solaris pkgmk
BUILDDIR = build-solaris BUILDDIR = build-solaris
PACKDIR = build-pkg PACKDIR = build-pkg
@ -45,7 +38,9 @@ solpkg:
if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
$(MAKE) all $(MAKE) all
$(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
$(INSTALL) plugins-root/pst3 $(BUILDDIR)$(libexecdir)
$(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
$(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
THANKS: THANKS.in THANKS: THANKS.in

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -34,13 +34,14 @@ host_triplet = @host@
subdir = . subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/command.cfg.in \ $(srcdir)/Makefile.in $(srcdir)/command.cfg.in \
$(srcdir)/config.h.in $(srcdir)/test.pl.in \ $(srcdir)/config.h.in $(srcdir)/nagios-plugins.spec.in \
$(top_srcdir)/configure $(top_srcdir)/pkg/solaris/pkginfo.in \ $(srcdir)/test.pl.in $(top_srcdir)/configure \
ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS \ $(top_srcdir)/pkg/solaris/pkginfo.in ABOUT-NLS AUTHORS COPYING \
build-aux/compile build-aux/config.guess \ ChangeLog INSTALL NEWS THANKS build-aux/compile \
build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ build-aux/config.guess build-aux/config.rpath \
build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ build-aux/config.sub build-aux/depcomp build-aux/install-sh \
build-aux/mkinstalldirs config.rpath mkinstalldirs build-aux/ltmain.sh build-aux/missing build-aux/mkinstalldirs \
config.rpath mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/np_mysqlclient.m4 \
$(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 $(top_srcdir)/gl/m4/alloca.m4 \
@ -138,7 +139,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = command.cfg test.pl pkg/solaris/pkginfo CONFIG_CLEAN_FILES = nagios-plugins.spec command.cfg test.pl \
pkg/solaris/pkginfo
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@ -1057,6 +1059,8 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr: distclean-hdr:
-rm -f config.h stamp-h1 -rm -f config.h stamp-h1
nagios-plugins.spec: $(top_builddir)/config.status $(srcdir)/nagios-plugins.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
command.cfg: $(top_builddir)/config.status $(srcdir)/command.cfg.in command.cfg: $(top_builddir)/config.status $(srcdir)/command.cfg.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in test.pl: $(top_builddir)/config.status $(srcdir)/test.pl.in
@ -1148,8 +1152,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1174,8 +1178,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1185,13 +1189,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique
@ -1265,6 +1268,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir) $(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir) $(am__remove_distdir)
@ -1291,6 +1298,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
@ -1442,22 +1451,22 @@ uninstall-am:
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \ all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-zip \
distclean distclean-generic distclean-hdr distclean-libtool \ distcheck distclean distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distclean-libtool distclean-tags distcleancheck distdir \
dvi-am html html-am info info-am install install-am \ distuninstallcheck dvi dvi-am html html-am info info-am \
install-data install-data-am install-dvi install-dvi-am \ install install-am install-data install-data-am install-dvi \
install-exec install-exec-am install-html install-html-am \ install-dvi-am install-exec install-exec-am install-html \
install-info install-info-am install-man install-pdf \ install-html-am install-info install-info-am install-man \
install-pdf-am install-ps install-ps-am install-strip \ install-pdf install-pdf-am install-ps install-ps-am \
installcheck installcheck-am installdirs installdirs-am \ install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \ installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
tags tags-recursive uninstall uninstall-am ps ps-am tags tags-recursive uninstall uninstall-am
dist-hook: dist-hook:
make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec $(MAKE) THANKS
echo ${VERSION} >$(distdir)/release echo ${VERSION} >$(distdir)/release
install-root: install-root:
@ -1469,19 +1478,14 @@ test test-debug:
cd plugins && $(MAKE) $@ cd plugins && $(MAKE) $@
cd plugins-scripts && $(MAKE) $@ cd plugins-scripts && $(MAKE) $@
nagios-plugins.spec: nagios-plugins.spec.in
sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
$(top_srcdir)/mkinstalldirs pkg/fedora
sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
solpkg: solpkg:
if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
$(MAKE) all $(MAKE) all
$(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
$(INSTALL) plugins-root/pst3 $(BUILDDIR)$(libexecdir)
$(INSTALL) pkg/solaris/pkginfo $(BUILDDIR) $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
$(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR) cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
THANKS: THANKS.in THANKS: THANKS.in

26
NEWS
View file

@ -1,5 +1,31 @@
This file documents the major additions and syntax changes between releases. This file documents the major additions and syntax changes between releases.
...
ENHANCEMENTS
check_nt UPTIME accepts warning/critical thresholds (Ryan Kelly)
check_disk_smb now allows spaces in share names (#990948, #1370031, Debian #601699)
check_http now uses standard threshold functions (enables floating point and ranges)
check_http now checks for and prints the certificate cn (hostname) in SSL certificate checks (Stéphane Urbanovski)
check_http now supports an optional -S/--ssl value to choose the SSL protocol version (#3066166 - Jason Lunn)
Add perfdata to check_ssh (#3244097 - Marco Beck)
New option to check_smtp to ignore failures when sending QUIT (#3358348 - Duncan Ferguson)
New check_by_ssh -F option which allows for specifying an alternative ssh_config(5) file (#2895334 - Sven Nierlein)
check_sensors now detects faulty sensors unless --ignore-fault is specified (Jan Wagner)
utils.sh now provides a check_range function (Alex Griffin)
Improved the performance of check_users (Marc Remy)
Updated Nagios::Plugin perl module
FIXES
Fix check_disk free space calculation if blocksizes differ within a disk group (Bekar - #2973603)
check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly (Debian #601696)
Make check_snmp work more like v1.4.14 with regard to using special values (Timeticks, STRING) as numeric thresholds
Fix check_ldap overriding the port when --ssl was specified after -p
Fix check_procs where regex input of '|' would get displayed in output - now replaced with ','
Fix segfault in check_host when hostname returns multiple IP addresses (Sebastian Harl)
Fix check_smtp and check_tcp where duplicate messages were displayed for certificate errors
Fix check_ping's parsing of the output of Debian's ping6(1) implementation (#1894850 - Matej Vela)
Disable RFC4507 support, to work around SSL negotiation issues with (at least) some Tomcat versions
1.4.15 27th July 2010 1.4.15 27th July 2010
ENHANCEMENTS ENHANCEMENTS
New check_ntp_peer -m and -n options to check the number of usable time sources ("truechimers") New check_ntp_peer -m and -n options to check the number of usable time sources ("truechimers")

8
THANKS
View file

@ -23,6 +23,7 @@ Michael Bakker
Nobuhiro Ban Nobuhiro Ban
John Barbuto John Barbuto
Jeremy Baumgartner Jeremy Baumgartner
Marco Beck
Andreas Behal Andreas Behal
Lutz Behnke Lutz Behnke
Marlo Bell Marlo Bell
@ -99,12 +100,14 @@ Aravind Gottipati
Kev Green Kev Green
Steve Greenland Steve Greenland
Olaf Greis Olaf Greis
Alex Griffin
Chris Grim Chris Grim
Steven Grimm Steven Grimm
Sebastien Guay Sebastien Guay
Jon Hallett Jon Hallett
Steve Hanselman Steve Hanselman
Ask Bjoern Hansen Ask Bjoern Hansen
Sebastian Harl
Michael Haro Michael Haro
Olli Hauer Olli Hauer
Gunnar Hellekson Gunnar Hellekson
@ -124,6 +127,7 @@ Nikita Kalabukhov
Frank Kannemann Frank Kannemann
Roy Sigurd Karlsbakk Roy Sigurd Karlsbakk
Jason Kau Jason Kau
Ryan Kelly
Bo Kersey Bo Kersey
Konstantin Khomoutov Konstantin Khomoutov
Serhan Kiymaz Serhan Kiymaz
@ -145,6 +149,7 @@ Craig Leres
Jan Lipphaus Jan Lipphaus
Larry Low Larry Low
Jacob Lundqvist Jacob Lundqvist
Jason Lunn
Guenther Mair Guenther Mair
Pawel Malachowski Pawel Malachowski
Michael Markstaller Michael Markstaller
@ -197,6 +202,7 @@ Olivier 'Babar' Raginel
Phil Randal Phil Randal
Abid Rasheed Abid Rasheed
Jeremy Reed Jeremy Reed
Marc Remy
Alessandro Ren Alessandro Ren
Joe Rhett Joe Rhett
Cliff Rice Cliff Rice
@ -242,10 +248,12 @@ Ibere Tizio
Julien Touche Julien Touche
Kyle Tucker Kyle Tucker
Jerome Tytgat Jerome Tytgat
Stéphane Urbanovski
Matthias Urlichs Matthias Urlichs
Matteo HCE Valsasna Matteo HCE Valsasna
Jon Vandegrift Jon Vandegrift
Laurent Vaslin Laurent Vaslin
Matej Vela
Carole Verdon Carole Verdon
Ludse Verhoeven Ludse Verhoeven
Robert August Vincent Robert August Vincent

6690
aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Inc. # Free Software Foundation, Inc.
timestamp='2006-07-02' timestamp='2008-01-23'
# 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
@ -56,8 +56,8 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
Free Software Foundation, Inc. 2002, 2003, 2004, 2005, 2006, 2007, 2008 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."
@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
@ -329,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:SunOS:5.*:*) i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
@ -531,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2 echo rs6000-ibm-aix3.2
fi fi
exit ;; exit ;;
*:AIX:*:[45]) *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
@ -780,7 +781,7 @@ EOF
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
i*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
@ -790,12 +791,18 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[3456]*) *:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE} echo i586-pc-interix${UNAME_RELEASE}
exit ;; exit ;;
EM64T:Interix*:[3456]*) EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE} echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;; exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
@ -829,7 +836,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit ;; exit ;;
arm*:Linux:*:*) arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;; exit ;;
avr32*:Linux:*:*) avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -950,6 +964,9 @@ EOF
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
@ -1208,6 +1225,15 @@ EOF
SX-6:SUPER-UX:*:*) SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE} echo sx6-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;; exit ;;
@ -1458,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you the operating system you are using. It is advised that you
download the most up to date version of the config scripts from download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please If the version you run ($0) is already up to date, please
send the following data and any information you think might be send the following data and any information you think might be

66
build-aux/config.sub vendored
View file

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Inc. # Free Software Foundation, Inc.
timestamp='2006-09-20' timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
Free Software Foundation, Inc. 2002, 2003, 2004, 2005, 2006, 2007, 2008 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."
@ -245,12 +245,12 @@ case $basic_machine in
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | 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 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@ -324,7 +324,7 @@ case $basic_machine in
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | 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-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
@ -369,10 +369,14 @@ case $basic_machine in
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \ | xstormy16-* | xtensa*-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-*)
;; ;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# 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)
@ -443,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent basic_machine=ns32k-sequent
os=-dynix os=-dynix
;; ;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
@ -475,8 +487,8 @@ case $basic_machine in
basic_machine=craynv-cray basic_machine=craynv-cray
os=-unicosmp os=-unicosmp
;; ;;
cr16c) cr16)
basic_machine=cr16c-unknown basic_machine=cr16-unknown
os=-elf os=-elf
;; ;;
crds | unos) crds | unos)
@ -668,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi basic_machine=m68k-isi
os=-sysv os=-sysv
;; ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*) m88k-omron*)
basic_machine=m88k-omron basic_machine=m88k-omron
;; ;;
@ -683,6 +703,10 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe) miniframe)
basic_machine=m68000-convergent basic_machine=m68000-convergent
;; ;;
@ -809,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel basic_machine=i860-intel
os=-osf os=-osf
;; ;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd) pbd)
basic_machine=sparc-tti basic_machine=sparc-tti
;; ;;
@ -925,6 +957,9 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64) sh64)
basic_machine=sh64-unknown basic_machine=sh64-unknown
;; ;;
@ -1014,6 +1049,10 @@ case $basic_machine in
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
os=-coff os=-coff
;; ;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39) tx39)
basic_machine=mipstx39-unknown basic_machine=mipstx39-unknown
;; ;;
@ -1219,7 +1258,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1414,6 +1453,9 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*)
os=-elf
;;
mips*-cisco) mips*-cisco)
os=-elf os=-elf
;; ;;

View file

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18 scriptversion=2007-03-29.01
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc. # Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -215,34 +215,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the # current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information. # start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases. # Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
tmpdepfile="$stripped.u" test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M "$@" -Wc,-M
else else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M "$@" -M
fi fi
stat=$? stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile" rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat exit $stat
fi fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'. # Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to # Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'. # `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" # That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2006-10-14.15 scriptversion=2006-12-25.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -48,7 +48,7 @@ IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit=${DOITPROG-}
if test -z "$doit"; then if test -z "$doit"; then
doit_exec=exec doit_exec=exec
else else
@ -58,34 +58,49 @@ fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
mvprog="${MVPROG-mv}" chgrpprog=${CHGRPPROG-chgrp}
cpprog="${CPPROG-cp}" chmodprog=${CHMODPROG-chmod}
chmodprog="${CHMODPROG-chmod}" chownprog=${CHOWNPROG-chown}
chownprog="${CHOWNPROG-chown}" cmpprog=${CMPPROG-cmp}
chgrpprog="${CHGRPPROG-chgrp}" cpprog=${CPPROG-cp}
stripprog="${STRIPPROG-strip}" mkdirprog=${MKDIRPROG-mkdir}
rmprog="${RMPROG-rm}" mvprog=${MVPROG-mv}
mkdirprog="${MKDIRPROG-mkdir}" rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob= posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
mode=0755 mode=0755
chgrpcmd=
chmodcmd=$chmodprog chmodcmd=$chmodprog
chowncmd= chowncmd=
chgrpcmd= mvcmd=$mvprog
stripcmd=
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" stripcmd=
src= src=
dst= dst=
dir_arg= dir_arg=
dstarg= dst_arg=
copy_on_change=false
no_target_directory= no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES... or: $0 [OPTION]... -d DIRECTORIES...
@ -95,7 +110,11 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES. In the 4th, create DIRECTORIES.
Options: Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored) -c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP. -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE. -m MODE $chmodprog installed files to MODE.
@ -103,57 +122,43 @@ Options:
-s $stripprog installed files. -s $stripprog installed files.
-t DIRECTORY install into DIRECTORY. -t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory. -T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
" "
while test $# -ne 0; do while test $# -ne 0; do
case $1 in case $1 in
-c) shift -c) ;;
continue;;
-d) dir_arg=true -C) copy_on_change=true;;
shift
continue;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift shift;;
shift
continue;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
shift
shift
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*) '* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2 echo "$0: invalid mode: $mode" >&2
exit 1;; exit 1;;
esac esac
continue;; shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift shift;;
shift
continue;;
-s) stripcmd=$stripprog -s) stripcmd=$stripprog;;
shift
continue;;
-t) dstarg=$2 -t) dst_arg=$2
shift shift;;
shift
continue;;
-T) no_target_directory=true -T) no_target_directory=true;;
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
@ -165,21 +170,22 @@ while test $# -ne 0; do
*) break;; *) break;;
esac esac
shift
done done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@. # Otherwise, the last argument is the destination. Remove it from $@.
for arg for arg
do do
if test -n "$dstarg"; then if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg. # $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg" set fnord "$@" "$dst_arg"
shift # fnord shift # fnord
fi fi
shift # arg shift # arg
dstarg=$arg dst_arg=$arg
done done
fi fi
@ -242,12 +248,12 @@ do
exit 1 exit 1
fi fi
if test -z "$dstarg"; then if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2 echo "$0: no destination specified." >&2
exit 1 exit 1
fi fi
dst=$dstarg dst=$dst_arg
# Protect names starting with `-'. # Protect names starting with `-'.
case $dst in case $dst in
-*) dst=./$dst;; -*) dst=./$dst;;
@ -257,7 +263,7 @@ do
# if double slashes aren't ignored. # if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
@ -378,26 +384,19 @@ do
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix=/ ;; /*) prefix='/';;
-*) prefix=./ ;; -*) prefix='./';;
*) prefix= ;; *) prefix='';;
esac esac
case $posix_glob in eval "$initialize_posix_glob"
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob && set -f $posix_glob set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob && set +f $posix_glob set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
@ -459,41 +458,54 @@ do
# ignore errors from any of these, just make sure not to ignore # ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command. # errors from the above "$doit $cpprog $src $dsttmp" command.
# #
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else # The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
if test -f "$dst"; then test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null \ $doit $rmcmd -f "$dst" 2>/dev/null ||
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|| { } ||
echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
else
:
fi
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
} || exit 1 fi || exit 1
trap '' 0 trap '' 0
fi fi

View file

@ -535,6 +535,9 @@
/* Define to 1 if you have the `mprotect' function. */ /* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT #undef HAVE_MPROTECT
/* Define to 1 if you have the <mp.h> header file. */
#undef HAVE_MP_H
/* Defined if mysqlclient is found and can compile */ /* Defined if mysqlclient is found and can compile */
#undef HAVE_MYSQLCLIENT #undef HAVE_MYSQLCLIENT

231
configure vendored
View file

@ -2750,7 +2750,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_files="$ac_config_files gl/Makefile" ac_config_files="$ac_config_files gl/Makefile nagios-plugins.spec"
ac_aux_dir= ac_aux_dir=
for ac_dir in build-aux "$srcdir"/build-aux; do for ac_dir in build-aux "$srcdir"/build-aux; do
@ -13886,6 +13886,211 @@ if test $ac_cv_lib_m_floor = yes; then
fi fi
for ac_header in mp.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
{ echo "$as_me:$LINENO: checking for pow in -lbsd" >&5
echo $ECHO_N "checking for pow in -lbsd... $ECHO_C" >&6; }
if test "${ac_cv_lib_bsd_pow+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char pow ();
int
main ()
{
return pow ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_bsd_pow=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_bsd_pow=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_pow" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_pow" >&6; }
if test $ac_cv_lib_bsd_pow = yes; then
MATHLIBS="$MATHLIBS -lbsd"
fi
# Check whether --enable-libtap was given. # Check whether --enable-libtap was given.
if test "${enable_libtap+set}" = set; then if test "${enable_libtap+set}" = set; then
@ -15391,6 +15596,12 @@ fi
fi fi
np_mysql_libs="`$np_mysql_config --libs`" np_mysql_libs="`$np_mysql_config --libs`"
np_mysql_cflags="`$np_mysql_config --cflags`" np_mysql_cflags="`$np_mysql_config --cflags`"
# On Solaris, cflags may contain -xstrconst, which is not acceptable to the
# gcc compiler. In this case, use the include flags as the cflags
echo $np_mysql_cflags | grep -- -xstrconst > /dev/null 2> /dev/null
if test $? -eq 0 -a "$CC" = "gcc" ; then
np_mysql_cflags="`$np_mysql_config --include`"
fi
_savedcppflags="$CPPFLAGS" _savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $np_mysql_include" CPPFLAGS="$CPPFLAGS $np_mysql_include"
@ -56405,6 +56616,7 @@ for ac_config_target in $ac_config_targets
do do
case $ac_config_target in case $ac_config_target in
"gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;;
"nagios-plugins.spec") CONFIG_FILES="$CONFIG_FILES nagios-plugins.spec" ;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
@ -58047,21 +58259,22 @@ echo "$as_me: $ac_file is unchanged" >&6;}
fi fi
rm -f "$tmp/out12" rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers. # Compute $ac_file's index in $config_headers.
_am_arg=$ac_file
_am_stamp_count=1 _am_stamp_count=1
for _am_header in $config_headers :; do for _am_header in $config_headers :; do
case $_am_header in case $_am_header in
$ac_file | $ac_file:* ) $_am_arg | $_am_arg:* )
break ;; break ;;
* ) * )
_am_stamp_count=`expr $_am_stamp_count + 1` ;; _am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac esac
done done
echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X$ac_file : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \
X$ac_file : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(//\)$' \| \
X$ac_file : 'X\(/\)' \| . 2>/dev/null || X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
echo X$ac_file | echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/ s//\1/
q q
@ -58098,7 +58311,7 @@ echo "$as_me: executing $ac_file commands" >&6;}
# each Makefile.in and add a new line on top of each file to say so. # 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 # 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.
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" || dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)[^/]' \| \

View file

@ -2,7 +2,8 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(nagios-plugins,1.4.15) AC_INIT(nagios-plugins,1.4.15)
AC_CONFIG_SRCDIR(NPTest.pm) AC_CONFIG_SRCDIR(NPTest.pm)
AC_CONFIG_FILES(gl/Makefile) AC_CONFIG_FILES([gl/Makefile
nagios-plugins.spec])
AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_AUX_DIR(build-aux)
AM_INIT_AUTOMAKE([1.8.3]) AM_INIT_AUTOMAKE([1.8.3])
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
@ -162,6 +163,8 @@ dnl
dnl check for math-related functions needing -lm dnl check for math-related functions needing -lm
AC_CHECK_HEADERS(math.h) AC_CHECK_HEADERS(math.h)
AC_CHECK_LIB(m,floor,MATHLIBS="-lm") AC_CHECK_LIB(m,floor,MATHLIBS="-lm")
AC_CHECK_HEADERS(mp.h)
AC_CHECK_LIB(bsd,pow,MATHLIBS="$MATHLIBS -lbsd")
AC_SUBST(MATHLIBS) AC_SUBST(MATHLIBS)
dnl Check if we buils local libtap dnl Check if we buils local libtap

View file

@ -71,7 +71,8 @@ while(defined $nextdev){
} elsif (/^($nextdev)\s*:/) { } elsif (/^($nextdev)\s*:/) {
$device=$1; $device=$1;
$devices{$device}=$device; $devices{$device}=$device;
if (/active/) { if (/\sactive/) {
$status{$device} = ''; # Shall be filled later if available
$active{$device} = 1; $active{$device} = 1;
} }
} }
@ -80,7 +81,11 @@ while(defined $nextdev){
} }
foreach my $k (sort keys %devices){ foreach my $k (sort keys %devices){
if ($status{$k} =~ /_/) { if (!exists($status{$k})) {
$msg .= sprintf " %s inactive with no status information.",
$devices{$k};
$code = max_state($code, "CRITICAL");
} elsif ($status{$k} =~ /_/) {
if (defined $recovery{$k}) { if (defined $recovery{$k}) {
$msg .= sprintf " %s status=%s, recovery=%s, finish=%s.", $msg .= sprintf " %s status=%s, recovery=%s, finish=%s.",
$devices{$k}, $status{$k}, $recovery{$k}, $finish{$k}; $devices{$k}, $status{$k}, $recovery{$k}, $finish{$k};
@ -94,10 +99,11 @@ foreach my $k (sort keys %devices){
$code = max_state($code, "OK"); $code = max_state($code, "OK");
} else { } else {
if ($active{$k}) { if ($active{$k}) {
$msg .= sprintf " %s active with no status information.\n", $msg .= sprintf " %s active with no status information.",
$devices{$k}; $devices{$k};
$code = max_state($code, "OK"); $code = max_state($code, "OK");
} else { } else {
# This should't run anymore, but is left as a catch-all
$msg .= sprintf " %s does not exist.\n", $devices{$k}; $msg .= sprintf " %s does not exist.\n", $devices{$k};
$code = max_state($code, "CRITICAL"); $code = max_state($code, "CRITICAL");
} }

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -154,7 +154,7 @@ am_libgnu_a_OBJECTS = base64.$(OBJEXT) close-hook.$(OBJEXT) \
xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT) xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT)
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1345,8 +1345,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1371,8 +1371,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1382,13 +1382,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -142,7 +142,7 @@ am__libnagiosplug_a_SOURCES_DIST = utils_base.c utils_disk.c \
am_libnagiosplug_a_OBJECTS = utils_base.$(OBJEXT) utils_disk.$(OBJEXT) \ am_libnagiosplug_a_OBJECTS = utils_base.$(OBJEXT) utils_disk.$(OBJEXT) \
utils_tcp.$(OBJEXT) utils_cmd.$(OBJEXT) $(am__objects_1) utils_tcp.$(OBJEXT) utils_cmd.$(OBJEXT) $(am__objects_1)
libnagiosplug_a_OBJECTS = $(am_libnagiosplug_a_OBJECTS) libnagiosplug_a_OBJECTS = $(am_libnagiosplug_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1156,8 +1156,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1182,8 +1182,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1193,13 +1193,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -185,7 +185,7 @@ test_utils_OBJECTS = test_utils.$(OBJEXT)
test_utils_LDADD = $(LDADD) test_utils_LDADD = $(LDADD)
test_utils_DEPENDENCIES = $(top_srcdir)/lib/libnagiosplug.a \ test_utils_DEPENDENCIES = $(top_srcdir)/lib/libnagiosplug.a \
$(top_srcdir)/gl/libgnu.a $(top_srcdir)/gl/libgnu.a
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1172,8 +1172,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1185,8 +1185,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1196,13 +1196,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique

View file

@ -58,6 +58,19 @@ np_add_parameter(struct parameter_list **list, const char *name)
new_path->usedinodes_percent = NULL; new_path->usedinodes_percent = NULL;
new_path->freeinodes_percent = NULL; new_path->freeinodes_percent = NULL;
new_path->group = NULL; new_path->group = NULL;
new_path->dfree_pct = -1;
new_path->dused_pct = -1;
new_path->total = 0;
new_path->available = 0;
new_path->available_to_root = 0;
new_path->used = 0;
new_path->dused_units = 0;
new_path->dfree_units = 0;
new_path->dtotal_units = 0;
new_path->inodes_total = 0;
new_path->inodes_free = 0;
new_path->dused_inodes_percent = 0;
new_path->dfree_inodes_percent = 0;
if (current == NULL) { if (current == NULL) {
*list = new_path; *list = new_path;

View file

@ -24,6 +24,10 @@ struct parameter_list
char *group; char *group;
struct mount_entry *best_match; struct mount_entry *best_match;
struct parameter_list *name_next; struct parameter_list *name_next;
uintmax_t total, available, available_to_root, used, inodes_free, inodes_total;
double dfree_pct, dused_pct;
double dused_units, dfree_units, dtotal_units;
double dused_inodes_percent, dfree_inodes_percent;
}; };
void np_add_name (struct name_list **list, const char *name); void np_add_name (struct name_list **list, const char *name);

View file

@ -42,6 +42,12 @@ AC_DEFUN([np_mysqlclient],
fi fi
np_mysql_libs="`$np_mysql_config --libs`" np_mysql_libs="`$np_mysql_config --libs`"
np_mysql_cflags="`$np_mysql_config --cflags`" np_mysql_cflags="`$np_mysql_config --cflags`"
# On Solaris, cflags may contain -xstrconst, which is not acceptable to the
# gcc compiler. In this case, use the include flags as the cflags
echo $np_mysql_cflags | grep -- -xstrconst > /dev/null 2> /dev/null
if test $? -eq 0 -a "$CC" = "gcc" ; then
np_mysql_cflags="`$np_mysql_config --include`"
fi
dnl Test a mysql_init. Some systems have mysql_config, but no headers dnl Test a mysql_init. Some systems have mysql_config, but no headers
_savedcppflags="$CPPFLAGS" _savedcppflags="$CPPFLAGS"

View file

@ -1,3 +1,20 @@
# Macros
%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
%if %{isaix}
%define _prefix /opt/nagios
# %define _defaultdocdir %{_datadir}/doc
%else
%define _libexecdir %{_exec_prefix}/lib/nagios/plugins
%endif
%define _sysconfdir /etc/nagios
%define npusr nagios
%define nphome /opt/nagios
%define npgrp nagios
Name: nagios-plugins Name: nagios-plugins
Version: 1.4.15 Version: 1.4.15
Release: 1 Release: 1
@ -9,7 +26,13 @@ URL: http://nagiosplug.sourceforge.net/
Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define npdir %{_builddir}/%{name}-%{version}
%if %{isaix}
Prefix: %{_prefix}
%else
Prefix: %{_prefix}/lib/nagios/plugins Prefix: %{_prefix}/lib/nagios/plugins
%endif
Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net> Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
Vendor: Nagios Plugin Development Group Vendor: Nagios Plugin Development Group
Provides: nagios-plugins Provides: nagios-plugins
@ -19,6 +42,60 @@ Obsoletes: nagios-plugins-custom nagios-plugins-extras
# Requires # Requires
%if %{isaix}
Requires: fping
Requires: gawk
Requires: net-snmp
Requires: net-snmp-perl
Requires: net-snmp-utils
Requires: openldap
Requires: openssl
Requires: perl
Requires: python
Requires: openssl
BuildRequires: fping
BuildRequires: gawk
BuildRequires: net-snmp
BuildRequires: net-snmp-perl
BuildRequires: net-snmp-utils
BuildRequires: openldap-devel
%endif
%if %{isredhatfamily}
Requires: bind-utils
Requires: coreutils
Requires: fping
Requires: gawk
Requires: grep
Requires: iputils
Requires: mysql
Requires: net-snmp-utils
Requires: ntp
Requires: openldap
Requires: openssl
Requires: openssh-clients
Requires: perl
Requires: postgresql-libs
Requires: procps
Requires: python
Requires: samba-client
Requires: shadow-utils
Requires: traceroute
Requires: /usr/bin/mailq
BuildRequires: bind-utils
BuildRequires: coreutils
BuildRequires: iputils
BuildRequires: mysql-devel
BuildRequires: net-snmp-utils
BuildRequires: net-tools
BuildRequires: ntp
BuildRequires: openldap-devel
BuildRequires: openssh-clients
BuildRequires: openssl-devel
BuildRequires: postgresql-devel
BuildRequires: procps
BuildRequires: samba-client
BuildRequires: /usr/bin/mailq
%endif
%description %description
@ -37,38 +114,79 @@ contains those plugins.
%build %build
./configure \ %{?isaix: MAKE=gmake} ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \ --exec-prefix=%{_exec_prefix} \
--libexecdir=%{_exec_prefix}/lib/nagios/plugins \ --libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir}/nagios \ --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \ --datadir=%{_datadir} \
--with-cgiurl=/nagios/cgi-bin --with-cgiurl=/nagios/cgi-bin
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
make %{?_smp_mflags} make %{?_smp_mflags}
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
%pre
# Create `nagios' group on the system if necessary
%if %{isaix}
lsgroup %{npgrp} > /dev/null 2> /dev/null
if [ $? -eq 2 ] ; then
mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
fi
%endif
%if %{islinux}
getent group %{npgrp} > /dev/null 2> /dev/null
if [ $? -ne 0 ] ; then
groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
fi
%endif
# Create `nagios' user on the system if necessary
%if %{isaix}
lsuser %{npusr} > /dev/null 2> /dev/null
if [ $? -eq 2 ] ; then
useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
fi
%endif
%if %{islinux}
getent passwd %{npusr} > /dev/null 2> /dev/null
if [ $? -ne 0 ] ; then
useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
fi
%endif
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
install -d ${RPM_BUILD_ROOT}/etc/nagios build-aux/install-sh -c -d ${RPM_BUILD_ROOT}%{_sysconfdir}
install -m 664 command.cfg ${RPM_BUILD_ROOT}/etc/nagios build-aux/install-sh -c -m 664 command.cfg ${RPM_BUILD_ROOT}%{_sysconfdir}
%find_lang %{name} %find_lang %{name}
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%defattr(755,root,root)" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%{_libexecdir}/utils.pm" >> %{name}.lang
echo "%{_libexecdir}/utils.sh" >> %{name}.lang
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %config(missingok,noreplace) %{_sysconfdir}/command.cfg
%config(missingok,noreplace) /etc/nagios/command.cfg
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS %doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
%doc ChangeLog command.cfg %doc ChangeLog command.cfg
%defattr(775,root,root) %if ! %{isaix}
%dir %{_exec_prefix}/lib/nagios/plugins
%{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo %{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo
%{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo %{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo
%{_exec_prefix}/lib/nagios/plugins %endif
%changelog %changelog
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head * Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head

199
nagios-plugins.spec.in Normal file
View file

@ -0,0 +1,199 @@
# Macros
%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
%if %{isaix}
%define _prefix /opt/nagios
# %define _defaultdocdir %{_datadir}/doc
%else
%define _libexecdir %{_exec_prefix}/lib/nagios/plugins
%endif
%define _sysconfdir /etc/nagios
%define npusr nagios
%define nphome /opt/nagios
%define npgrp nagios
Name: nagios-plugins
Version: @PACKAGE_VERSION@
Release: @RELEASE@
Summary: Host/service/network monitoring program plugins for Nagios
Group: Applications/System
License: GPL
URL: http://nagiosplug.sourceforge.net/
Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define npdir %{_builddir}/%{name}-%{version}
%if %{isaix}
Prefix: %{_prefix}
%else
Prefix: %{_prefix}/lib/nagios/plugins
%endif
Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
Vendor: Nagios Plugin Development Group
Provides: nagios-plugins
%{!?custom:%global custom 0}
Obsoletes: nagios-plugins-custom nagios-plugins-extras
# Requires
%if %{isaix}
Requires: fping
Requires: gawk
Requires: net-snmp
Requires: net-snmp-perl
Requires: net-snmp-utils
Requires: openldap
Requires: openssl
Requires: perl
Requires: python
Requires: openssl
BuildRequires: fping
BuildRequires: gawk
BuildRequires: net-snmp
BuildRequires: net-snmp-perl
BuildRequires: net-snmp-utils
BuildRequires: openldap-devel
%endif
%if %{isredhatfamily}
Requires: bind-utils
Requires: coreutils
Requires: fping
Requires: gawk
Requires: grep
Requires: iputils
Requires: mysql
Requires: net-snmp-utils
Requires: ntp
Requires: openldap
Requires: openssl
Requires: openssh-clients
Requires: perl
Requires: postgresql-libs
Requires: procps
Requires: python
Requires: samba-client
Requires: shadow-utils
Requires: traceroute
Requires: /usr/bin/mailq
BuildRequires: bind-utils
BuildRequires: coreutils
BuildRequires: iputils
BuildRequires: mysql-devel
BuildRequires: net-snmp-utils
BuildRequires: net-tools
BuildRequires: ntp
BuildRequires: openldap-devel
BuildRequires: openssh-clients
BuildRequires: openssl-devel
BuildRequires: postgresql-devel
BuildRequires: procps
BuildRequires: samba-client
BuildRequires: /usr/bin/mailq
%endif
%description
Nagios is a program that will monitor hosts and services on your
network, and to email or page you when a problem arises or is
resolved. Nagios runs on a unix server as a background or daemon
process, intermittently running checks on various services that you
specify. The actual service checks are performed by separate "plugin"
programs which return the status of the checks to Nagios. This package
contains those plugins.
%prep
%setup -q
%build
%{?isaix: MAKE=gmake} ./configure \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--with-cgiurl=/nagios/cgi-bin
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
make %{?_smp_mflags}
ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
%pre
# Create `nagios' group on the system if necessary
%if %{isaix}
lsgroup %{npgrp} > /dev/null 2> /dev/null
if [ $? -eq 2 ] ; then
mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
fi
%endif
%if %{islinux}
getent group %{npgrp} > /dev/null 2> /dev/null
if [ $? -ne 0 ] ; then
groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
fi
%endif
# Create `nagios' user on the system if necessary
%if %{isaix}
lsuser %{npusr} > /dev/null 2> /dev/null
if [ $? -eq 2 ] ; then
useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
fi
%endif
%if %{islinux}
getent passwd %{npusr} > /dev/null 2> /dev/null
if [ $? -ne 0 ] ; then
useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
%nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
fi
%endif
%install
rm -rf $RPM_BUILD_ROOT
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
build-aux/install-sh -c -d ${RPM_BUILD_ROOT}%{_sysconfdir}
build-aux/install-sh -c -m 664 command.cfg ${RPM_BUILD_ROOT}%{_sysconfdir}
%find_lang %{name}
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%defattr(755,root,root)" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
echo "%{_libexecdir}/utils.pm" >> %{name}.lang
echo "%{_libexecdir}/utils.sh" >> %{name}.lang
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%config(missingok,noreplace) %{_sysconfdir}/command.cfg
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
%doc ChangeLog command.cfg
%if ! %{isaix}
%{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo
%{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo
%endif
%changelog
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
- just include the nagios plugins directory, which will automatically include
all generated plugins (which keeps the build from failing on systems that
don't have all build-dependencies for every plugin)
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
- extensive rewrite to facilitate processing into various distro-compatible specs
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
- extensive rewrite to facilitate processing into various distro-compatible specs

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# perlmods/Makefile. Generated from Makefile.in by configure. # perlmods/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -29,8 +29,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = i386-apple-darwin9.8.0 build_triplet = x86_64-unknown-linux-gnu
host_triplet = i386-apple-darwin9.8.0 host_triplet = x86_64-unknown-linux-gnu
subdir = perlmods subdir = perlmods
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -132,23 +132,23 @@ CONFIG_CLEAN_FILES =
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run aclocal-1.10 ACLOCAL = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run aclocal-1.10
ALLOCA = ALLOCA =
ALLOCA_H = alloca.h ALLOCA_H = alloca.h
AMTAR = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run tar AMTAR = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run tar
APPLE_UNIVERSAL_BUILD = 0 APPLE_UNIVERSAL_BUILD = 0
AR = ar AR = ar
ASM_SYMBOL_PREFIX = "_" ASM_SYMBOL_PREFIX = ""
AUTOCONF = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run autoconf AUTOCONF = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run autoconf
AUTOHEADER = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run autoheader AUTOHEADER = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run autoheader
AUTOMAKE = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run automake-1.10 AUTOMAKE = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run automake-1.10
AWK = awk AWK = mawk
BASENAME = /usr/bin/basename BASENAME = /usr/bin/basename
BITSIZEOF_PTRDIFF_T = 32 BITSIZEOF_PTRDIFF_T =
BITSIZEOF_SIG_ATOMIC_T = 32 BITSIZEOF_SIG_ATOMIC_T =
BITSIZEOF_SIZE_T = 32 BITSIZEOF_SIZE_T =
BITSIZEOF_WCHAR_T = 32 BITSIZEOF_WCHAR_T =
BITSIZEOF_WINT_T = 32 BITSIZEOF_WINT_T =
CC = gcc CC = gcc
CCDEPMODE = depmode=gcc3 CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2 CFLAGS = -g -O2
@ -158,12 +158,12 @@ CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps DEPDIR = .deps
DEPLIBS = DEPLIBS =
DSYMUTIL = dsymutil DSYMUTIL =
DUMPBIN = DUMPBIN =
ECHO_C = \c ECHO_C =
ECHO_N = ECHO_N = -n
ECHO_T = ECHO_T =
EGREP = /usr/bin/grep -E EGREP = /bin/grep -E
EMULTIHOP_HIDDEN = EMULTIHOP_HIDDEN =
EMULTIHOP_VALUE = EMULTIHOP_VALUE =
ENOLINK_HIDDEN = ENOLINK_HIDDEN =
@ -172,21 +172,21 @@ EOVERFLOW_HIDDEN =
EOVERFLOW_VALUE = EOVERFLOW_VALUE =
ERRNO_H = ERRNO_H =
EXEEXT = EXEEXT =
EXTRAS = check_ldap check_mysql check_mysql_query check_procs check_nagios check_dns check_hpjd check_snmp check_by_ssh check_dig check_nt EXTRAS = check_pgsql check_ldap check_ide_smart check_mysql check_mysql_query check_procs check_nagios check_dns check_hpjd check_snmp check_by_ssh check_swap check_dig check_apt check_nt
EXTRAS_ROOT = EXTRAS_ROOT =
EXTRA_NETOBJS = EXTRA_NETOBJS =
EXTRA_TEST = EXTRA_TEST =
FGREP = /usr/bin/grep -F FGREP = /bin/grep -F
FLOAT_H = FLOAT_H =
FLOORF_LIBM = FLOORF_LIBM = -lm
GETADDRINFO_LIB = GETADDRINFO_LIB =
GETHOSTNAME_LIB = GETHOSTNAME_LIB =
GETLOADAVG_LIBS = GETLOADAVG_LIBS =
GETOPT_H = getopt.h GETOPT_H = getopt.h
GETTEXT_MACRO_VERSION = 0.18 GETTEXT_MACRO_VERSION = 0.18
GLIBC21 = no GLIBC21 = yes
GMSGFMT = /opt/local/bin/msgfmt GMSGFMT = /usr/bin/msgfmt
GMSGFMT_015 = /opt/local/bin/msgfmt GMSGFMT_015 = /usr/bin/msgfmt
GNULIB_ACCEPT = 0 GNULIB_ACCEPT = 0
GNULIB_ACCEPT4 = 0 GNULIB_ACCEPT4 = 0
GNULIB_ACOSL = 0 GNULIB_ACOSL = 0
@ -407,7 +407,7 @@ GNULIB_WCSRTOMBS = 0
GNULIB_WCTOB = 0 GNULIB_WCTOB = 0
GNULIB_WCWIDTH = 0 GNULIB_WCWIDTH = 0
GNULIB_WRITE = 1 GNULIB_WRITE = 1
GREP = /usr/bin/grep GREP = /bin/grep
HAVE_ACCEPT4 = 1 HAVE_ACCEPT4 = 1
HAVE_ACOSL = 1 HAVE_ACOSL = 1
HAVE_ARPA_INET_H = 1 HAVE_ARPA_INET_H = 1
@ -425,7 +425,7 @@ HAVE_DECL_ATANL = 1
HAVE_DECL_CEILF = 1 HAVE_DECL_CEILF = 1
HAVE_DECL_CEILL = 1 HAVE_DECL_CEILL = 1
HAVE_DECL_COSL = 1 HAVE_DECL_COSL = 1
HAVE_DECL_ENVIRON = 0 HAVE_DECL_ENVIRON = 1
HAVE_DECL_EXPL = 1 HAVE_DECL_EXPL = 1
HAVE_DECL_FLOORF = 1 HAVE_DECL_FLOORF = 1
HAVE_DECL_FLOORL = 1 HAVE_DECL_FLOORL = 1
@ -456,8 +456,8 @@ HAVE_DECL_SINL = 1
HAVE_DECL_SNPRINTF = 1 HAVE_DECL_SNPRINTF = 1
HAVE_DECL_SQRTL = 1 HAVE_DECL_SQRTL = 1
HAVE_DECL_STRDUP = 1 HAVE_DECL_STRDUP = 1
HAVE_DECL_STRNDUP = 0 HAVE_DECL_STRNDUP = 1
HAVE_DECL_STRNLEN = 0 HAVE_DECL_STRNLEN = 1
HAVE_DECL_STRSIGNAL = 1 HAVE_DECL_STRSIGNAL = 1
HAVE_DECL_STRTOK_R = 1 HAVE_DECL_STRTOK_R = 1
HAVE_DECL_TANL = 1 HAVE_DECL_TANL = 1
@ -550,9 +550,9 @@ HAVE_RENAMEAT = 1
HAVE_RPMATCH = 1 HAVE_RPMATCH = 1
HAVE_SA_FAMILY_T = 1 HAVE_SA_FAMILY_T = 1
HAVE_SETENV = 1 HAVE_SETENV = 1
HAVE_SIGNED_SIG_ATOMIC_T = 1 HAVE_SIGNED_SIG_ATOMIC_T =
HAVE_SIGNED_WCHAR_T = 1 HAVE_SIGNED_WCHAR_T =
HAVE_SIGNED_WINT_T = 1 HAVE_SIGNED_WINT_T =
HAVE_SINL = 1 HAVE_SINL = 1
HAVE_SLEEP = 1 HAVE_SLEEP = 1
HAVE_SQRTL = 1 HAVE_SQRTL = 1
@ -568,13 +568,13 @@ HAVE_STRTOD = 1
HAVE_STRTOLL = 1 HAVE_STRTOLL = 1
HAVE_STRTOULL = 1 HAVE_STRTOULL = 1
HAVE_STRUCT_ADDRINFO = 1 HAVE_STRUCT_ADDRINFO = 1
HAVE_STRUCT_RANDOM_DATA = 0 HAVE_STRUCT_RANDOM_DATA = 1
HAVE_STRUCT_SOCKADDR_STORAGE = 1 HAVE_STRUCT_SOCKADDR_STORAGE = 1
HAVE_STRVERSCMP = 1 HAVE_STRVERSCMP = 1
HAVE_SYMLINK = 1 HAVE_SYMLINK = 1
HAVE_SYMLINKAT = 1 HAVE_SYMLINKAT = 1
HAVE_SYS_BITYPES_H = 0 HAVE_SYS_BITYPES_H =
HAVE_SYS_INTTYPES_H = 0 HAVE_SYS_INTTYPES_H =
HAVE_SYS_LOADAVG_H = 0 HAVE_SYS_LOADAVG_H = 0
HAVE_SYS_PARAM_H = 0 HAVE_SYS_PARAM_H = 0
HAVE_SYS_SOCKET_H = 1 HAVE_SYS_SOCKET_H = 1
@ -613,10 +613,10 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL} INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
INTLLIBS = INTLLIBS =
INTL_MACOSX_LIBS = -Wl,-framework -Wl,CoreFoundation INTL_MACOSX_LIBS =
KMEM_GROUP = KMEM_GROUP =
KRBINCLUDE = KRBINCLUDE =
LD = /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld LD = /usr/bin/ld -m elf_x86_64
LDAPINCLUDE = -I/usr/include/ldap LDAPINCLUDE = -I/usr/include/ldap
LDAPLIBS = -lldap -llber LDAPLIBS = -lldap -llber
LDFLAGS = -L. LDFLAGS = -L.
@ -625,29 +625,29 @@ LIBGNU_LIBDEPS =
LIBGNU_LTLIBDEPS = LIBGNU_LTLIBDEPS =
LIBICONV = -liconv LIBICONV = -liconv
LIBINTL = LIBINTL =
LIBOBJS = ${LIBOBJDIR}error$U.o LIBOBJS =
LIBS = -lpthread -ldl LIBS = -lpthread -ldl
LIBSOCKET = LIBSOCKET =
LIBTOOL = $(SHELL) $(top_builddir)/libtool LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIPO = lipo LIPO =
LN_S = ln -s LN_S = ln -s
LOCALCHARSET_TESTS_ENVIRONMENT = CHARSETALIASDIR="$(top_builddir)/gl" LOCALCHARSET_TESTS_ENVIRONMENT = CHARSETALIASDIR="$(top_builddir)/gl"
LOCALE_FR = fr_FR.ISO8859-1 LOCALE_FR = none
LOCALE_FR_UTF8 = fr_FR.UTF-8 LOCALE_FR_UTF8 = none
LOCALE_JA = ja_JP.eucJP LOCALE_JA = none
LOCALE_ZH_CN = zh_CN.GB18030 LOCALE_ZH_CN = none
LTLIBICONV = -liconv LTLIBICONV = -liconv
LTLIBINTL = LTLIBINTL =
LTLIBOBJS = ${LIBOBJDIR}error$U.lo LTLIBOBJS =
MAKEINFO = ${SHELL} /tmp/nagiosplugins/build-aux/missing --run makeinfo MAKEINFO = ${SHELL} /home/nagiosplugins/staging/nagiosplugins/build-aux/missing --run makeinfo
MATHLIBS = -lm MATHLIBS = -lm
MKDIR_P = ../build-aux/install-sh -c -d MKDIR_P = /bin/mkdir -p
MSGFMT = /opt/local/bin/msgfmt MSGFMT = /usr/bin/msgfmt
MSGFMT_015 = /opt/local/bin/msgfmt MSGFMT_015 = /usr/bin/msgfmt
MSGMERGE = /opt/local/bin/msgmerge MSGMERGE = /usr/bin/msgmerge
MYSQLCFLAGS = -I/usr/local/mysql/include -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL MYSQLCFLAGS = -I/usr/include/mysql -DBIG_JOINS=1 -fPIC
MYSQLINCLUDE = -I/usr/local/mysql/include MYSQLINCLUDE = -I/usr/include/mysql
MYSQLLIBS = -L/usr/local/mysql/lib -lmysqlclient -lz -lm MYSQLLIBS = -L/usr/lib/mysql -lmysqlclient
NEED_SETGID = false NEED_SETGID = false
NETINET_IN_H = NETINET_IN_H =
NEXT_ARPA_INET_H = <arpa/inet.h> NEXT_ARPA_INET_H = <arpa/inet.h>
@ -692,13 +692,13 @@ NEXT_TIME_H = <time.h>
NEXT_UNISTD_H = <unistd.h> NEXT_UNISTD_H = <unistd.h>
NEXT_WCHAR_H = <wchar.h> NEXT_WCHAR_H = <wchar.h>
NEXT_WCTYPE_H = <wctype.h> NEXT_WCTYPE_H = <wctype.h>
NM = /usr/bin/nm -p NM = /usr/bin/nm -B
NMEDIT = nmedit NMEDIT =
NP_RELEASE = 1.4.15 NP_RELEASE = 1.4.15
OBJDUMP = false OBJDUMP = objdump
OBJEXT = o OBJEXT = o
OTOOL = otool OTOOL =
OTOOL64 = : OTOOL64 =
PACKAGE = nagios-plugins PACKAGE = nagios-plugins
PACKAGE_BUGREPORT = PACKAGE_BUGREPORT =
PACKAGE_NAME = nagios-plugins PACKAGE_NAME = nagios-plugins
@ -706,21 +706,21 @@ PACKAGE_STRING = nagios-plugins 1.4.15
PACKAGE_TARNAME = nagios-plugins PACKAGE_TARNAME = nagios-plugins
PACKAGE_VERSION = 1.4.15 PACKAGE_VERSION = 1.4.15
PATH_SEPARATOR = : PATH_SEPARATOR = :
PATH_TO_APTGET = PATH_TO_APTGET = /usr/bin/apt-get
PATH_TO_DIG = /usr/bin/dig PATH_TO_DIG = /usr/bin/dig
PATH_TO_FPING = PATH_TO_FPING =
PATH_TO_LMSTAT = PATH_TO_LMSTAT =
PATH_TO_LSPS = PATH_TO_LSPS =
PATH_TO_MAILQ = /usr/bin/mailq PATH_TO_MAILQ = /usr/bin/mailq
PATH_TO_NSLOOKUP = /usr/bin/nslookup PATH_TO_NSLOOKUP = /usr/bin/nslookup
PATH_TO_PING = /sbin/ping PATH_TO_PING = /bin/ping
PATH_TO_PING6 = /sbin/ping6 PATH_TO_PING6 = /bin/ping6
PATH_TO_PS = /bin/ps PATH_TO_PS = /bin/ps
PATH_TO_QMAIL_QSTAT = PATH_TO_QMAIL_QSTAT =
PATH_TO_QSTAT = PATH_TO_QSTAT =
PATH_TO_QUAKESTAT = PATH_TO_QUAKESTAT =
PATH_TO_RPCINFO = /usr/sbin/rpcinfo PATH_TO_RPCINFO = /usr/bin/rpcinfo
PATH_TO_SMBCLIENT = /usr/bin/smbclient PATH_TO_SMBCLIENT =
PATH_TO_SNMPGET = /usr/bin/snmpget PATH_TO_SNMPGET = /usr/bin/snmpget
PATH_TO_SNMPGETNEXT = /usr/bin/snmpgetnext PATH_TO_SNMPGETNEXT = /usr/bin/snmpgetnext
PATH_TO_SSH = /usr/bin/ssh PATH_TO_SSH = /usr/bin/ssh
@ -730,11 +730,11 @@ PATH_TO_UPTIME = /usr/bin/uptime
PATH_TO_WHO = /usr/bin/who PATH_TO_WHO = /usr/bin/who
PERL = /usr/bin/perl PERL = /usr/bin/perl
PERLMODS_DIR = PERLMODS_DIR =
PGINCLUDE = PGINCLUDE = -I/usr/include/postgresql
PGLIBS = PGLIBS = -L/lib -lpq -lcrypt
PKG_ARCH = i386 PKG_ARCH = unknown
PLUGIN_TEST = t/check_by_ssh.t t/check_cluster.t t/check_dig.t t/check_disk.t t/check_dns.t t/check_dummy.t t/check_fping.t t/check_ftp.t t/check_hpjd.t t/check_http.t t/check_imap.t t/check_jabber.t t/check_load.t t/check_mysql.t t/check_mysql_query.t t/check_nagios.t t/check_ntp.t t/check_ping.t t/check_pop.t t/check_procs.t t/check_smtp.t t/check_snmp.t t/check_swap.t t/check_tcp.t t/check_time.t t/check_udp.t t/check_users.t t/negate.t PLUGIN_TEST = t/check_by_ssh.t t/check_cluster.t t/check_dig.t t/check_disk.t t/check_dns.t t/check_dummy.t t/check_fping.t t/check_ftp.t t/check_hpjd.t t/check_http.t t/check_imap.t t/check_jabber.t t/check_load.t t/check_mysql.t t/check_mysql_query.t t/check_nagios.t t/check_ntp.t t/check_ping.t t/check_pop.t t/check_procs.t t/check_smtp.t t/check_snmp.t t/check_swap.t t/check_tcp.t t/check_time.t t/check_udp.t t/check_users.t t/negate.t
POSUB = POSUB = po
POW_LIB = POW_LIB =
PRAGMA_SYSTEM_HEADER = #pragma GCC system_header PRAGMA_SYSTEM_HEADER = #pragma GCC system_header
PST3CFLAGS = PST3CFLAGS =
@ -808,7 +808,7 @@ REPLACE_NANOSLEEP = GNULIB_PORTCHECK
REPLACE_NL_LANGINFO = 0 REPLACE_NL_LANGINFO = 0
REPLACE_NULL = 0 REPLACE_NULL = 0
REPLACE_OBSTACK_PRINTF = 0 REPLACE_OBSTACK_PRINTF = 0
REPLACE_OPEN = 1 REPLACE_OPEN = 0
REPLACE_OPENAT = 0 REPLACE_OPENAT = 0
REPLACE_PERROR = 0 REPLACE_PERROR = 0
REPLACE_POPEN = 0 REPLACE_POPEN = 0
@ -825,13 +825,13 @@ REPLACE_RMDIR = 0
REPLACE_ROUND = 0 REPLACE_ROUND = 0
REPLACE_ROUNDF = 0 REPLACE_ROUNDF = 0
REPLACE_ROUNDL = 0 REPLACE_ROUNDL = 0
REPLACE_SETENV = 1 REPLACE_SETENV = 0
REPLACE_SIGNBIT = 0 REPLACE_SIGNBIT = 0
REPLACE_SIGNBIT_USING_GCC = 0 REPLACE_SIGNBIT_USING_GCC = 0
REPLACE_SLEEP = 0 REPLACE_SLEEP = 0
REPLACE_SNPRINTF = 0 REPLACE_SNPRINTF = 0
REPLACE_SPRINTF = 0 REPLACE_SPRINTF = 0
REPLACE_STAT = 1 REPLACE_STAT = 0
REPLACE_STDIO_WRITE_FUNCS = 0 REPLACE_STDIO_WRITE_FUNCS = 0
REPLACE_STPNCPY = 0 REPLACE_STPNCPY = 0
REPLACE_STRCASESTR = 0 REPLACE_STRCASESTR = 0
@ -866,22 +866,22 @@ REPLACE_WCSRTOMBS = 0
REPLACE_WCTOB = 0 REPLACE_WCTOB = 0
REPLACE_WCWIDTH = 0 REPLACE_WCWIDTH = 0
REPLACE_WRITE = 0 REPLACE_WRITE = 0
REV_DATESTAMP = 2010.07.27.21.48 REV_DATESTAMP = 2012.06.11.23.00
REV_TIMESTAMP = 20100727214823 REV_TIMESTAMP = 20120611230042
SCRIPT_TEST = t/check_file_age.t t/check_ifoperstatus.t t/check_ifstatus.t t/check_rpc.t t/utils.t SCRIPT_TEST = t/check_disk_smb.t t/check_file_age.t t/check_ifoperstatus.t t/check_ifstatus.t t/check_rpc.t t/utils.t
SED = /usr/bin/sed SED = /bin/sed
SERVENT_LIB = SERVENT_LIB =
SET_MAKE = SET_MAKE =
SH = /bin/sh SH = /bin/sh
SHELL = /bin/sh SHELL = /bin/sh
SIG_ATOMIC_T_SUFFIX = SIG_ATOMIC_T_SUFFIX =
SIZE_T_SUFFIX = ul SIZE_T_SUFFIX =
SOCKETLIBS = -lresolv SOCKETLIBS = -lnsl -lresolv
SSLINCLUDE = -I/usr/include SSLINCLUDE = -I/usr/include
SSLLIBS = -lssl -lcrypto SSLLIBS = -lssl -lcrypto
STDBOOL_H = STDBOOL_H =
STDDEF_H = STDDEF_H =
STDINT_H = stdint.h STDINT_H =
STRIP = strip STRIP = strip
SUPPORT = Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n SUPPORT = Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\nPlease include version information with all correspondence (when possible,\nuse output from the --version option of the plugin itself).\n
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = 0
@ -889,18 +889,18 @@ TIME_H_DEFINES_STRUCT_TIMESPEC = 1
UNDEFINE_STRTOK_R = 0 UNDEFINE_STRTOK_R = 0
UNISTD_H_HAVE_WINSOCK2_H = 0 UNISTD_H_HAVE_WINSOCK2_H = 0
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = 0 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = 0
USE_NLS = no USE_NLS = yes
VERSION = 1.4.15 VERSION = 1.4.15
WARRANTY = The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n WARRANTY = The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\n
WCHAR_T_SUFFIX = WCHAR_T_SUFFIX =
WINT_T_SUFFIX = WINT_T_SUFFIX =
XGETTEXT = /opt/local/bin/xgettext XGETTEXT = /usr/bin/xgettext
XGETTEXT_015 = /opt/local/bin/xgettext XGETTEXT_015 = /usr/bin/xgettext
XGETTEXT_EXTRA_OPTIONS = --flag=error:3:c-format --flag=error_at_line:5:c-format --flag=asprintf:2:c-format --flag=vasprintf:2:c-format XGETTEXT_EXTRA_OPTIONS = --flag=error:3:c-format --flag=error_at_line:5:c-format --flag=asprintf:2:c-format --flag=vasprintf:2:c-format
abs_builddir = /tmp/nagiosplugins/perlmods abs_builddir = /home/nagiosplugins/staging/nagiosplugins/perlmods
abs_srcdir = /tmp/nagiosplugins/perlmods abs_srcdir = /home/nagiosplugins/staging/nagiosplugins/perlmods
abs_top_builddir = /tmp/nagiosplugins abs_top_builddir = /home/nagiosplugins/staging/nagiosplugins
abs_top_srcdir = /tmp/nagiosplugins abs_top_srcdir = /home/nagiosplugins/staging/nagiosplugins
ac_ct_CC = gcc ac_ct_CC = gcc
ac_ct_DUMPBIN = ac_ct_DUMPBIN =
am__include = include am__include = include
@ -909,11 +909,11 @@ am__quote =
am__tar = ${AMTAR} chof - "$$tardir" am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf - am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin bindir = ${exec_prefix}/bin
build = i386-apple-darwin9.8.0 build = x86_64-unknown-linux-gnu
build_alias = build_alias =
build_cpu = i386 build_cpu = x86_64
build_os = darwin9.8.0 build_os = linux-gnu
build_vendor = apple build_vendor = unknown
builddir = . builddir = .
check_tcp_ssl = check_simap check_spop check_jabber check_nntps check_ssmtp check_tcp_ssl = check_simap check_spop check_jabber check_nntps check_ssmtp
datadir = ${datarootdir} datadir = ${datarootdir}
@ -921,28 +921,28 @@ datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir} dvidir = ${docdir}
exec_prefix = ${prefix} exec_prefix = ${prefix}
gl_LIBOBJS = asnprintf.o basename.o basename-lgpl.o c-strtod.o cloexec.o creat-safer.o dirname.o dirname-lgpl.o dup-safer.o error.o fcntl.o fd-safer.o fsusage.o getopt.o getopt1.o mountlist.o open.o open-safer.o pipe-safer.o printf-args.o printf-parse.o regex.o safe-read.o safe-write.o setenv.o sha1.o stat.o stripslash.o strndup.o strnlen.o vasnprintf.o xmalloc.o gl_LIBOBJS = asnprintf.o basename.o basename-lgpl.o c-strtod.o cloexec.o creat-safer.o dirname.o dirname-lgpl.o dup-safer.o fcntl.o fd-safer.o fsusage.o getopt.o getopt1.o mountlist.o open-safer.o pipe-safer.o printf-args.o printf-parse.o regex.o safe-read.o safe-write.o sha1.o stripslash.o vasnprintf.o xmalloc.o
gl_LTLIBOBJS = asnprintf.lo basename.lo basename-lgpl.lo c-strtod.lo cloexec.lo creat-safer.lo dirname.lo dirname-lgpl.lo dup-safer.lo error.lo fcntl.lo fd-safer.lo fsusage.lo getopt.lo getopt1.lo mountlist.lo open.lo open-safer.lo pipe-safer.lo printf-args.lo printf-parse.lo regex.lo safe-read.lo safe-write.lo setenv.lo sha1.lo stat.lo stripslash.lo strndup.lo strnlen.lo vasnprintf.lo xmalloc.lo gl_LTLIBOBJS = asnprintf.lo basename.lo basename-lgpl.lo c-strtod.lo cloexec.lo creat-safer.lo dirname.lo dirname-lgpl.lo dup-safer.lo fcntl.lo fd-safer.lo fsusage.lo getopt.lo getopt1.lo mountlist.lo open-safer.lo pipe-safer.lo printf-args.lo printf-parse.lo regex.lo safe-read.lo safe-write.lo sha1.lo stripslash.lo vasnprintf.lo xmalloc.lo
gltests_LIBOBJS = gltests_LIBOBJS =
gltests_LTLIBOBJS = gltests_LTLIBOBJS =
gltests_WITNESS = IN_NAGIOS_PLUGINS_GNULIB_TESTS gltests_WITNESS = IN_NAGIOS_PLUGINS_GNULIB_TESTS
host = i386-apple-darwin9.8.0 host = x86_64-unknown-linux-gnu
host_alias = host_alias =
host_cpu = i386 host_cpu = x86_64
host_os = darwin9.8.0 host_os = linux-gnu
host_vendor = apple host_vendor = unknown
htmldir = ${docdir} htmldir = ${docdir}
includedir = ${prefix}/include includedir = ${prefix}/include
infodir = ${datarootdir}/info infodir = ${datarootdir}/info
install_sh = $(SHELL) /tmp/nagiosplugins/build-aux/install-sh install_sh = $(SHELL) /home/nagiosplugins/staging/nagiosplugins/build-aux/install-sh
libdir = ${exec_prefix}/lib libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var localstatedir = ${prefix}/var
lt_ECHO = /bin/echo lt_ECHO = echo
mandir = ${datarootdir}/man mandir = ${datarootdir}/man
mkdir_p = $(top_builddir)/build-aux/install-sh -c -d mkdir_p = /bin/mkdir -p
np_mysql_config = /usr/local/mysql/bin/mysql_config np_mysql_config = /usr/bin/mysql_config
oldincludedir = /usr/include oldincludedir = /usr/include
pdfdir = ${docdir} pdfdir = ${docdir}
prefix = /usr/local/nagios prefix = /usr/local/nagios

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.

Binary file not shown.

Binary file not shown.

View file

@ -1,12 +1,12 @@
PKG="NAGplugin" PKG="NGOSplugin"
NAME="nagios-plugins" NAME="nagios-plugins"
DESC="Nagios network monitoring plugins" DESC="Nagios network monitoring plugins"
ARCH="i386" ARCH="unknown"
VERSION="1.4.15,REV=2010.07.27.21.48" VERSION="1.4.15,REV=2012.06.11.23.00"
CATEGORY="application" CATEGORY="application"
VENDOR="Nagios Plugin Development Team" VENDOR="Nagios Plugin Development Team"
EMAIL="nagiosplug-devel@lists.sourceforge.net" EMAIL="nagiosplug-devel@lists.sourceforge.net"
PSTAMP="nag20100727214823" PSTAMP="nag20120611230042"
BASEDIR="/" BASEDIR="/"
CLASSES="none" CLASSES="none"

View file

@ -1,4 +1,4 @@
PKG="NAGplugin" PKG="NGOSplugin"
NAME="nagios-plugins" NAME="nagios-plugins"
DESC="Nagios network monitoring plugins" DESC="Nagios network monitoring plugins"
ARCH="@PKG_ARCH@" ARCH="@PKG_ARCH@"

35
pkg/solaris/preinstall Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/sh
user="nagios"
uid=-1
group="nagios"
gid=-1
/usr/bin/getent group $group > /dev/null 2> /dev/null
result=$?
if [ $result -eq 2 ] ; then
echo "Group $group does not exist. Creating..."
if [ $gid -ne -1 ] ; then
/usr/sbin/groupadd -g $gid $group
else
/usr/sbin/groupadd $group
fi
elif [ $result -ne 0 ] ; then
echo "An error occurred determining the existence of the groug $group. Terminating."
exit 1;
fi
/usr/bin/getent passwd $user > /dev/null 2> /dev/null
result=$?
if [ $result -eq 2 ] ; then
echo "User $user does not exist. Creating..."
if [ $uid -ne -1 ] ; then
/usr/sbin/useradd -u $uid -g $group $user
else
/usr/sbin/useradd -g $group $user
fi
elif [ $result -ne 0 ] ; then
echo "An error occurred determining the existence of the user $user. Terminating."
exit 1;
fi

View file

@ -8,6 +8,7 @@ $pkgmk = "/usr/bin/pkgmk";
$pkgtrans = "/usr/bin/pkgtrans"; $pkgtrans = "/usr/bin/pkgtrans";
$prototype = "prototype"; $prototype = "prototype";
$pkginfo = "pkginfo"; $pkginfo = "pkginfo";
$preinstall = "preinstall";
$egrep = "/usr/bin/egrep"; $egrep = "/usr/bin/egrep";
# Sanity check # Sanity check
@ -24,17 +25,24 @@ open (PREPROTO,"$find . -print |$egrep -v \"^\.(/usr(/local)?|/opt)?\$\" | $pkgp
open (PROTO,">$prototype") || open (PROTO,">$prototype") ||
die "Unable to write file prototype ($!)\n"; die "Unable to write file prototype ($!)\n";
print PROTO "i pkginfo=./$pkginfo\n"; print PROTO "i pkginfo=./$pkginfo\n";
print PROTO "i preinstall=./$preinstall\n";
while (<PREPROTO>) { while (<PREPROTO>) {
# Read in the prototype information # Read in the prototype information
chomp; chomp;
$thisline = $_; $thisline = $_;
if ($thisline =~ " prototype " if ($thisline =~ " prototype "
or $thisline =~ " pkginfo ") { or $thisline =~ " pkginfo "
or $thisline =~ " preinstall ") {
# Don't do anything as they aren't important # Don't do anything as they aren't important
} elsif ($thisline =~ "pst3") {
# Needs to be installed SUID root
($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
print PROTO "$dir $none $file 4755 root bin\n";
} elsif ($thisline =~ "^[fd] ") { } elsif ($thisline =~ "^[fd] ") {
# Change the ownership of files and directories # Change the ownership of files and directories
($dir, $none, $file, $mode, $user, $group) = split / /,$thisline; ($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
print PROTO "$dir $none $file $mode bin bin\n"; print PROTO "$dir $none $file $mode $user bin\n";
} else { } else {
# Symlinks and other stuff should be printed also # Symlinks and other stuff should be printed also
print PROTO "$thisline\n"; print PROTO "$thisline\n";
@ -58,6 +66,7 @@ while (<PKGINFO>) {
$thisline = $_; $thisline = $_;
($var,$value) = split /=/,$thisline; ($var,$value) = split /=/,$thisline;
if ("$var" eq "NAME" if ("$var" eq "NAME"
or "$var" eq "PKG"
or "$var" eq "VERSION" or "$var" eq "VERSION"
or "$var" eq "ARCH") { or "$var" eq "ARCH") {
$tmp = lc($var); $tmp = lc($var);
@ -77,5 +86,5 @@ $packagename = "$name-$version-$os-$arch-local";
print "Building package\n"; print "Building package\n";
system ("$pkgmk -o -r `pwd` -d $pkgdevice"); system ("$pkgmk -o -r `pwd` -d $pkgdevice");
system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename)"); system ("(cd $pkgdevice && $pkgtrans -s `pwd` ../$packagename $pkg)");
print "Done. ($packagename)\n"; print "Done. ($packagename)\n";

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -147,7 +147,7 @@ pst3_LDADD = $(LDADD)
pst3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ pst3_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(pst3_CFLAGS) $(CFLAGS) $(pst3_LDFLAGS) \ --mode=link $(CCLD) $(pst3_CFLAGS) $(CFLAGS) $(pst3_LDFLAGS) \
$(LDFLAGS) -o $@ $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1133,8 +1133,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1146,8 +1146,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1157,13 +1157,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique

View file

@ -621,7 +621,7 @@ main(int argc, char **argv)
} }
host = list; host = list;
table = malloc(sizeof(struct rta_host **) * (argc - 1)); table = malloc(sizeof(struct rta_host **) * targets);
i = 0; i = 0;
while(host) { while(host) {
host->id = i*packets; host->id = i*packets;

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.

View file

@ -239,7 +239,7 @@ if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) {
$answer = "Result from smbclient not suitable\n"; $answer = "Result from smbclient not suitable\n";
$state = "UNKNOWN"; $state = "UNKNOWN";
foreach (@lines) { foreach (@lines) {
if (/(Access denied|NT_STATUS_LOGON_FAILURE)/) { if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) {
$answer = "Access Denied\n"; $answer = "Access Denied\n";
$state = "CRITICAL"; $state = "CRITICAL";
last; last;

View file

@ -10,7 +10,7 @@ REVISION="@NP_VERSION@"
print_usage() { print_usage() {
echo "Usage: $PROGNAME" echo "Usage: $PROGNAME" [--ignore-fault]
} }
print_help() { print_help() {
@ -21,25 +21,25 @@ print_help() {
echo "This plugin checks hardware status using the lm_sensors package." echo "This plugin checks hardware status using the lm_sensors package."
echo "" echo ""
support support
exit 0 exit $STATE_OK
} }
case "$1" in case "$1" in
--help) --help)
print_help print_help
exit 0 exit $STATE_OK
;; ;;
-h) -h)
print_help print_help
exit 0 exit $STATE_OK
;; ;;
--version) --version)
print_revision $PROGNAME $REVISION print_revision $PROGNAME $REVISION
exit 0 exit $STATE_OK
;; ;;
-V) -V)
print_revision $PROGNAME $REVISION print_revision $PROGNAME $REVISION
exit 0 exit $STATE_OK
;; ;;
*) *)
sensordata=`sensors 2>&1` sensordata=`sensors 2>&1`
@ -49,17 +49,20 @@ case "$1" in
fi fi
if test ${status} -eq 127; then if test ${status} -eq 127; then
echo "SENSORS UNKNOWN - command not found (did you install lmsensors?)" echo "SENSORS UNKNOWN - command not found (did you install lmsensors?)"
exit -1 exit $STATE_UNKNOWN
elif test ${status} -ne 0; then elif test ${status} -ne 0; then
echo "WARNING - sensors returned state $status" echo "WARNING - sensors returned state $status"
exit 1 exit $STATE_WARNING
fi fi
if echo ${sensordata} | egrep ALARM > /dev/null; then if echo ${sensordata} | egrep ALARM > /dev/null; then
echo SENSOR CRITICAL - Sensor alarm detected! echo SENSOR CRITICAL - Sensor alarm detected!
exit 2 exit $STATE_CRITICAL
else elif echo ${sensordata} | egrep FAULT > /dev/null \
echo sensor ok && test "$1" != "-i" -a "$1" != "--ignore-fault"; then
exit 0 echo SENSOR UNKNOWN - Sensor reported fault
exit $STATE_UNKNOWN
fi fi
echo sensor ok
exit $STATE_OK
;; ;;
esac esac

View file

@ -0,0 +1,96 @@
#! /usr/bin/perl -w -I ..
#
# test cases for check_disk_smb
#
use strict;
use Test::More;
use NPTest;
my $tests = 14;
plan tests => $tests;
my $res;
my $plugin = "check_disk_smb";
SKIP: {
skip "$plugin is not created", $tests if ( ! -x $plugin );
my $auth = "";
my $host = getTestParameter("NP_HOST_SMB", "A host providing an SMB Service",
"localhost");
my $smb_share = getTestParameter("NP_SMB_SHARE",
"An SMB share name the host provides",
"public");
my $smb_share_spc = getTestParameter("NP_SMB_SHARE_SPC",
"An SMB share name containing one or more spaces the host provides",
"pub lic");
my $smb_share_deny = getTestParameter("NP_SMB_SHARE_DENY",
"An access denying SMB share name the host provides",
"private");
my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
"The hostname of system not responsive to network requests", "10.0.0.1" );
my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
"An invalid (not known to DNS) hostname",
"nosuchhost" );
my $user = getTestParameter( "NP_SMB_VALID_USER", "A valid smb user", "" );
my $pass = getTestParameter( "NP_SMB_VALID_USER_PASS", "A valid password for valid smb user", "" );
$auth .= "-u $user " if ($user);
$auth .= "-p $pass " if ($pass);
$res = NPTest->testCmd( "./$plugin" );
is( $res->return_code, 3, "No arguments" );
$res = NPTest->testCmd( "./$plugin -H fakehostname" );
is( $res->return_code, 3, "No share specified" );
$res = NPTest->testCmd( "./$plugin -H fakehostname -s share -w 100G -c 101G" );
is( $res->return_code, 3, "warn is less than critical" );
SKIP: {
skip "no smb host defined", 6 if ( ! $host );
SKIP: {
skip "no share name defined", 2 if ( ! $smb_share );
$res = NPTest->testCmd( "./$plugin -H $host $auth -s $smb_share -w 2k -c 1k" );
cmp_ok( $res->return_code, '==', 0, "Exit OK if $smb_share has > 1k free space");
like($res->output, '/free/i', "String contains the word 'free'");
$res = NPTest->testCmd( "./$plugin -H $host $auth -s $smb_share -w 10001G -c 10000G" );
cmp_ok( $res->return_code, '==', 2, "Exit CRIT if $smb_share has < 10000G free space");
like($res->output, '/free/i', "String contains the word 'free'");
$res = NPTest->testCmd( "./$plugin -H $host $auth -s $smb_share -w 10000G -c 1k" );
cmp_ok( $res->return_code, '==', 1, "Exit WARN if $smb_share has > 10000G and <1k free space");
like($res->output, '/free/i', "String contains the word 'free'");
}
SKIP: {
skip "no share name containing spaces defined", 2 if ( ! $smb_share_spc );
$res = NPTest->testCmd( "./$plugin -H $host $auth -s '$smb_share_spc' -w 2k -c 1k" );
cmp_ok( $res->return_code, '==', 0, "Exit OK if '$smb_share_spc' has > 1k free space");
like($res->output, '/free/i', "String contains the word 'free'");
}
SKIP: {
skip "no share name without permissions ", 2 if ( ! $smb_share_deny );
$res = NPTest->testCmd( "./$plugin -H $host $auth -s $smb_share_deny -w 2k -c 1k" );
cmp_ok( $res->return_code, '==', 2, "Exit CRIT if $smb_share_deny has > 1k free space");
unlike($res->output, '/free/i', "String does not contain the word 'free'");
}
}
SKIP: {
skip "no non responsive host defined", 1 if ( ! $host_nonresponsive );
$res = NPTest->testCmd( "./$plugin -H $host_nonresponsive -s np_foobar ");
cmp_ok( $res->return_code, '==', 3, "Exit UNKNOWN with non responsive host" );
}
}

View file

@ -21,3 +21,88 @@ support() {
$ECHO "@SUPPORT@" | sed -e 's/\n/ /g' $ECHO "@SUPPORT@" | sed -e 's/\n/ /g'
} }
#
# check_range takes a value and a range string, returning successfully if an
# alert should be raised based on the range.
#
check_range() {
local v range yes no err decimal start end cmp match
v="$1"
range="$2"
# whether to raise an alert or not
yes=0
no=1
err=2
# regex to match a decimal number
decimal="-?([0-9]+\.?[0-9]*|[0-9]*\.[0-9]+)"
# compare numbers (including decimals), returning true/false
cmp() { awk "BEGIN{ if ($1) exit(0); exit(1)}"; }
# returns successfully if the string in the first argument matches the
# regex in the second
match() { echo "$1" | grep -E -q -- "$2"; }
# make sure value is valid
if ! match "$v" "^$decimal$"; then
echo "${0##*/}: check_range: invalid value" >&2
unset -f cmp match
return "$err"
fi
# make sure range is valid
if ! match "$range" "^@?(~|$decimal)(:($decimal)?)?$"; then
echo "${0##*/}: check_range: invalid range" >&2
unset -f cmp match
return "$err"
fi
# check for leading @ char, which negates the range
if match $range '^@'; then
range=${range#@}
yes=1
no=0
fi
# parse the range string
if ! match "$range" ':'; then
start=0
end="$range"
else
start="${range%%:*}"
end="${range#*:}"
fi
# do the comparison, taking positive ("") and negative infinity ("~")
# into account
if [ "$start" != "~" ] && [ "$end" != "" ]; then
if cmp "$start <= $v" && cmp "$v <= $end"; then
unset -f cmp match
return "$no"
else
unset -f cmp match
return "$yes"
fi
elif [ "$start" != "~" ] && [ "$end" = "" ]; then
if cmp "$start <= $v"; then
unset -f cmp match
return "$no"
else
unset -f cmp match
return "$yes"
fi
elif [ "$start" = "~" ] && [ "$end" != "" ]; then
if cmp "$v <= $end"; then
unset -f cmp match
return "$no"
else
unset -f cmp match
return "$yes"
fi
else
unset -f cmp match
return "$no"
fi
}

View file

@ -101,7 +101,7 @@ check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS)
check_time_LDADD = $(NETLIBS) check_time_LDADD = $(NETLIBS)
check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS) check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS)
check_ups_LDADD = $(NETLIBS) check_ups_LDADD = $(NETLIBS)
check_users_LDADD = $(BASEOBJS) popen.o check_users_LDADD = $(BASEOBJS)
check_by_ssh_LDADD = $(NETLIBS) check_by_ssh_LDADD = $(NETLIBS)
check_ide_smart_LDADD = $(BASEOBJS) check_ide_smart_LDADD = $(BASEOBJS)
negate_LDADD = $(BASEOBJS) negate_LDADD = $(BASEOBJS)

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -239,7 +239,7 @@ negate_SOURCES = negate.c
negate_OBJECTS = negate.$(OBJEXT) negate_OBJECTS = negate.$(OBJEXT)
urlize_SOURCES = urlize.c urlize_SOURCES = urlize.c
urlize_OBJECTS = urlize.$(OBJEXT) urlize_OBJECTS = urlize.$(OBJEXT)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1159,7 +1159,7 @@ check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS)
check_time_LDADD = $(NETLIBS) check_time_LDADD = $(NETLIBS)
check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS) check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS)
check_ups_LDADD = $(NETLIBS) check_ups_LDADD = $(NETLIBS)
check_users_LDADD = $(BASEOBJS) popen.o check_users_LDADD = $(BASEOBJS)
check_by_ssh_LDADD = $(NETLIBS) check_by_ssh_LDADD = $(NETLIBS)
check_ide_smart_LDADD = $(BASEOBJS) check_ide_smart_LDADD = $(BASEOBJS)
negate_LDADD = $(BASEOBJS) negate_LDADD = $(BASEOBJS)
@ -1246,8 +1246,8 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS)
|| test -f $$p1 \ || test -f $$p1 \
; then \ ; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
else :; fi; \ else :; fi; \
done done
@ -1493,8 +1493,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1506,8 +1506,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1517,13 +1517,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique

View file

@ -187,6 +187,7 @@ process_arguments (int argc, char **argv)
{"use-ipv6", no_argument, 0, '6'}, {"use-ipv6", no_argument, 0, '6'},
{"ssh-option", required_argument, 0, 'o'}, {"ssh-option", required_argument, 0, 'o'},
{"quiet", no_argument, 0, 'q'}, {"quiet", no_argument, 0, 'q'},
{"configfile", optional_argument, 0, 'F'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
@ -198,7 +199,7 @@ process_arguments (int argc, char **argv)
strcpy (argv[c], "-t"); strcpy (argv[c], "-t");
while (1) { while (1) {
c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:", longopts, c = getopt_long (argc, argv, "Vvh1246fqt:H:O:p:i:u:l:C:S::E::n:s:o:F:", longopts,
&option); &option);
if (c == -1 || c == EOF) if (c == -1 || c == EOF)
@ -306,6 +307,10 @@ process_arguments (int argc, char **argv)
case 'q': /* Tell the ssh command to be quiet */ case 'q': /* Tell the ssh command to be quiet */
comm_append("-q"); comm_append("-q");
break; break;
case 'F': /* ssh configfile */
comm_append("-F");
comm_append(optarg);
break;
default: /* help */ default: /* help */
usage5(); usage5();
} }
@ -418,6 +423,8 @@ print_help (void)
printf (" %s\n", _("short name of host in nagios configuration [optional]")); printf (" %s\n", _("short name of host in nagios configuration [optional]"));
printf (" %s\n","-o, --ssh-option=OPTION"); printf (" %s\n","-o, --ssh-option=OPTION");
printf (" %s\n", _("Call ssh with '-o OPTION' (may be used multiple times) [optional]")); printf (" %s\n", _("Call ssh with '-o OPTION' (may be used multiple times) [optional]"));
printf (" %s\n","-F, --configfile");
printf (" %s\n", _("Tell ssh to use this configfile [optional]"));
printf (" %s\n","-q, --quiet"); printf (" %s\n","-q, --quiet");
printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]")); printf (" %s\n", _("Tell ssh to suppress warning and diagnostic messages [optional]"));
printf (UT_WARN_CRIT); printf (UT_WARN_CRIT);
@ -454,6 +461,6 @@ print_usage (void)
printf (" %s -H <host> -C <command> [-fqv] [-1|-2] [-4|-6]\n" printf (" %s -H <host> -C <command> [-fqv] [-1|-2] [-4|-6]\n"
" [-S [lines]] [-E [lines]] [-t timeout] [-i identity]\n" " [-S [lines]] [-E [lines]] [-t timeout] [-i identity]\n"
" [-l user] [-n name] [-s servicelist] [-O outputfile]\n" " [-l user] [-n name] [-s servicelist] [-O outputfile]\n"
" [-p port] [-o ssh-option]\n", " [-p port] [-o ssh-option] [-F configfile]\n",
progname); progname);
} }

View file

@ -122,6 +122,8 @@ void print_help (void);
void print_usage (void); void print_usage (void);
double calculate_percent(uintmax_t, uintmax_t); double calculate_percent(uintmax_t, uintmax_t);
void stat_path (struct parameter_list *p); void stat_path (struct parameter_list *p);
void get_stats (struct parameter_list *p, struct fs_usage *fsp);
void get_path_stats (struct parameter_list *p, struct fs_usage *fsp);
double w_dfp = -1.0; double w_dfp = -1.0;
double c_dfp = -1.0; double c_dfp = -1.0;
@ -148,6 +150,7 @@ char *crit_freeinodes_percent = NULL;
int path_selected = FALSE; int path_selected = FALSE;
char *group = NULL; char *group = NULL;
struct stat *stat_buf; struct stat *stat_buf;
struct name_list *seen = NULL;
int int
@ -160,10 +163,6 @@ main (int argc, char **argv)
char *perf; char *perf;
char *preamble; char *preamble;
double inode_space_pct; double inode_space_pct;
uintmax_t total, available, available_to_root, used;
double dfree_pct = -1, dused_pct = -1;
double dused_units, dfree_units, dtotal_units;
double dused_inodes_percent, dfree_inodes_percent;
double warning_high_tide; double warning_high_tide;
double critical_high_tide; double critical_high_tide;
int temp_result; int temp_result;
@ -171,7 +170,6 @@ main (int argc, char **argv)
struct mount_entry *me; struct mount_entry *me;
struct fs_usage fsp, tmpfsp; struct fs_usage fsp, tmpfsp;
struct parameter_list *temp_list, *path; struct parameter_list *temp_list, *path;
struct name_list *seen = NULL;
preamble = strdup (" - free space:"); preamble = strdup (" - free space:");
output = strdup (""); output = strdup ("");
@ -237,45 +235,8 @@ main (int argc, char **argv)
/* Remove filesystems already seen */ /* Remove filesystems already seen */
if (np_seen_name(seen, me->me_mountdir)) { if (np_seen_name(seen, me->me_mountdir)) {
continue; continue;
} else {
if (path->group != NULL) {
/* find all group members */
fsp.fsu_blocksize = 0;
fsp.fsu_blocks = 0;
fsp.fsu_bfree = 0;
fsp.fsu_bavail = 0;
fsp.fsu_files = 0;
fsp.fsu_ffree = 0;
for (temp_list = path_select_list; temp_list; temp_list=temp_list->name_next) {
if (temp_list->group && ! (strcmp(temp_list->group, path->group))) {
stat_path(path);
get_fs_usage (temp_list->best_match->me_mountdir, temp_list->best_match->me_devname, &tmpfsp);
/* possibly differing blocksizes if disks are grouped. Calculating average */
fsp.fsu_blocksize = (fsp.fsu_blocksize * fsp.fsu_blocks + tmpfsp.fsu_blocksize * tmpfsp.fsu_blocks) / \
(fsp.fsu_blocks + tmpfsp.fsu_blocks); /* Size of a block. */
fsp.fsu_blocks += tmpfsp.fsu_blocks; /* Total blocks. */
fsp.fsu_bfree += tmpfsp.fsu_bfree; /* Free blocks available to superuser. */
/* Gnulib workaround - see comment about it a few lines below */
fsp.fsu_bavail += (tmpfsp.fsu_bavail > tmpfsp.fsu_bfree ? 0 : tmpfsp.fsu_bavail); /* Free blocks available to non-superuser. */
fsp.fsu_files += tmpfsp.fsu_files; /* Total file nodes. */
fsp.fsu_ffree += tmpfsp.fsu_ffree; /* Free file nodes. */
if (verbose >= 3)
printf("Group %s: add %llu blocks (%s) \n", path->group, tmpfsp.fsu_bavail, temp_list->name);
/* printf("Group %s: add %u blocks (%s)\n", temp_list->name); *//* path->group, tmpfsp.fsu_bavail, temp_list->name); */
np_add_name(&seen, temp_list->best_match->me_mountdir);
} }
}
/* modify devname and mountdir for output */
me->me_mountdir = me->me_devname = path->group;
} else
np_add_name(&seen, me->me_mountdir); np_add_name(&seen, me->me_mountdir);
}
if (path->group == NULL) { if (path->group == NULL) {
/* Skip remote filesystems if we're not interested in them */ /* Skip remote filesystems if we're not interested in them */
@ -301,55 +262,36 @@ main (int argc, char **argv)
} }
if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) { if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
total = fsp.fsu_blocks; get_stats (path, &fsp);
/* 2007-12-08 - Workaround for Gnulib reporting insanely high available
* space on BSD (the actual value should be negative but fsp.fsu_bavail
* is unsigned) */
available = fsp.fsu_bavail > fsp.fsu_bfree ? 0 : fsp.fsu_bavail;
available_to_root = fsp.fsu_bfree;
used = total - available_to_root;
if (verbose >= 3)
printf ("For %s, total=%llu, available=%llu, available_to_root=%llu, used=%llu, fsp.fsu_files=%llu, fsp.fsu_ffree=%llu\n",
me->me_mountdir, total, available, available_to_root, used, fsp.fsu_files, fsp.fsu_ffree);
dused_pct = calculate_percent( used, used + available ); /* used + available can never be > uintmax */
dfree_pct = 100 - dused_pct;
dused_units = used*fsp.fsu_blocksize/mult;
dfree_units = available*fsp.fsu_blocksize/mult;
dtotal_units = total*fsp.fsu_blocksize/mult;
dused_inodes_percent = calculate_percent(fsp.fsu_files - fsp.fsu_ffree, fsp.fsu_files);
dfree_inodes_percent = 100 - dused_inodes_percent;
if (verbose >= 3) { if (verbose >= 3) {
printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%llu mult=%llu\n", printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%llu mult=%llu\n",
me->me_mountdir, dused_pct, dfree_pct, dused_units, dfree_units, dtotal_units, dused_inodes_percent, dfree_inodes_percent, fsp.fsu_blocksize, mult); me->me_mountdir, path->dused_pct, path->dfree_pct, path->dused_units, path->dfree_units, path->dtotal_units, path->dused_inodes_percent, path->dfree_inodes_percent, fsp.fsu_blocksize, mult);
} }
/* Threshold comparisons */ /* Threshold comparisons */
temp_result = get_status(dfree_units, path->freespace_units); temp_result = get_status(path->dfree_units, path->freespace_units);
if (verbose >=3) printf("Freespace_units result=%d\n", temp_result); if (verbose >=3) printf("Freespace_units result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
temp_result = get_status(dfree_pct, path->freespace_percent); temp_result = get_status(path->dfree_pct, path->freespace_percent);
if (verbose >=3) printf("Freespace%% result=%d\n", temp_result); if (verbose >=3) printf("Freespace%% result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
temp_result = get_status(dused_units, path->usedspace_units); temp_result = get_status(path->dused_units, path->usedspace_units);
if (verbose >=3) printf("Usedspace_units result=%d\n", temp_result); if (verbose >=3) printf("Usedspace_units result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
temp_result = get_status(dused_pct, path->usedspace_percent); temp_result = get_status(path->dused_pct, path->usedspace_percent);
if (verbose >=3) printf("Usedspace_percent result=%d\n", temp_result); if (verbose >=3) printf("Usedspace_percent result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
temp_result = get_status(dused_inodes_percent, path->usedinodes_percent); temp_result = get_status(path->dused_inodes_percent, path->usedinodes_percent);
if (verbose >=3) printf("Usedinodes_percent result=%d\n", temp_result); if (verbose >=3) printf("Usedinodes_percent result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
temp_result = get_status(dfree_inodes_percent, path->freeinodes_percent); temp_result = get_status(path->dfree_inodes_percent, path->freeinodes_percent);
if (verbose >=3) printf("Freeinodes_percent result=%d\n", temp_result); if (verbose >=3) printf("Freeinodes_percent result=%d\n", temp_result);
disk_result = max_state( disk_result, temp_result ); disk_result = max_state( disk_result, temp_result );
@ -365,26 +307,26 @@ main (int argc, char **argv)
critical_high_tide = UINT_MAX; critical_high_tide = UINT_MAX;
if (path->freespace_units->warning != NULL) { if (path->freespace_units->warning != NULL) {
warning_high_tide = dtotal_units - path->freespace_units->warning->end; warning_high_tide = path->dtotal_units - path->freespace_units->warning->end;
} }
if (path->freespace_percent->warning != NULL) { if (path->freespace_percent->warning != NULL) {
warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*dtotal_units )); warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*path->dtotal_units ));
} }
if (path->freespace_units->critical != NULL) { if (path->freespace_units->critical != NULL) {
critical_high_tide = dtotal_units - path->freespace_units->critical->end; critical_high_tide = path->dtotal_units - path->freespace_units->critical->end;
} }
if (path->freespace_percent->critical != NULL) { if (path->freespace_percent->critical != NULL) {
critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*dtotal_units )); critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*path->dtotal_units ));
} }
/* Nb: *_high_tide are unset when == UINT_MAX */ /* Nb: *_high_tide are unset when == UINT_MAX */
asprintf (&perf, "%s %s", perf, asprintf (&perf, "%s %s", perf,
perfdata ((!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir, perfdata ((!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
dused_units, units, path->dused_units, units,
(warning_high_tide != UINT_MAX ? TRUE : FALSE), warning_high_tide, (warning_high_tide != UINT_MAX ? TRUE : FALSE), warning_high_tide,
(critical_high_tide != UINT_MAX ? TRUE : FALSE), critical_high_tide, (critical_high_tide != UINT_MAX ? TRUE : FALSE), critical_high_tide,
TRUE, 0, TRUE, 0,
TRUE, dtotal_units)); TRUE, path->dtotal_units));
if (disk_result==STATE_OK && erronly && !verbose) if (disk_result==STATE_OK && erronly && !verbose)
continue; continue;
@ -392,13 +334,13 @@ main (int argc, char **argv)
asprintf (&output, "%s %s %.0f %s (%.0f%%", asprintf (&output, "%s %s %.0f %s (%.0f%%",
output, output,
(!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir, (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir,
dfree_units, path->dfree_units,
units, units,
dfree_pct); path->dfree_pct);
if (dused_inodes_percent < 0) { if (path->dused_inodes_percent < 0) {
asprintf(&output, "%s inode=-);", output); asprintf(&output, "%s inode=-);", output);
} else { } else {
asprintf(&output, "%s inode=%.0f%%);", output, dfree_inodes_percent ); asprintf(&output, "%s inode=%.0f%%);", output, path->dfree_inodes_percent );
} }
/* TODO: Need to do a similar debug line /* TODO: Need to do a similar debug line
@ -996,3 +938,74 @@ stat_path (struct parameter_list *p)
die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno)); die (STATE_CRITICAL, _("%s %s: %s\n"), p->name, _("is not accessible"), strerror(errno));
} }
} }
void
get_stats (struct parameter_list *p, struct fs_usage *fsp) {
struct parameter_list *p_list;
struct fs_usage tmpfsp;
int first = 1;
if (p->group == NULL) {
get_path_stats(p,fsp);
} else {
/* find all group members */
for (p_list = path_select_list; p_list; p_list=p_list->name_next) {
if (p_list->group && ! (strcmp(p_list->group, p->group))) {
stat_path(p_list);
get_fs_usage (p_list->best_match->me_mountdir, p_list->best_match->me_devname, &tmpfsp);
get_path_stats(p_list, &tmpfsp);
if (verbose >= 3)
printf("Group %s: adding %llu blocks sized %llu, (%s) used_units=%g free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
p_list->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, p_list->best_match->me_mountdir, p_list->dused_units, p_list->dfree_units,
p_list->dtotal_units, mult);
/* prevent counting the first FS of a group twice since its parameter_list entry
* is used to carry the information of all file systems of the entire group */
if (! first) {
p->total += p_list->total;
p->available += p_list->available;
p->available_to_root += p_list->available_to_root;
p->used += p_list->used;
p->dused_units += p_list->dused_units;
p->dfree_units += p_list->dfree_units;
p->dtotal_units += p_list->dtotal_units;
p->inodes_total += p_list->inodes_total;
p->inodes_free += p_list->inodes_free;
}
first = 0;
}
if (verbose >= 3)
printf("Group %s now has: used_units=%g free_units=%g total_units=%g fsu_blocksize=%llu mult=%llu\n",
p->group, tmpfsp.fsu_bavail, tmpfsp.fsu_blocksize, p->best_match->me_mountdir, p->dused_units,
p->dfree_units, p->dtotal_units, mult);
}
/* modify devname and mountdir for output */
p->best_match->me_mountdir = p->best_match->me_devname = p->group;
}
/* finally calculate percentages for either plain FS or summed up group */
p->dused_pct = calculate_percent( p->used, p->used + p->available ); /* used + available can never be > uintmax */
p->dfree_pct = 100 - p->dused_pct;
p->dused_inodes_percent = calculate_percent(p->inodes_total - p->inodes_free, p->inodes_total);
p->dfree_inodes_percent = 100 - p->dused_inodes_percent;
}
void
get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
p->total = fsp->fsu_blocks;
/* 2007-12-08 - Workaround for Gnulib reporting insanely high available
* space on BSD (the actual value should be negative but fsp->fsu_bavail
* is unsigned) */
p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
p->available_to_root = fsp->fsu_bfree;
p->used = p->total - p->available_to_root;
p->dused_units = p->used*fsp->fsu_blocksize/mult;
p->dfree_units = p->available*fsp->fsu_blocksize/mult;
p->dtotal_units = p->total*fsp->fsu_blocksize/mult;
p->inodes_total = fsp->fsu_files; /* Total file nodes. */
p->inodes_free = fsp->fsu_ffree; /* Free file nodes. */
np_add_name(&seen, p->best_match->me_mountdir);
}

View file

@ -34,7 +34,7 @@
/* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */ /* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */
const char *progname = "check_http"; const char *progname = "check_http";
const char *copyright = "1999-2008"; const char *copyright = "1999-2011";
const char *email = "nagiosplug-devel@lists.sourceforge.net"; const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h" #include "common.h"
@ -59,6 +59,7 @@ enum {
#ifdef HAVE_SSL #ifdef HAVE_SSL
int check_cert = FALSE; int check_cert = FALSE;
int days_till_exp; int days_till_exp;
int ssl_version;
char *randbuff; char *randbuff;
X509 *server_cert; X509 *server_cert;
# define my_recv(buf, len) ((use_ssl) ? np_net_ssl_read(buf, len) : read(sd, buf, len)) # define my_recv(buf, len) ((use_ssl) ? np_net_ssl_read(buf, len) : read(sd, buf, len))
@ -101,10 +102,9 @@ int server_expect_yn = 0;
char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT; char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT;
char string_expect[MAX_INPUT_BUFFER] = ""; char string_expect[MAX_INPUT_BUFFER] = "";
char output_string_search[30] = ""; char output_string_search[30] = "";
double warning_time = 0; char *warning_thresholds = NULL;
int check_warning_time = FALSE; char *critical_thresholds = NULL;
double critical_time = 0; thresholds *thlds;
int check_critical_time = FALSE;
char user_auth[MAX_INPUT_BUFFER] = ""; char user_auth[MAX_INPUT_BUFFER] = "";
char proxy_auth[MAX_INPUT_BUFFER] = ""; char proxy_auth[MAX_INPUT_BUFFER] = "";
int display_html = FALSE; int display_html = FALSE;
@ -189,7 +189,7 @@ process_arguments (int argc, char **argv)
STD_LONG_OPTS, STD_LONG_OPTS,
{"link", no_argument, 0, 'L'}, {"link", no_argument, 0, 'L'},
{"nohtml", no_argument, 0, 'n'}, {"nohtml", no_argument, 0, 'n'},
{"ssl", no_argument, 0, 'S'}, {"ssl", optional_argument, 0, 'S'},
{"sni", no_argument, 0, SNI_OPTION}, {"sni", no_argument, 0, SNI_OPTION},
{"post", required_argument, 0, 'P'}, {"post", required_argument, 0, 'P'},
{"method", required_argument, 0, 'j'}, {"method", required_argument, 0, 'j'},
@ -235,7 +235,7 @@ process_arguments (int argc, char **argv)
} }
while (1) { while (1) {
c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:e:p:s:R:r:u:f:C:nlLSm:M:N", longopts, &option); c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:e:p:s:R:r:u:f:C:nlLS::m:M:N", longopts, &option);
if (c == -1 || c == EOF) if (c == -1 || c == EOF)
break; break;
@ -258,20 +258,10 @@ process_arguments (int argc, char **argv)
socket_timeout = atoi (optarg); socket_timeout = atoi (optarg);
break; break;
case 'c': /* critical time threshold */ case 'c': /* critical time threshold */
if (!is_nonnegative (optarg)) critical_thresholds = optarg;
usage2 (_("Critical threshold must be integer"), optarg);
else {
critical_time = strtod (optarg, NULL);
check_critical_time = TRUE;
}
break; break;
case 'w': /* warning time threshold */ case 'w': /* warning time threshold */
if (!is_nonnegative (optarg)) warning_thresholds = optarg;
usage2 (_("Warning threshold must be integer"), optarg);
else {
warning_time = strtod (optarg, NULL);
check_warning_time = TRUE;
}
break; break;
case 'A': /* User Agent String */ case 'A': /* User Agent String */
asprintf (&user_agent, "User-Agent: %s", optarg); asprintf (&user_agent, "User-Agent: %s", optarg);
@ -305,6 +295,13 @@ process_arguments (int argc, char **argv)
usage4 (_("Invalid option - SSL is not available")); usage4 (_("Invalid option - SSL is not available"));
#endif #endif
use_ssl = TRUE; use_ssl = TRUE;
if (optarg == NULL || c != 'S')
ssl_version = 0;
else {
ssl_version = atoi(optarg);
if (ssl_version < 1 || ssl_version > 3)
usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)"));
}
if (specify_port == FALSE) if (specify_port == FALSE)
server_port = HTTPS_PORT; server_port = HTTPS_PORT;
break; break;
@ -478,8 +475,10 @@ process_arguments (int argc, char **argv)
server_address = strdup (host_name); server_address = strdup (host_name);
} }
if (check_critical_time && critical_time>(double)socket_timeout) set_thresholds(&thlds, warning_thresholds, critical_thresholds);
socket_timeout = (int)critical_time + 1;
if (critical_thresholds && thlds->critical->end>(double)socket_timeout)
socket_timeout = (int)thlds->critical->end + 1;
if (http_method == NULL) if (http_method == NULL)
http_method = strdup ("GET"); http_method = strdup ("GET");
@ -807,7 +806,9 @@ check_http (void)
die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n")); die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n"));
#ifdef HAVE_SSL #ifdef HAVE_SSL
if (use_ssl == TRUE) { if (use_ssl == TRUE) {
np_net_ssl_init_with_hostname(sd, (use_sni ? host_name : NULL)); result = np_net_ssl_init_with_hostname_and_version(sd, (use_sni ? host_name : NULL), ssl_version);
if (result != STATE_OK)
return result;
if (check_cert == TRUE) { if (check_cert == TRUE) {
result = np_net_ssl_check_cert(days_till_exp); result = np_net_ssl_check_cert(days_till_exp);
np_net_ssl_cleanup(); np_net_ssl_cleanup();
@ -1099,10 +1100,7 @@ check_http (void)
(display_html ? "</A>" : ""), (display_html ? "</A>" : ""),
perfd_time (elapsed_time), perfd_size (page_len)); perfd_time (elapsed_time), perfd_size (page_len));
if (check_critical_time == TRUE && elapsed_time > critical_time) result = max_state_alt(get_status(elapsed_time, thlds), result);
result = STATE_CRITICAL;
if (check_warning_time == TRUE && elapsed_time > warning_time)
result = max_state_alt(STATE_WARNING, result);
die (result, "HTTP %s: %s\n", state_text(result), msg); die (result, "HTTP %s: %s\n", state_text(result), msg);
/* die failed? */ /* die failed? */
@ -1284,8 +1282,8 @@ server_port_check (int ssl_flag)
char *perfd_time (double elapsed_time) char *perfd_time (double elapsed_time)
{ {
return fperfdata ("time", elapsed_time, "s", return fperfdata ("time", elapsed_time, "s",
check_warning_time, warning_time, thlds->warning?TRUE:FALSE, thlds->warning?thlds->warning->end:0,
check_critical_time, critical_time, thlds->critical?TRUE:FALSE, thlds->critical?thlds->critical->end:0,
TRUE, 0, FALSE, 0); TRUE, 0, FALSE, 0);
} }
@ -1335,8 +1333,9 @@ print_help (void)
printf (UT_IPv46); printf (UT_IPv46);
#ifdef HAVE_SSL #ifdef HAVE_SSL
printf (" %s\n", "-S, --ssl"); printf (" %s\n", "-S, --ssl=VERSION");
printf (" %s\n", _("Connect via SSL. Port defaults to 443")); printf (" %s\n", _("Connect via SSL. Port defaults to 443. VERSION is optional, and prevents"));
printf (" %s\n", _("auto-negotiation (1 = TLSv1, 2 = SSLv2, 3 = SSLv3)."));
printf (" %s\n", "--sni"); printf (" %s\n", "--sni");
printf (" %s\n", _("Enable SSL/TLS hostname extension support (SNI)")); printf (" %s\n", _("Enable SSL/TLS hostname extension support (SNI)"));
printf (" %s\n", "-C, --certificate=INTEGER"); printf (" %s\n", "-C, --certificate=INTEGER");
@ -1387,7 +1386,7 @@ print_help (void)
printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)")); printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)"));
printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky|stickyport>"); printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky|stickyport>");
printf (" %s\n", _("How to handle redirected pages. sticky is like follow but stick to the")); printf (" %s\n", _("How to handle redirected pages. sticky is like follow but stick to the"));
printf (" %s\n", _("specified IP address. stickyport also ensure post stays the same.")); printf (" %s\n", _("specified IP address. stickyport also ensures port stays the same."));
printf (" %s\n", "-m, --pagesize=INTEGER<:INTEGER>"); printf (" %s\n", "-m, --pagesize=INTEGER<:INTEGER>");
printf (" %s\n", _("Minimum page size required (bytes) : Maximum page size required (bytes)")); printf (" %s\n", _("Minimum page size required (bytes) : Maximum page size required (bytes)"));
@ -1412,6 +1411,10 @@ print_help (void)
printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 ")); printf (" %s\n", _("serve content (optionally within a specified time) or whether the X509 "));
printf (" %s\n", _("certificate is still valid for the specified number of days.")); printf (" %s\n", _("certificate is still valid for the specified number of days."));
printf ("\n"); printf ("\n");
printf (" %s\n", _("Please note that this plugin does not check if the presented server"));
printf (" %s\n", _("certificate matches the hostname of the server, or if the certificate"));
printf (" %s\n", _("has a valid chain of trust to one of the locally installed CAs."));
printf ("\n");
printf ("%s\n", _("Examples:")); printf ("%s\n", _("Examples:"));
printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com"); printf (" %s\n\n", "CHECK CONTENT: check_http -w 5 -c 10 --ssl -H www.verisign.com");
printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,")); printf (" %s\n", _("When the 'www.verisign.com' server returns its content within 5 seconds,"));
@ -1441,6 +1444,6 @@ print_usage (void)
printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n");
printf (" [-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); printf (" [-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
printf (" [-A string] [-k string] [-S] [--sni] [-C <age>] [-T <content-type>]\n"); printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <age>] [-T <content-type>]\n");
printf (" [-j method]\n"); printf (" [-j method]\n");
} }

View file

@ -58,7 +58,7 @@ char *ld_host = NULL;
char *ld_base = NULL; char *ld_base = NULL;
char *ld_passwd = NULL; char *ld_passwd = NULL;
char *ld_binddn = NULL; char *ld_binddn = NULL;
int ld_port = DEFAULT_PORT; int ld_port = -1;
#ifdef HAVE_LDAP_SET_OPTION #ifdef HAVE_LDAP_SET_OPTION
int ld_protocol = DEFAULT_PROTOCOL; int ld_protocol = DEFAULT_PROTOCOL;
#endif #endif
@ -247,7 +247,7 @@ process_arguments (int argc, char **argv)
{"help", no_argument, 0, 'h'}, {"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'}, {"version", no_argument, 0, 'V'},
{"timeout", required_argument, 0, 't'}, {"timeout", required_argument, 0, 't'},
{"host", required_argument, 0, 'H'}, {"hostname", required_argument, 0, 'H'},
{"base", required_argument, 0, 'b'}, {"base", required_argument, 0, 'b'},
{"attr", required_argument, 0, 'a'}, {"attr", required_argument, 0, 'a'},
{"bind", required_argument, 0, 'D'}, {"bind", required_argument, 0, 'D'},
@ -341,6 +341,7 @@ process_arguments (int argc, char **argv)
case 'S': case 'S':
if (! starttls) { if (! starttls) {
ssl_on_connect = TRUE; ssl_on_connect = TRUE;
if (ld_port == -1)
ld_port = LDAPS_PORT; ld_port = LDAPS_PORT;
} else } else
usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls"); usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls");
@ -364,6 +365,9 @@ process_arguments (int argc, char **argv)
if (ld_base == NULL && argv[c]) if (ld_base == NULL && argv[c])
ld_base = strdup (argv[c++]); ld_base = strdup (argv[c++]);
if (ld_port == -1)
ld_port = DEFAULT_PORT;
return validate_arguments (); return validate_arguments ();
} }

View file

@ -203,6 +203,11 @@ int main(int argc, char **argv){
uphours = (uptime % 86400) / 3600; uphours = (uptime % 86400) / 3600;
upminutes = ((uptime % 86400) % 3600) / 60; upminutes = ((uptime % 86400) % 3600) / 60;
asprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes); asprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes);
if (check_critical_value==TRUE && uptime <= critical_value)
return_code=STATE_CRITICAL;
else if (check_warning_value==TRUE && uptime <= warning_value)
return_code=STATE_WARNING;
else
return_code=STATE_OK; return_code=STATE_OK;
break; break;

View file

@ -432,6 +432,7 @@ run_ping (const char *cmd, const char *addr)
{ {
char buf[MAX_INPUT_BUFFER]; char buf[MAX_INPUT_BUFFER];
int result = STATE_UNKNOWN; int result = STATE_UNKNOWN;
int match;
if ((child_process = spopen (cmd)) == NULL) if ((child_process = spopen (cmd)) == NULL)
die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd); die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd);
@ -448,28 +449,29 @@ run_ping (const char *cmd, const char *addr)
result = max_state (result, error_scan (buf, addr)); result = max_state (result, error_scan (buf, addr));
/* get the percent loss statistics */ /* get the percent loss statistics */
if(sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",&pl)==1 || match = 0;
sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d duplicates, %d%% packet loss", &pl) == 1 || if((sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d received, +%*d duplicates, %d%% packet loss", &pl) == 1 || (sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d duplicates, %d%% packet loss%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss",&pl)==1 || (sscanf(buf,"%*d packets transmitted, %*d received, +%*d duplicates, %d%% packet loss%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time",&pl)==1 || (sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time", &pl)==1 || (sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d received, %d%% packet loss, time", &pl)==1 || (sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss", &pl) == 1 || (sscanf(buf,"%*d packets transmitted, %*d received, %d%% packet loss, time%n",&pl,&match) && match) ||
sscanf(buf,"%*d packets transmitted %*d received, +%*d errors, %d%% packet loss", &pl) == 1 (sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
(sscanf(buf,"%*d packets transmitted %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match)
) )
continue; continue;
/* get the round trip average */ /* get the round trip average */
else else
if(sscanf(buf,"round-trip min/avg/max = %*f/%f/%*f",&rta)==1 || if((sscanf(buf,"round-trip min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip min/avg/max/mdev = %*f/%f/%*f/%*f",&rta)==1 || (sscanf(buf,"round-trip min/avg/max/mdev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip min/avg/max/sdev = %*f/%f/%*f/%*f",&rta)==1 || (sscanf(buf,"round-trip min/avg/max/sdev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip min/avg/max/stddev = %*f/%f/%*f/%*f",&rta)==1 || (sscanf(buf,"round-trip min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",&rta)==1 || (sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f",&rta)==1 || (sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"round-trip (ms) min/avg/max/stddev = %*f/%f/%*f/%*f",&rta)==1 || (sscanf(buf,"round-trip (ms) min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",&rta)==1) (sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms%n",&rta,&match) && match))
continue; continue;
} }

View file

@ -318,6 +318,8 @@ process_arguments (int argc, char **argv)
int err; int err;
int cflags = REG_NOSUB | REG_EXTENDED; int cflags = REG_NOSUB | REG_EXTENDED;
char errbuf[MAX_INPUT_BUFFER]; char errbuf[MAX_INPUT_BUFFER];
char *temp_string;
int i=0;
static struct option longopts[] = { static struct option longopts[] = {
{"warning", required_argument, 0, 'w'}, {"warning", required_argument, 0, 'w'},
{"critical", required_argument, 0, 'c'}, {"critical", required_argument, 0, 'c'},
@ -450,7 +452,14 @@ process_arguments (int argc, char **argv)
regerror (err, &re_args, errbuf, MAX_INPUT_BUFFER); regerror (err, &re_args, errbuf, MAX_INPUT_BUFFER);
die (STATE_UNKNOWN, "PROCS %s: %s - %s\n", _("UNKNOWN"), _("Could not compile regular expression"), errbuf); die (STATE_UNKNOWN, "PROCS %s: %s - %s\n", _("UNKNOWN"), _("Could not compile regular expression"), errbuf);
} }
asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), optarg); /* Strip off any | within the regex optarg */
temp_string = strdup(optarg);
while(temp_string[i]!='\0'){
if(temp_string[i]=='|')
temp_string[i]=',';
i++;
}
asprintf (&fmt, "%s%sregex args '%s'", (fmt ? fmt : ""), (options ? ", " : ""), temp_string);
options |= EREG_ARGS; options |= EREG_ARGS;
break; break;
case 'r': /* RSS */ case 'r': /* RSS */

View file

@ -211,7 +211,7 @@ main (int argc, char **argv)
if (result == OK_RC) if (result == OK_RC)
die (STATE_OK, _("Auth OK")); die (STATE_OK, _("Auth OK"));
(void)snprintf(msg, sizeof(msg), _("Unexpected result code %d"), result); (void)snprintf(msg, sizeof(msg), _("Unexpected result code %d"), result);
die (STATE_UNKNOWN, msg); die (STATE_UNKNOWN, "%s", msg);
} }

View file

@ -114,6 +114,7 @@ enum {
TCP_PROTOCOL = 1, TCP_PROTOCOL = 1,
UDP_PROTOCOL = 2, UDP_PROTOCOL = 2,
}; };
int ignore_send_quit_failure = FALSE;
int int
@ -129,6 +130,9 @@ main (int argc, char **argv)
char *error_msg = ""; char *error_msg = "";
struct timeval tv; struct timeval tv;
/* Catch pipe errors in read/write - sometimes occurs when writing QUIT */
(void) signal (SIGPIPE, SIG_IGN);
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR); bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE); textdomain (PACKAGE);
@ -183,7 +187,7 @@ main (int argc, char **argv)
/* return a WARNING status if we couldn't read any data */ /* return a WARNING status if we couldn't read any data */
if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) { if (recvlines(buffer, MAX_INPUT_BUFFER) <= 0) {
printf (_("recv() failed\n")); printf (_("recv() failed\n"));
result = STATE_WARNING; return STATE_WARNING;
} }
else { else {
if (verbose) if (verbose)
@ -197,7 +201,7 @@ main (int argc, char **argv)
else else
printf (_("Invalid SMTP response received from host on port %d: %s\n"), printf (_("Invalid SMTP response received from host on port %d: %s\n"),
server_port, buffer); server_port, buffer);
result = STATE_WARNING; return STATE_WARNING;
} }
} }
@ -272,9 +276,6 @@ main (int argc, char **argv)
# ifdef USE_OPENSSL # ifdef USE_OPENSSL
if ( check_cert ) { if ( check_cert ) {
result = np_net_ssl_check_cert(days_till_exp); result = np_net_ssl_check_cert(days_till_exp);
if(result != STATE_OK){
printf ("%s\n", _("CRITICAL - Cannot retrieve server certificate."));
}
my_close(); my_close();
return result; return result;
} }
@ -476,6 +477,7 @@ process_arguments (int argc, char **argv)
{"help", no_argument, 0, 'h'}, {"help", no_argument, 0, 'h'},
{"starttls",no_argument,0,'S'}, {"starttls",no_argument,0,'S'},
{"certificate",required_argument,0,'D'}, {"certificate",required_argument,0,'D'},
{"ignore-quit-failure",no_argument,0,'q'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
@ -492,7 +494,7 @@ process_arguments (int argc, char **argv)
} }
while (1) { while (1) {
c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:A:U:P:", c = getopt_long (argc, argv, "+hVv46t:p:f:e:c:w:H:C:R:SD:F:A:U:P:q",
longopts, &option); longopts, &option);
if (c == -1 || c == EOF) if (c == -1 || c == EOF)
@ -579,6 +581,9 @@ process_arguments (int argc, char **argv)
case 'v': /* verbose */ case 'v': /* verbose */
verbose++; verbose++;
break; break;
case 'q':
ignore_send_quit_failure++; /* ignore problem sending QUIT */
break;
case 't': /* timeout */ case 't': /* timeout */
if (is_intnonneg (optarg)) { if (is_intnonneg (optarg)) {
socket_timeout = atoi (optarg); socket_timeout = atoi (optarg);
@ -662,8 +667,20 @@ void
smtp_quit(void) smtp_quit(void)
{ {
int bytes; int bytes;
int n;
n = my_send(SMTP_QUIT, strlen(SMTP_QUIT));
if(n < 0) {
if(ignore_send_quit_failure) {
if(verbose) {
printf(_("Connection closed by server before sending QUIT command\n"));
}
return;
}
die (STATE_UNKNOWN,
_("Connection closed by server before sending QUIT command\n"));
}
my_send(SMTP_QUIT, strlen(SMTP_QUIT));
if (verbose) if (verbose)
printf(_("sent %s\n"), "QUIT"); printf(_("sent %s\n"), "QUIT");
@ -797,6 +814,8 @@ print_help (void)
printf (" %s\n", _("SMTP AUTH username")); printf (" %s\n", _("SMTP AUTH username"));
printf (" %s\n", "-P, --authpass=STRING"); printf (" %s\n", "-P, --authpass=STRING");
printf (" %s\n", _("SMTP AUTH password")); printf (" %s\n", _("SMTP AUTH password"));
printf (" %s\n", "-q, --ignore-quit-failure");
printf (" %s\n", _("Ignore failure when sending QUIT command to server"));
printf (UT_WARN_CRIT); printf (UT_WARN_CRIT);
@ -821,6 +840,6 @@ print_usage (void)
printf ("%s\n", _("Usage:")); printf ("%s\n", _("Usage:"));
printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]", progname); printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]", progname);
printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]\n"); printf ("[-A authtype -U authuser -P authpass] [-w warn] [-c crit] [-t timeout]\n");
printf ("[-F fqdn] [-S] [-D days] [-v] [-4|-6]\n"); printf ("[-F fqdn] [-S] [-D days] [-v] [-4|-6] [-q]\n");
} }

View file

@ -169,7 +169,6 @@ main (int argc, char **argv)
char *state_string=NULL; char *state_string=NULL;
size_t response_length, current_length, string_length; size_t response_length, current_length, string_length;
char *temp_string=NULL; char *temp_string=NULL;
int is_numeric=0;
time_t current_time; time_t current_time;
double temp_double; double temp_double;
time_t duration; time_t duration;
@ -335,29 +334,24 @@ main (int argc, char **argv)
/* We strip out the datatype indicator for PHBs */ /* We strip out the datatype indicator for PHBs */
if (strstr (response, "Gauge: ")) { if (strstr (response, "Gauge: ")) {
show = strstr (response, "Gauge: ") + 7; show = strstr (response, "Gauge: ") + 7;
is_numeric++;
} }
else if (strstr (response, "Gauge32: ")) { else if (strstr (response, "Gauge32: ")) {
show = strstr (response, "Gauge32: ") + 9; show = strstr (response, "Gauge32: ") + 9;
is_numeric++;
} }
else if (strstr (response, "Counter32: ")) { else if (strstr (response, "Counter32: ")) {
show = strstr (response, "Counter32: ") + 11; show = strstr (response, "Counter32: ") + 11;
is_numeric++;
is_counter=1; is_counter=1;
if(!calculate_rate) if(!calculate_rate)
strcpy(type, "c"); strcpy(type, "c");
} }
else if (strstr (response, "Counter64: ")) { else if (strstr (response, "Counter64: ")) {
show = strstr (response, "Counter64: ") + 11; show = strstr (response, "Counter64: ") + 11;
is_numeric++;
is_counter=1; is_counter=1;
if(!calculate_rate) if(!calculate_rate)
strcpy(type, "c"); strcpy(type, "c");
} }
else if (strstr (response, "INTEGER: ")) { else if (strstr (response, "INTEGER: ")) {
show = strstr (response, "INTEGER: ") + 9; show = strstr (response, "INTEGER: ") + 9;
is_numeric++;
} }
else if (strstr (response, "STRING: ")) { else if (strstr (response, "STRING: ")) {
show = strstr (response, "STRING: ") + 8; show = strstr (response, "STRING: ") + 8;
@ -396,15 +390,17 @@ main (int argc, char **argv)
} }
} }
else if (strstr (response, "Timeticks: ")) else if (strstr (response, "Timeticks: ")) {
show = strstr (response, "Timeticks: "); show = strstr (response, "Timeticks: ");
}
else else
show = response; show = response;
iresult = STATE_DEPENDENT; iresult = STATE_DEPENDENT;
/* Process this block for numeric comparisons */ /* Process this block for numeric comparisons */
if (is_numeric) { /* Make some special values,like Timeticks numeric only if a threshold is defined */
if (thlds[i]->warning || thlds[i]->critical || calculate_rate) {
ptr = strpbrk (show, "0123456789"); ptr = strpbrk (show, "0123456789");
if (ptr == NULL) if (ptr == NULL)
die (STATE_UNKNOWN,_("No valid data returned")); die (STATE_UNKNOWN,_("No valid data returned"));
@ -744,7 +740,7 @@ process_arguments (int argc, char **argv)
labels[nlabels - 1] = optarg; labels[nlabels - 1] = optarg;
ptr = thisarg (optarg); ptr = thisarg (optarg);
labels[nlabels - 1] = ptr; labels[nlabels - 1] = ptr;
if (strstr (ptr, "'") == ptr) if (ptr[0] == '\'')
labels[nlabels - 1] = ptr + 1; labels[nlabels - 1] = ptr + 1;
while (ptr && (ptr = nextarg (ptr))) { while (ptr && (ptr = nextarg (ptr))) {
if (nlabels >= labels_size) { if (nlabels >= labels_size) {
@ -753,9 +749,9 @@ process_arguments (int argc, char **argv)
if (labels == NULL) if (labels == NULL)
die (STATE_UNKNOWN, _("Could not reallocate labels\n")); die (STATE_UNKNOWN, _("Could not reallocate labels\n"));
} }
labels++; nlabels++;
ptr = thisarg (ptr); ptr = thisarg (ptr);
if (strstr (ptr, "'") == ptr) if (ptr[0] == '\'')
labels[nlabels - 1] = ptr + 1; labels[nlabels - 1] = ptr + 1;
else else
labels[nlabels - 1] = ptr; labels[nlabels - 1] = ptr;
@ -773,7 +769,7 @@ process_arguments (int argc, char **argv)
unitv[nunits - 1] = optarg; unitv[nunits - 1] = optarg;
ptr = thisarg (optarg); ptr = thisarg (optarg);
unitv[nunits - 1] = ptr; unitv[nunits - 1] = ptr;
if (strstr (ptr, "'") == ptr) if (ptr[0] == '\'')
unitv[nunits - 1] = ptr + 1; unitv[nunits - 1] = ptr + 1;
while (ptr && (ptr = nextarg (ptr))) { while (ptr && (ptr = nextarg (ptr))) {
if (nunits >= unitv_size) { if (nunits >= unitv_size) {
@ -784,7 +780,7 @@ process_arguments (int argc, char **argv)
} }
nunits++; nunits++;
ptr = thisarg (ptr); ptr = thisarg (ptr);
if (strstr (ptr, "'") == ptr) if (ptr[0] == '\'')
unitv[nunits - 1] = ptr + 1; unitv[nunits - 1] = ptr + 1;
else else
unitv[nunits - 1] = ptr; unitv[nunits - 1] = ptr;
@ -939,7 +935,7 @@ char *
thisarg (char *str) thisarg (char *str)
{ {
str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ str += strspn (str, " \t\r\n"); /* trim any leading whitespace */
if (strstr (str, "'") == str) { /* handle SIMPLE quoted strings */ if (str[0] == '\'') { /* handle SIMPLE quoted strings */
if (strlen (str) == 1 || !strstr (str + 1, "'")) if (strlen (str) == 1 || !strstr (str + 1, "'"))
die (STATE_UNKNOWN, _("Unbalanced quotes\n")); die (STATE_UNKNOWN, _("Unbalanced quotes\n"));
} }
@ -955,7 +951,7 @@ thisarg (char *str)
char * char *
nextarg (char *str) nextarg (char *str)
{ {
if (strstr (str, "'") == str) { if (str[0] == '\'') {
str[0] = 0; str[0] = 0;
if (strlen (str) > 1) { if (strlen (str) > 1) {
str = strstr (str + 1, "'"); str = strstr (str + 1, "'");
@ -965,7 +961,7 @@ nextarg (char *str)
return NULL; return NULL;
} }
} }
if (strstr (str, ",") == str) { if (str[0] == ',') {
str[0] = 0; str[0] = 0;
if (strlen (str) > 1) { if (strlen (str) > 1) {
return (++str); return (++str);
@ -1076,8 +1072,8 @@ print_help (void)
printf ("\n"); printf ("\n");
printf ("%s\n", _("Notes:")); printf ("%s\n", _("Notes:"));
printf (" %s\n", _("- Multiple OIDs may be indicated by a comma or space-delimited list (lists with")); printf (" %s\n", _("- Multiple OIDs (and labels) may be indicated by a comma or space-delimited "));
printf (" %s %i %s\n", _("internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs.")); printf (" %s %i %s\n", _("list (lists with internal spaces must be quoted). Maximum:"), MAX_OIDS, _("OIDs."));
printf(" -%s", UT_THRESHOLDS_NOTES); printf(" -%s", UT_THRESHOLDS_NOTES);

View file

@ -215,6 +215,10 @@ ssh_connect (char *haddr, int hport, char *remote_version)
char *ssh_proto = NULL; char *ssh_proto = NULL;
char *ssh_server = NULL; char *ssh_server = NULL;
static char *rev_no = VERSION; static char *rev_no = VERSION;
struct timeval tv;
double elapsed_time;
gettimeofday(&tv, NULL);
result = my_tcp_connect (haddr, hport, &sd); result = my_tcp_connect (haddr, hport, &sd);
@ -250,9 +254,12 @@ ssh_connect (char *haddr, int hport, char *remote_version)
exit (STATE_WARNING); exit (STATE_WARNING);
} }
elapsed_time = (double)deltime(tv) / 1.0e6;
printf printf
(_("SSH OK - %s (protocol %s)\n"), (_("SSH OK - %s (protocol %s) | %s\n"),
ssh_server, ssh_proto); ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
close(sd); close(sd);
exit (STATE_OK); exit (STATE_OK);
} }

View file

@ -236,12 +236,9 @@ main (int argc, char **argv)
result = np_net_ssl_init(sd); result = np_net_ssl_init(sd);
if (result == STATE_OK && check_cert == TRUE) { if (result == STATE_OK && check_cert == TRUE) {
result = np_net_ssl_check_cert(days_till_exp); result = np_net_ssl_check_cert(days_till_exp);
if(result != STATE_OK) {
printf(_("CRITICAL - Cannot retrieve server certificate.\n"));
} }
} }
} if(result != STATE_OK || check_cert == TRUE){
if(result != STATE_OK){
np_net_ssl_cleanup(); np_net_ssl_cleanup();
if(sd) close(sd); if(sd) close(sd);
return result; return result;

View file

@ -3,7 +3,7 @@
* Nagios check_users plugin * Nagios check_users plugin
* *
* License: GPL * License: GPL
* Copyright (c) 2000-2007 Nagios Plugins Development Team * Copyright (c) 2000-2012 Nagios Plugins Development Team
* *
* Description: * Description:
* *
@ -35,8 +35,8 @@ const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net"; const char *email = "nagiosplug-devel@lists.sourceforge.net";
#include "common.h" #include "common.h"
#include "popen.h"
#include "utils.h" #include "utils.h"
#include <utmpx.h>
#define possibly_set(a,b) ((a) == 0 ? (b) : 0) #define possibly_set(a,b) ((a) == 0 ? (b) : 0)
@ -52,8 +52,8 @@ main (int argc, char **argv)
{ {
int users = -1; int users = -1;
int result = STATE_UNKNOWN; int result = STATE_UNKNOWN;
char input_buffer[MAX_INPUT_BUFFER];
char *perf; char *perf;
struct utmpx *putmpx;
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR); bindtextdomain (PACKAGE, LOCALEDIR);
@ -67,43 +67,18 @@ main (int argc, char **argv)
if (process_arguments (argc, argv) == ERROR) if (process_arguments (argc, argv) == ERROR)
usage4 (_("Could not parse arguments")); usage4 (_("Could not parse arguments"));
/* run the command */
child_process = spopen (WHO_COMMAND);
if (child_process == NULL) {
printf (_("Could not open pipe: %s\n"), WHO_COMMAND);
return STATE_UNKNOWN;
}
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL)
printf (_("Could not open stderr for %s\n"), WHO_COMMAND);
users = 0; users = 0;
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { /* get currently logged users from utmpx */
setutxent ();
/* increment 'users' on all lines except total user count */ while ((putmpx = getutxent ()) != NULL)
if (input_buffer[0] != '#') { if (putmpx->ut_type == USER_PROCESS)
users++; users++;
continue;
}
/* get total logged in users */ endutxent ();
if (sscanf (input_buffer, _("# users=%d"), &users) == 1)
break;
} /* check the user count against warning and critical thresholds */
/* check STDERR */
if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
result = possibly_set (result, STATE_UNKNOWN);
(void) fclose (child_stderr);
/* close the pipe */
if (spclose (child_process))
result = possibly_set (result, STATE_UNKNOWN);
/* else check the user count against warning and critical thresholds */
if (users > cusers) if (users > cusers)
result = STATE_CRITICAL; result = STATE_CRITICAL;
else if (users > wusers) else if (users > wusers)
@ -126,14 +101,11 @@ main (int argc, char **argv)
return result; return result;
} }
/* process command-line arguments */ /* process command-line arguments */
int int
process_arguments (int argc, char **argv) process_arguments (int argc, char **argv)
{ {
int c; int c;
int option = 0; int option = 0;
static struct option longopts[] = { static struct option longopts[] = {
{"critical", required_argument, 0, 'c'}, {"critical", required_argument, 0, 'c'},
@ -183,7 +155,6 @@ process_arguments (int argc, char **argv)
else else
wusers = atoi (argv[c++]); wusers = atoi (argv[c++]);
} }
if (cusers == -1 && argc > c) { if (cusers == -1 && argc > c) {
if (is_intnonneg (argv[c]) == FALSE) if (is_intnonneg (argv[c]) == FALSE)
usage4 (_("Warning threshold must be a positive integer")); usage4 (_("Warning threshold must be a positive integer"));
@ -194,8 +165,6 @@ process_arguments (int argc, char **argv)
return OK; return OK;
} }
void void
print_help (void) print_help (void)
{ {
@ -222,7 +191,6 @@ print_help (void)
printf (UT_SUPPORT); printf (UT_SUPPORT);
} }
void void
print_usage (void) print_usage (void)
{ {

View file

@ -59,6 +59,12 @@
#include <math.h> #include <math.h>
#endif #endif
#ifdef _AIX
#ifdef HAVE_MP_H
#include <mp.h>
#endif
#endif
#ifdef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H
#include <strings.h> #include <strings.h>
#endif #endif

View file

@ -3,7 +3,7 @@
* Nagios plugins SSL utilities * Nagios plugins SSL utilities
* *
* License: GPL * License: GPL
* Copyright (c) 2005-2007 Nagios Plugins Development Team * Copyright (c) 2005-2010 Nagios Plugins Development Team
* *
* Description: * Description:
* *
@ -26,6 +26,7 @@
* *
*****************************************************************************/ *****************************************************************************/
#define MAX_CN_LENGTH 256
#define LOCAL_TIMEOUT_ALARM_HANDLER #define LOCAL_TIMEOUT_ALARM_HANDLER
#include "common.h" #include "common.h"
#include "netutils.h" #include "netutils.h"
@ -40,6 +41,34 @@ int np_net_ssl_init (int sd) {
} }
int np_net_ssl_init_with_hostname(int sd, char *host_name) { int np_net_ssl_init_with_hostname(int sd, char *host_name) {
return np_net_ssl_init_with_hostname_and_version(sd, host_name, 0);
}
int np_net_ssl_init_with_hostname_and_version(int sd, char *host_name, int version) {
const SSL_METHOD *method = NULL;
switch (version) {
case 0: /* Deafult to auto negotiation */
method = SSLv23_client_method();
break;
case 1: /* TLSv1 protocol */
method = TLSv1_client_method();
break;
case 2: /* SSLv2 protocol */
#if defined(USE_GNUTLS) || defined(OPENSSL_NO_SSL2)
printf(("%s\n", _("CRITICAL - SSL protocol version 2 is not supported by your SSL library.")));
return STATE_CRITICAL;
#else
method = SSLv2_client_method();
#endif
break;
case 3: /* SSLv3 protocol */
method = SSLv3_client_method();
break;
default: /* Unsupported */
printf("%s\n", _("CRITICAL - Unsupported SSL protocol version."));
return STATE_CRITICAL;
}
if (!initialized) { if (!initialized) {
/* Initialize SSL context */ /* Initialize SSL context */
SSLeay_add_ssl_algorithms(); SSLeay_add_ssl_algorithms();
@ -47,10 +76,13 @@ int np_net_ssl_init_with_hostname (int sd, char *host_name) {
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
initialized = 1; initialized = 1;
} }
if ((c = SSL_CTX_new (SSLv23_client_method ())) == NULL) { if ((c = SSL_CTX_new(method)) == NULL) {
printf("%s\n", _("CRITICAL - Cannot create SSL context.")); printf("%s\n", _("CRITICAL - Cannot create SSL context."));
return STATE_CRITICAL; return STATE_CRITICAL;
} }
#ifdef SSL_OP_NO_TICKET
SSL_CTX_set_options(c, SSL_OP_NO_TICKET);
#endif
if ((s = SSL_new(c)) != NULL) { if ((s = SSL_new(c)) != NULL) {
#ifdef SSL_set_tlsext_host_name #ifdef SSL_set_tlsext_host_name
if (host_name != NULL) if (host_name != NULL)
@ -60,7 +92,7 @@ int np_net_ssl_init_with_hostname (int sd, char *host_name) {
if (SSL_connect(s) == 1) { if (SSL_connect(s) == 1) {
return OK; return OK;
} else { } else {
printf ("%s\n", _("CRITICAL - Cannot make SSL connection ")); printf("%s\n", _("CRITICAL - Cannot make SSL connection."));
# ifdef USE_OPENSSL /* XXX look into ERR_error_string */ # ifdef USE_OPENSSL /* XXX look into ERR_error_string */
ERR_print_errors_fp(stdout); ERR_print_errors_fp(stdout);
# endif /* USE_OPENSSL */ # endif /* USE_OPENSSL */
@ -97,6 +129,11 @@ int np_net_ssl_read(void *buf, int num){
int np_net_ssl_check_cert(int days_till_exp) { int np_net_ssl_check_cert(int days_till_exp) {
# ifdef USE_OPENSSL # ifdef USE_OPENSSL
X509 *certificate=NULL; X509 *certificate=NULL;
X509_NAME *subj=NULL;
char cn[MAX_CN_LENGTH]= "";
int cnlen =-1;
int status=STATE_UNKNOWN;
ASN1_STRING *tm; ASN1_STRING *tm;
int offset; int offset;
struct tm stamp; struct tm stamp;
@ -110,6 +147,17 @@ int np_net_ssl_check_cert(int days_till_exp){
return STATE_CRITICAL; return STATE_CRITICAL;
} }
/* Extract CN from certificate subject */
subj=X509_get_subject_name(certificate);
if (!subj) {
printf("%s\n",_("CRITICAL - Cannot retrieve certificate subject."));
return STATE_CRITICAL;
}
cnlen = X509_NAME_get_text_by_NID(subj, NID_commonName, cn, sizeof(cn));
if (cnlen == -1)
strcpy(cn, _("Unknown CN"));
/* Retrieve timestamp of certificate */ /* Retrieve timestamp of certificate */
tm = X509_get_notAfter(certificate); tm = X509_get_notAfter(certificate);
@ -155,19 +203,20 @@ int np_net_ssl_check_cert(int days_till_exp){
stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min); stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min);
if (days_left > 0 && days_left <= days_till_exp) { if (days_left > 0 && days_left <= days_till_exp) {
printf (_("WARNING - Certificate expires in %d day(s) (%s).\n"), days_left, timestamp); printf(_("WARNING - Certificate '%s' expires in %d day(s) (%s).\n"), cn, days_left, timestamp);
return STATE_WARNING; status=STATE_WARNING;
} else if (time_left < 0) { } else if (time_left < 0) {
printf (_("CRITICAL - Certificate expired on %s.\n"), timestamp); printf(_("CRITICAL - Certificate '%s' expired on %s.\n"), cn, timestamp);
return STATE_CRITICAL; status=STATE_CRITICAL;
} else if (days_left == 0) { } else if (days_left == 0) {
printf (_("WARNING - Certificate expires today (%s).\n"), timestamp); printf(_("WARNING - Certificate '%s' expires today (%s).\n"), cn, timestamp);
return STATE_WARNING; status=STATE_WARNING;
} else {
printf(_("OK - Certificate '%s' will expire on %s.\n"), cn, timestamp);
status=STATE_OK;
} }
printf (_("OK - Certificate will expire on %s.\n"), timestamp);
X509_free(certificate); X509_free(certificate);
return STATE_OK; return status;
# else /* ifndef USE_OPENSSL */ # else /* ifndef USE_OPENSSL */
printf("%s\n", _("WARNING - Plugin does not support checking certificates.")); printf("%s\n", _("WARNING - Plugin does not support checking certificates."));
return STATE_WARNING; return STATE_WARNING;

View file

@ -17,9 +17,14 @@ my $ssh_key = getTestParameter( "NP_SSH_IDENTITY",
"A key allowing access to NP_SSH_HOST", "A key allowing access to NP_SSH_HOST",
"~/.ssh/id_dsa"); "~/.ssh/id_dsa");
my $ssh_conf = getTestParameter( "NP_SSH_CONFIGFILE",
"A config file with ssh settings",
"~/.ssh/config");
plan skip_all => "SSH_HOST and SSH_IDENTITY must be defined" unless ($ssh_service && $ssh_key); plan skip_all => "SSH_HOST and SSH_IDENTITY must be defined" unless ($ssh_service && $ssh_key);
plan tests => 40; plan tests => 42;
# Some random check strings/response # Some random check strings/response
my @responce = ('OK: Everything is fine!', my @responce = ('OK: Everything is fine!',
@ -85,6 +90,12 @@ $result = NPTest->testCmd(
cmp_ok($result->return_code, '==', 8, "Exit with return code 8 (out of bounds)"); cmp_ok($result->return_code, '==', 8, "Exit with return code 8 (out of bounds)");
is($result->output, $responce[4], "Return proper status text even with unknown status codes"); is($result->output, $responce[4], "Return proper status text even with unknown status codes");
$result = NPTest->testCmd(
"./check_by_ssh -i $ssh_key -H $ssh_service -F $ssh_conf -C 'exit 0'"
);
cmp_ok($result->return_code, '==', 0, "Exit with return code 0 (OK)");
is($result->output, 'OK - check_by_ssh: Remote command \'exit 0\' returned status 0', "Status text if command returned none (OK)");
# Multiple active checks # Multiple active checks
$result = NPTest->testCmd( $result = NPTest->testCmd(
"./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[1]; sh -c exit\\ 1' -C '$check[0]; sh -c exit\\ 0' -C '$check[3]; sh -c exit\\ 3' -C '$check[2]; sh -c exit\\ 2'" "./check_by_ssh -i $ssh_key -H $ssh_service -C '$check[1]; sh -c exit\\ 1' -C '$check[0]; sh -c exit\\ 0' -C '$check[3]; sh -c exit\\ 3' -C '$check[2]; sh -c exit\\ 2'"

View file

@ -102,7 +102,7 @@ SKIP: {
$res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" ); $res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" );
cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com"); cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com");
like ( $res->output, '/Certificate will expire on/', "Output OK" ); like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" );
my $saved_cert_output = $res->output; my $saved_cert_output = $res->output;
$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" );

View file

@ -8,7 +8,7 @@ use strict;
use Test::More; use Test::More;
use NPTest; use NPTest;
my $tests = 8+38+2+2; my $tests = 8+42+2+2;
plan tests => $tests; plan tests => $tests;
my $res; my $res;
@ -124,6 +124,13 @@ SKIP: {
cmp_ok( $res->return_code, '==', 0, "Skipping all thresholds"); cmp_ok( $res->return_code, '==', 0, "Skipping all thresholds");
like($res->output, '/^SNMP OK - \d+ \w+ \d+\s.*$/', "Skipping all thresholds, result printed rather than parsed"); like($res->output, '/^SNMP OK - \d+ \w+ \d+\s.*$/', "Skipping all thresholds, result printed rather than parsed");
$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysUpTime.0 -c 1000000000000: -u '1/100 sec'");
cmp_ok( $res->return_code, '==', 2, "Timetick used as a threshold");
like($res->output, '/^SNMP CRITICAL - \*\d+\* 1\/100 sec.*$/', "Timetick used as a threshold, parsed as numeric");
$res = NPTest->testCmd( "./check_snmp -H $host_snmp -C $snmp_community -o system.sysUpTime.0");
cmp_ok( $res->return_code, '==', 0, "Timetick used as a string");
like($res->output, '/^SNMP OK - Timeticks:\s\(\d+\)\s+(?:\d+ days?,\s+)?\d+:\d+:\d+\.\d+\s.*$/', "Timetick used as a string, result printed rather than parsed");
} }
# These checks need a complete command line. An invalid community is used so # These checks need a complete command line. An invalid community is used so

View file

@ -18,9 +18,24 @@ use Test::More;
use NPTest; use NPTest;
use FindBin qw($Bin); use FindBin qw($Bin);
use HTTP::Daemon; my $common_tests = 66;
use HTTP::Status; my $ssl_only_tests = 6;
use HTTP::Response; # Check that all dependent modules are available
eval {
require HTTP::Daemon;
require HTTP::Status;
require HTTP::Response;
};
if ($@) {
plan skip_all => "Missing required module for test: $@";
} else {
if (-x "./check_http") {
plan tests => $common_tests * 2 + $ssl_only_tests;
} else {
plan skip_all => "No check_http compiled";
}
}
my $servers = { http => 0 }; # HTTP::Daemon should always be available my $servers = { http => 0 }; # HTTP::Daemon should always be available
eval { require HTTP::Daemon::SSL }; eval { require HTTP::Daemon::SSL };
@ -112,9 +127,9 @@ sub run_server {
$c->send_response("slow"); $c->send_response("slow");
} elsif ($r->url->path eq "/method") { } elsif ($r->url->path eq "/method") {
if ($r->method eq "DELETE") { if ($r->method eq "DELETE") {
$c->send_error(RC_METHOD_NOT_ALLOWED); $c->send_error(HTTP::Status->RC_METHOD_NOT_ALLOWED);
} elsif ($r->method eq "foo") { } elsif ($r->method eq "foo") {
$c->send_error(RC_NOT_IMPLEMENTED); $c->send_error(HTTP::Status->RC_NOT_IMPLEMENTED);
} else { } else {
$c->send_status_line(200, $r->method); $c->send_status_line(200, $r->method);
} }
@ -138,7 +153,7 @@ sub run_server {
delete($persist[1000]); delete($persist[1000]);
next MAINLOOP; next MAINLOOP;
} else { } else {
$c->send_error(RC_FORBIDDEN); $c->send_error(HTTP::Status->RC_FORBIDDEN);
} }
$c->close; $c->close;
} }
@ -157,14 +172,6 @@ if ($ARGV[0] && $ARGV[0] eq "-d") {
} }
} }
my $common_tests = 66;
my $ssl_only_tests = 6;
if (-x "./check_http") {
plan tests => $common_tests * 2 + $ssl_only_tests;
} else {
plan skip_all => "No check_http compiled";
}
my $result; my $result;
my $command = "./check_http -H 127.0.0.1"; my $command = "./check_http -H 127.0.0.1";
@ -175,17 +182,17 @@ SKIP: {
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); $result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
is( $result->output, 'OK - Certificate will expire on 03/03/2019 21:41.', "output ok" ); is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on 03/03/2019 21:41.', "output ok" );
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
like( $result->output, '/WARNING - Certificate expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" ); like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
# Expired cert tests # Expired cert tests
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
is( $result->output, is( $result->output,
'CRITICAL - Certificate expired on 03/05/2009 00:13.', 'CRITICAL - Certificate \'Ton Voon\' expired on 03/05/2009 00:13.',
"output ok" ); "output ok" );
} }

View file

@ -8,7 +8,7 @@ use Test::More;
use NPTest; use NPTest;
if (-x "./check_procs") { if (-x "./check_procs") {
plan tests => 48; plan tests => 50;
} else { } else {
plan skip_all => "No check_procs compiled"; plan skip_all => "No check_procs compiled";
} }
@ -113,3 +113,7 @@ $result = NPTest->testCmd( "$command --metric=RSS -c 70000 -v" );
is( $result->return_code, 2, "Checking against RSS > 70MB" ); is( $result->return_code, 2, "Checking against RSS > 70MB" );
is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" ); is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowServer, SystemUIServer, Safari, Mail, Safari]', "Output correct" );
$result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" );
is( $result->return_code, 0, "Checking no pipe symbol in output" );
is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)'", "Output correct" );

View file

@ -8,6 +8,7 @@ use Test::More;
use NPTest; use NPTest;
use FindBin qw($Bin); use FindBin qw($Bin);
my $tests = 41;
# Check that all dependent modules are available # Check that all dependent modules are available
eval { eval {
require NetSNMP::OID; require NetSNMP::OID;
@ -17,6 +18,12 @@ eval {
if ($@) { if ($@) {
plan skip_all => "Missing required module for test: $@"; plan skip_all => "Missing required module for test: $@";
} else {
if (-x "./check_snmp") {
plan tests => $tests;
} else {
plan skip_all => "No check_snmp compiled";
}
} }
my $port_snmp = 16100 + int(rand(100)); my $port_snmp = 16100 + int(rand(100));
@ -51,12 +58,8 @@ if ($ARGV[0] && $ARGV[0] eq "-d") {
} }
} }
my $tests = 33; # We should merge that with $ENV{'NPTEST_CACHE'}, use one dir for all test data
if (-x "./check_snmp") { $ENV{'NAGIOS_PLUGIN_STATE_DIRECTORY'} ||= "/var/tmp";
plan tests => $tests;
} else {
plan skip_all => "No check_snmp compiled";
}
my $res; my $res;
@ -106,7 +109,7 @@ like($res->output, '/'.quotemeta('SNMP OK - And now have fun with with this: \"C
"And now have fun with with this: \"C:\\\\\" "And now have fun with with this: \"C:\\\\\"
because we\'re not done yet!"').'/m', "Attempt to confuse parser No.3"); because we\'re not done yet!"').'/m', "Attempt to confuse parser No.3");
system("rm /usr/local/nagios/var/check_snmp/*"); system("rm -f ".$ENV{'NAGIOS_PLUGIN_STATE_DIRECTORY'}."/check_snmp/*");
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -w 600" ); $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -w 600" );
is($res->return_code, 0, "Returns OK"); is($res->return_code, 0, "Returns OK");
is($res->output, "No previous data to calculate rate - assume okay"); is($res->output, "No previous data to calculate rate - assume okay");
@ -170,5 +173,19 @@ $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1
is($res->return_code, 0, "OK as string doesn't match but inverted" ); is($res->return_code, 0, "OK as string doesn't match but inverted" );
is($res->output, 'SNMP OK - "stringtests" | ', "OK as inverted string no match" ); is($res->output, 'SNMP OK - "stringtests" | ', "OK as inverted string no match" );
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.12 -w 4:5" );
is($res->return_code, 1, "Numeric in string test" );
is($res->output, 'SNMP WARNING - *3.5* | iso.3.6.1.4.1.8072.3.2.67.12=3.5 ', "WARNING threshold checks for string masquerading as number" );
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.13" );
is($res->return_code, 0, "Not really numeric test" );
is($res->output, 'SNMP OK - "87.4startswithnumberbutshouldbestring" | ', "Check string with numeric start is still string" );
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.14" );
is($res->return_code, 0, "Not really numeric test (trying best to fool it)" );
is($res->output, 'SNMP OK - "555\"I said\"" | ', "Check string with a double quote following is still a string (looks like the perl routine will always escape though)" );
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.15 -r 'CUSTOM CHECK OK'" );
is($res->return_code, 0, "String check should check whole string, not a parsed number" );
is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check witn numbers returns whole string");

View file

@ -33,9 +33,10 @@ ends with with this: C:\\';
my $multilin5 = 'And now have fun with with this: "C:\\" my $multilin5 = 'And now have fun with with this: "C:\\"
because we\'re not done yet!'; because we\'re not done yet!';
my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR); # 0..15 <---- please update comment when adding/removing fields
my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests"); my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR );
my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef); my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"', 'CUSTOM CHECK OK: foo is 12345' );
my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef, undef );
# Number of elements in our OID # Number of elements in our OID
my $oidelts; my $oidelts;

BIN
po/de.gmo

Binary file not shown.

1164
po/de.po

File diff suppressed because it is too large Load diff

BIN
po/fr.gmo

Binary file not shown.

1138
po/fr.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
1.4.15 1.4.15-59-ga80e

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008 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,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -141,7 +141,7 @@ am__libtap_la_SOURCES_DIST = tap.c tap.h
@USE_LIBTAP_LOCAL_TRUE@am_libtap_la_OBJECTS = tap.lo @USE_LIBTAP_LOCAL_TRUE@am_libtap_la_OBJECTS = tap.lo
libtap_la_OBJECTS = $(am_libtap_la_OBJECTS) libtap_la_OBJECTS = $(am_libtap_la_OBJECTS)
@USE_LIBTAP_LOCAL_TRUE@am_libtap_la_rpath = @USE_LIBTAP_LOCAL_TRUE@am_libtap_la_rpath =
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@ -1097,8 +1097,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
@ -1110,8 +1110,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@ -1121,13 +1121,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$tags $$unique