[csw-devel] SF.net SVN: gar:[3805] csw/mgar/pkg/nsca/trunk
j_arndt at users.sourceforge.net
j_arndt at users.sourceforge.net
Wed Mar 18 17:23:31 CET 2009
Revision: 3805
http://gar.svn.sourceforge.net/gar/?rev=3805&view=rev
Author: j_arndt
Date: 2009-03-18 16:23:31 +0000 (Wed, 18 Mar 2009)
Log Message:
-----------
nsca: fixed paths, improved start script
Modified Paths:
--------------
csw/mgar/pkg/nsca/trunk/Makefile
csw/mgar/pkg/nsca/trunk/checksums
csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.gspec
csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype
csw/mgar/pkg/nsca/trunk/files/cswnsca
Modified: csw/mgar/pkg/nsca/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nsca/trunk/Makefile 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/Makefile 2009-03-18 16:23:31 UTC (rev 3805)
@@ -2,7 +2,9 @@
GARVERSION = 2.7.2
CATEGORIES = apps
-DESCRIPTION = passive checks for nagios
+SPKG_DESC_CSWnsca = Nagios service check acceptor - nagios server files only (the client package is send_nsca)
+SPKG_DESC_CSWsendnsca = Nagios service check acceptor - send passive check results to nagios server (client files only)
+
define BLURB
NSCA allows you to integrate passive alerts and checks from remote machines and applications with Nagios. Useful for processing security alerts, as well as redundant and distributed Nagios setups.
endef
@@ -18,11 +20,11 @@
REQUIRED_PKGS_CSWnsca = CSWlibmcrypt CSWlibtoolrt CSWcswclassutils
REQUIRED_PKGS_CSWsendnsca = CSWlibmcrypt CSWlibtoolrt
-SPKG_CLASSES = none cswinitsmf
+SPKG_CLASSES_CSWnsca = none cswinitsmf
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --with-nsca-port=5667
-CONFIGURE_ARGS += --localstatedir=/opt/csw/nagios/var
+CONFIGURE_ARGS += --localstatedir=/opt/csw/var
BUILD_TARGETS = nsca
@@ -30,25 +32,29 @@
include gar/category.mk
+BINDIR=$(prefix)/bin
NAGIOSBINDIR=$(prefix)/nagios/bin
+CFGDIR=$(prefix)/etc
NAGIOSCFGDIR=$(prefix)/nagios/etc
NSCADOCDIR=$(prefix)/share/doc/nsca
SENDNSCADOCDIR=$(prefix)/share/doc/send_nsca
post-install-modulated:
- ginstall -d $(DESTDIR)$(prefix)/nagios/bin
- ginstall -d $(DESTDIR)$(prefix)/nagios/etc
+ ginstall -d $(DESTDIR)$(prefix)/bin
+ ginstall -d $(DESTDIR)$(prefix)/etc
+ ginstall -d $(DESTDIR)$(NAGIOSBINDIR)
+ ginstall -d $(DESTDIR)$(NAGIOSCFGDIR)
ginstall -m 755 -d $(DESTDIR)$(NSCADOCDIR)
ginstall -m 755 $(WORKSRC)/src/nsca $(DESTDIR)$(NAGIOSBINDIR)
- ginstall -m 600 $(WORKSRC)/sample-config/nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/nsca.cfg
+ ginstall -m 600 $(WORKSRC)/sample-config/nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/nsca.cfg-sample
ginstall -m 644 $(WORKSRC)/Changelog $(DESTDIR)$(NSCADOCDIR)
ginstall -m 644 $(WORKSRC)/LEGAL $(DESTDIR)$(NSCADOCDIR)
ginstall -m 644 $(WORKSRC)/README $(DESTDIR)$(NSCADOCDIR)
ginstall -m 644 $(WORKSRC)/SECURITY $(DESTDIR)$(NSCADOCDIR)
- ginstall -m 755 $(WORKSRC)/src/send_nsca $(DESTDIR)$(NAGIOSBINDIR)
+ ginstall -m 755 $(WORKSRC)/src/send_nsca $(DESTDIR)$(BINDIR)
ginstall -m 755 -d $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 755 $(WORKSRC)/src/submit_check_result-sample $(DESTDIR)$(SENDNSCADOCDIR)
- ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/send_nsca.cfg
+ ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(CFGDIR)/send_nsca.cfg-sample
ginstall -m 644 $(WORKSRC)/Changelog $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 644 $(WORKSRC)/LEGAL $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 644 $(WORKSRC)/README $(DESTDIR)$(SENDNSCADOCDIR)
Modified: csw/mgar/pkg/nsca/trunk/checksums
===================================================================
--- csw/mgar/pkg/nsca/trunk/checksums 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/checksums 2009-03-18 16:23:31 UTC (rev 3805)
@@ -1,10 +1,10 @@
33a98e7975f633a9489d7a8938ed6131 download/nsca-2.7.2.tar.gz
82f1144c12dc6247524609dbeefc3023 download/CSWnsca.gspec
-22cc4e3984d0627708f954c39fa6a22a download/CSWnsca.prototype
+8dfc4283d41a0c127a00170ab285c18d download/CSWnsca.prototype
1886b15eafd2e2a5a4b230918960ea9a download/CSWnsca.checkinstall
7fef893e65bb68bc0762434dbeace713 download/CSWnsca.preinstall
-b82767ed7ab002fea4b3a4395511c93c download/CSWsendnsca.gspec
-49309205ad3d77c99f9bd469cc3860d2 download/CSWsendnsca.prototype
+0f458cf358b1aab192c02fd0d37b1220 download/CSWsendnsca.gspec
+67d4566b83bad9e981bae7e889217c85 download/CSWsendnsca.prototype
8bf9882f3115e8514ae6d9a866397c71 download/CSWsendnsca.preinstall
-e2ea854aa2df24d432ba37ae614f9fa4 download/cswnsca
+55a1c5523b2fe1ee66b45a2807e80bd6 download/cswnsca
08b769c5511342dd03fa01fea44cb260 download/submit_check_results.diff
Modified: csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype 2009-03-18 16:23:31 UTC (rev 3805)
@@ -1,7 +1,7 @@
1 d none /opt/csw/nagios/bin 0755 nagios nagios
1 f none /opt/csw/nagios/bin/nsca 0755 nagios nagios
-1 d none /opt/csw/nagios/etc 0755 nagios
-1 f none /opt/csw/nagios/etc/nsca.cfg 0600 nagios nagios
+1 d none /opt/csw/nagios/etc 0755 nagios nagios
+1 f none /opt/csw/nagios/etc/nsca.cfg-sample 0600 nagios nagios
1 d none /opt/csw/share/doc/nsca 0755 root bin
1 f none /opt/csw/share/doc/nsca/Changelog 0644 root bin
1 f none /opt/csw/share/doc/nsca/LEGAL 0644 root bin
Modified: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.gspec
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.gspec 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.gspec 2009-03-18 16:23:31 UTC (rev 3805)
@@ -1,3 +1,3 @@
-%var bitname sendnsca
+%var bitname send_nsca
%var pkgname CSWsendnsca
%include url file://%{PKGLIB}/csw_dyndepend.gspec
Modified: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype 2009-03-18 16:23:31 UTC (rev 3805)
@@ -1,7 +1,7 @@
-1 d none /opt/csw/nagios/bin 0755 nagios nagios
-1 f none /opt/csw/nagios/bin/send_nsca 0755 nagios nagios
-1 d none /opt/csw/nagios/etc 0755 nagios nagios
-1 f none /opt/csw/nagios/etc/send_nsca.cfg 0644 nagios nagios
+1 d none /opt/csw/bin 0755 root bin
+1 f none /opt/csw/bin/send_nsca 0755 root bin
+1 d none /opt/csw/etc 0755 root bin
+1 f none /opt/csw/etc/send_nsca.cfg-sample 0644 root bin
1 d none /opt/csw/share/doc/send_nsca 0755 root bin
1 f none /opt/csw/share/doc/send_nsca/Changelog 0644 root bin
1 f none /opt/csw/share/doc/send_nsca/LEGAL 0644 root bin
Modified: csw/mgar/pkg/nsca/trunk/files/cswnsca
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/cswnsca 2009-03-18 16:22:03 UTC (rev 3804)
+++ csw/mgar/pkg/nsca/trunk/files/cswnsca 2009-03-18 16:23:31 UTC (rev 3805)
@@ -10,6 +10,19 @@
#FMRI application # FMRI path for service
CONFIG_FILE=/opt/csw/nagios/etc/nsca.cfg
+
+SMF_EXIT_ERR_CONFIG=1
+
+if [ -f /lib/svc/share/smf_include.sh ]
+then
+ . /lib/svc/share/smf_include.sh
+fi
+
+if [ ! -f $CONFIG_FILE ]
+then
+ exit $SMF_EXIT_ERR_CONFIG
+fi
+
BIN_FILE="/opt/csw/nagios/bin/nsca"
pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
nsca_USER=`awk -F'=' '/nsca_user/ { print $NF }' $CONFIG_FILE`
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list