From f3d8ff41e0241475f210ba2f03acc99a9633fabf Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Wed, 26 Jan 2011 14:42:14 +0100 Subject: [PATCH] Put fixes for config files into quilt --- debian/patches/apache-fix-path-to-userfile | 13 +++++++++++ debian/patches/fix-nagios-url | 13 +++++++++++ debian/patches/fix-npcd-path | 22 +++++++++++++++++++ debian/patches/raise-process-perfdata-timeout | 13 +++++++++++ debian/patches/series | 4 ++++ debian/rules | 15 ++++++------- 6 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 debian/patches/apache-fix-path-to-userfile create mode 100644 debian/patches/fix-nagios-url create mode 100644 debian/patches/fix-npcd-path create mode 100644 debian/patches/raise-process-perfdata-timeout diff --git a/debian/patches/apache-fix-path-to-userfile b/debian/patches/apache-fix-path-to-userfile new file mode 100644 index 0000000..cb1f310 --- /dev/null +++ b/debian/patches/apache-fix-path-to-userfile @@ -0,0 +1,13 @@ +Index: pkg-pnp4nagios/sample-config/httpd.conf.in +=================================================================== +--- pkg-pnp4nagios.orig/sample-config/httpd.conf.in 2011-01-26 14:40:26.943054015 +0100 ++++ pkg-pnp4nagios/sample-config/httpd.conf.in 2011-01-26 14:40:40.599054016 +0100 +@@ -11,7 +11,7 @@ + # + AuthName "Nagios Access" + AuthType Basic +- AuthUserFile /usr/local/nagios/etc/htpasswd.users ++ AuthUserFile /etc/nagios3/htpasswd.users + Require valid-user + + # Turn on URL rewriting diff --git a/debian/patches/fix-nagios-url b/debian/patches/fix-nagios-url new file mode 100644 index 0000000..f3a09d9 --- /dev/null +++ b/debian/patches/fix-nagios-url @@ -0,0 +1,13 @@ +Index: pkg-pnp4nagios/sample-config/pnp/config.php.in +=================================================================== +--- pkg-pnp4nagios.orig/sample-config/pnp/config.php.in 2011-01-26 14:17:43.971054016 +0100 ++++ pkg-pnp4nagios/sample-config/pnp/config.php.in 2011-01-26 14:17:57.167054016 +0100 +@@ -73,7 +73,7 @@ + # + # Link back to Nagios or Thruk ( www.thruk.org ) + # +-$conf['nagios_base'] = "/nagios/cgi-bin"; ++$conf['nagios_base'] = "/cgi-bin/nagios3"; + + # + # Link back to check_mk´s multisite ( http://mathias-kettner.de/checkmk_multisite.html ) diff --git a/debian/patches/fix-npcd-path b/debian/patches/fix-npcd-path new file mode 100644 index 0000000..404f186 --- /dev/null +++ b/debian/patches/fix-npcd-path @@ -0,0 +1,22 @@ +Index: pkg-pnp4nagios/sample-config/pnp/npcd.cfg-sample.in +=================================================================== +--- pkg-pnp4nagios.orig/sample-config/pnp/npcd.cfg-sample.in 2011-01-26 14:33:43.595054016 +0100 ++++ pkg-pnp4nagios/sample-config/pnp/npcd.cfg-sample.in 2011-01-26 14:36:53.351054016 +0100 +@@ -76,7 +76,7 @@ + # perfdata_spool_dir = + # + +-perfdata_spool_dir = @PERFDATA_SPOOL_DIR@/ ++perfdata_spool_dir = @PERFDATA_SPOOL_DIR@/npcd/ + + + # Execute following command for each found file +@@ -163,7 +163,7 @@ + # perfdata_file = + # + +-perfdata_file = @localstatedir@/perfdata.dump ++perfdata_file = @PERFDATA_SPOOL_DIR@/nagios/perfdata.dump + + + # perfdata_spool_filename - declare the destination diff --git a/debian/patches/raise-process-perfdata-timeout b/debian/patches/raise-process-perfdata-timeout new file mode 100644 index 0000000..9a6628b --- /dev/null +++ b/debian/patches/raise-process-perfdata-timeout @@ -0,0 +1,13 @@ +Index: pkg-pnp4nagios/sample-config/pnp/process_perfdata.cfg-sample.in +=================================================================== +--- pkg-pnp4nagios.orig/sample-config/pnp/process_perfdata.cfg-sample.in 2011-01-26 14:39:08.995054016 +0100 ++++ pkg-pnp4nagios/sample-config/pnp/process_perfdata.cfg-sample.in 2011-01-26 14:39:14.327054015 +0100 +@@ -6,7 +6,7 @@ + # + # process_perfdata.pl Timeout in seconds + # +-TIMEOUT = 5 ++TIMEOUT = 10 + + # + # Use RRDs Perl module diff --git a/debian/patches/series b/debian/patches/series index 2ef2caa..7cb3847 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,5 @@ +apache-fix-path-to-userfile +raise-process-perfdata-timeout +fix-npcd-path +fix-nagios-url adjust-template-path diff --git a/debian/rules b/debian/rules index 1434a81..9ba49a9 100644 --- a/debian/rules +++ b/debian/rules @@ -84,20 +84,20 @@ install: build mkdir $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/templates.special # Copy, rename and fix sample configs and examples - sed -i -e 's#/nagios/cgi-bin#/cgi-bin/nagios3#' $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/config.php + # sed -i -e 's#/nagios/cgi-bin#/cgi-bin/nagios3#' $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/config.php mv $(CURDIR)/debian/pnp4nagios/usr/bin/npcd \ $(CURDIR)/debian/pnp4nagios/usr/sbin/ mv $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/npcd.cfg-sample \ $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/npcd.cfg - sed -i -e 's#/var/spool/pnp4nagios/#&npcd/#' \ - -e 's#/var/log/pnp4nagios/perfdata.dump#/var/spool/pnp4nagios/nagios/perfdata.dump#' \ - $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/npcd.cfg + #sed -i -e 's#/var/spool/pnp4nagios/#&npcd/#' \ + # -e 's#/var/log/pnp4nagios/perfdata.dump#/var/spool/pnp4nagios/nagios/perfdata.dump#' \ + # $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/npcd.cfg mv $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/process_perfdata.cfg-sample \ $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/process_perfdata.cfg - sed -i -e 's/TIMEOUT = 5/TIMEOUT = 15/' \ - $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/process_perfdata.cfg + #sed -i -e 's/TIMEOUT = 5/TIMEOUT = 15/' \ + # $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/process_perfdata.cfg mv $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/rra.cfg-sample \ $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/rra.cfg @@ -137,8 +137,7 @@ install: build cp -av $(CURDIR)/debian/check_commands/* $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/check_commands/ # Apache config file - # FIXME - sed -i 's#/usr/local/nagios/etc/htpasswd.users#/etc/nagios3/htpasswd.users#' $(CURDIR)/sample-config/httpd.conf + #sed -i 's#/usr/local/nagios/etc/htpasswd.users#/etc/nagios3/htpasswd.users#' $(CURDIR)/sample-config/httpd.conf cp -av $(CURDIR)/sample-config/httpd.conf $(CURDIR)/debian/pnp4nagios/etc/pnp4nagios/apache.conf # Add subdirs to /var/spool/pnp4nagios/ to prepare for different modes -- 2.30.2