public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-admin/collectd/files: collectd-4.10.2-libocci.patch collectd.initd
@ 2010-12-16 17:33 Andreas HAttel (dilfridge)
  0 siblings, 0 replies; only message in thread
From: Andreas HAttel (dilfridge) @ 2010-12-16 17:33 UTC (permalink / raw
  To: gentoo-commits

dilfridge    10/12/16 17:33:45

  Modified:             collectd.initd
  Added:                collectd-4.10.2-libocci.patch
  Log:
  Version bump, adding configuration checking and the Oracle plugin. Thanks to Aurelien Minet.
  
  (Portage version: 2.1.9.25/cvs/Linux i686)

Revision  Changes    Path
1.3                  app-admin/collectd/files/collectd.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/files/collectd.initd?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/files/collectd.initd?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/files/collectd.initd?r1=1.2&r2=1.3

Index: collectd.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.initd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- collectd.initd	10 Oct 2010 19:13:04 -0000	1.2
+++ collectd.initd	16 Dec 2010 17:33:45 -0000	1.3
@@ -1,18 +1,48 @@
 #!/sbin/runscript
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.initd,v 1.2 2010/10/10 19:13:04 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/files/collectd.initd,v 1.3 2010/12/16 17:33:45 dilfridge Exp $
 
 : ${COLLECTD_PIDFILE:='/var/run/collectd.pid'}
 : ${COLLECTD_CFGFILE:='/etc/collectd.conf'}
 : ${COLLECTD_NICELVL:='5'}
 
+opts="${opts} configtest"
 
 depend() {
 	use net
 }
 
+configtest() {
+	ebegin "Checking ${SVCNAME} configuration"
+	checkconfig
+	eend $?
+}
+
+checkconfig() {
+	if [[ $(sed '/^$\|^#/d' ${COLLECTD_CFGFILE} | grep -c 'LoadPlugin\w\+oracle') != 0 ]] ; then
+		if [[ -e /etc/env.d/50oracle-instantclient-basic ]] ; then
+			source /etc/env.d/50oracle-instantclient-basic
+		        export ORACLE_HOME
+		        export TNS_ADMIN
+		else
+			ewarn "Unable to set Oracle environment, Oracle plugin wont work"
+		fi
+	fi
+
+	/usr/sbin/collectd -t -C "${COLLECTD_CFGFILE}" 1>/dev/null 2>&1
+	ret=$?
+	if [ $ret -ne 0 ]; then
+		eerror "${SVCNAME} has detected an error in your setup:"
+		/usr/sbin/collectd -t -C "${COLLECTD_CFGFILE}"
+	fi
+
+	return $ret
+}
+
 start() {
+	checkconfig || return 1
+
 	ebegin "Starting collectd"
 	start-stop-daemon --start \
 		--nicelevel "${COLLECTD_NICELVL}" --exec /usr/sbin/collectd -- \



1.1                  app-admin/collectd/files/collectd-4.10.2-libocci.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/files/collectd-4.10.2-libocci.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/collectd/files/collectd-4.10.2-libocci.patch?rev=1.1&content-type=text/plain

Index: collectd-4.10.2-libocci.patch
===================================================================
diff -r -u collectd-4.10.2.orig/configure.in collectd-4.10.2/configure.in
--- collectd-4.10.2.orig/configure.in	2010-11-28 03:27:47.000000000 +0100
+++ collectd-4.10.2/configure.in	2010-11-28 03:28:23.000000000 +0100
@@ -2446,14 +2446,14 @@
 ])
 if test "x$ORACLE_HOME" != "x"
 then
-	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
+	with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public -locci"
 
 	if test -e "$ORACLE_HOME/lib/ldflags"
 	then
 		with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
 	fi
 	#with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
-	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
+	with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh -locci"
 fi
 if test "x$with_oracle" = "xyes"
 then






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-16 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 17:33 [gentoo-commits] gentoo-x86 commit in app-admin/collectd/files: collectd-4.10.2-libocci.patch collectd.initd Andreas HAttel (dilfridge)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox