Page 1 of 1

[Nagios-devel] [PATCH] NDOUTILS - Minor configure fixes for nicer

Posted: Fri Feb 06, 2009 10:17 pm
by Guest
This is a multi-part message in MIME format.
--------------010601050400010905090306
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This patch takes over the different information from the
configure run into the new sample config files.
These new *-sample files can now be installed by 'make install'.

TODO: A Nagios Version detection to decide which of the binaries
(2x or 3x) should be installed.

Signed-off-by: Hendrik Baecker
- ---
Makefile.in | 17 ++++
config/misccommands.cfg | 11 ---
config/misccommands.cfg.in | 11 +++
config/nagios.cfg | 11 ---
config/nagios.cfg.in | 11 +++
config/ndo2db.cfg | 175
- -------------------------------------------
config/ndo2db.cfg-sample.in | 175
+++++++++++++++++++++++++++++++++++++++++++
config/ndomod.cfg | 151 -------------------------------------
config/ndomod.cfg-sample.in | 151 +++++++++++++++++++++++++++++++++++++
configure | 49 ++++++++++++-
configure.in | 9 ++-
src/Makefile.in | 17 ++++
12 files changed, 437 insertions(+), 351 deletions(-)
delete mode 100644 config/misccommands.cfg
create mode 100644 config/misccommands.cfg.in
delete mode 100644 config/nagios.cfg
create mode 100644 config/nagios.cfg.in
delete mode 100644 config/ndo2db.cfg
create mode 100644 config/ndo2db.cfg-sample.in
delete mode 100644 config/ndomod.cfg
create mode 100644 config/ndomod.cfg-sample.in
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmMsMQACgkQlI0PwfxLQjnTwgCeP+QuGDIXriuNBfpkj9Dzwu3m
vvsAnRVYvRd5WN2X9+hcTwr0OouDZkI3
=bq+d
-----END PGP SIGNATURE-----

--------------010601050400010905090306
Content-Type: text/x-patch;
name="19543d6fff55109eb87b46ef4ef8eb7488a004ed.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="19543d6fff55109eb87b46ef4ef8eb7488a004ed.diff"

diff --git a/Makefile.in b/Makefile.in
index 328bf94..43f3241 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,6 +8,16 @@
# Source code directories
SRC_BASE=./src/
SRC_INCLUDE=./include/
+SRC_CONFIG=./config/
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+LOGDIR=@localstatedir@
+CFGDIR=@sysconfdir@
+BINDIR=@bindir@
+LIBEXECDIR=@libexecdir@
+CGIDIR=@sbindir@
+INSTALL=@INSTALL@

all:
cd $(SRC_BASE) && $(MAKE)
@@ -22,6 +32,13 @@ distclean: clean
rm -f config.log config.status config.cache $(SRC_INCLUDE)/config.h
rm -f Makefile
rm -f init-script.suse subst
+ rm -f config/ndo2db.cfg-sample config/ndomod.cfg-sample config/nagios.cfg config/misccommands.cfg

devclean: distclean

+install:
+ cd $(SRC_BASE) && $(MAKE) $@
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
+ $(INSTALL) -m 774 $(INSTALL_OPTS) config/ndo2db.cfg-sample $(DESTDIR)$(CFGDIR)
+ $(INSTALL) -m 774 $(INSTALL_OPTS) config/ndomod.cfg-sample $(DESTDIR)$(CFGDIR)
+
diff --git a/config/misccommands.cfg b/config/misccommands.cfg
deleted file mode 100644
index 6f6d46d..0000000
--- a/config/misccommands.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-# SAMPLE NDO FILE ROTATION COMMAND
-#
-# This is an example Nagios command definition that can be used to
-# rotate the NDO output file on a regular basis. Adjust the paths, etc.
-# to suit your needs. This definition will need to be included in your
-# Nagios config files if you want to use it.
-
-define command{
- command_name rotate_ndo_log
- command_line /bin/mv /usr/local/nagios/var/ndo.dat /usr/local/nagios/var/ndo.`date +%s`
- }
diff --git a/config/misccommands.cfg.in b/config/misccommands.cfg.in
new file mode 100644
index 0000000..48df0a1
--- /dev/null
+++ b/config/misccommands.cfg.in
@@ -0,0 +1,11 @@
+# SAMPLE NDO FILE ROTATION COMMAND
+#
+# This is an example Nagios command definition that can be used to
+# rotate the NDO output file on a regular basis. Adjust the paths, etc.
+# to suit your needs. This definition will need to be included in your
+# Nagios config files if you want to use it.
+
+define command{
+ command_name rotate_ndo_log
+ command_l

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]