commit: 8da22949f86a3d3f06b71be7e21187b88fae769a
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 4 17:33:38 2016 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Apr 4 17:33:38 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8da22949
app-admin/collectd: Fix oracle configuration check in init script _checkconfig.
Do not match if oracle plugin is not enabled, simplify a bit the expression and
use wc -l instead of grep --count so that it works with busybox too.
Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
app-admin/collectd/files/collectd.initd-r1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app-admin/collectd/files/collectd.initd-r1
b/app-admin/collectd/files/collectd.initd-r1
index a90ec50..32510ff 100644
--- a/app-admin/collectd/files/collectd.initd-r1
+++ b/app-admin/collectd/files/collectd.initd-r1
@@ -28,7 +28,7 @@ depend() {
}
_checkconfig() {
- if [ $(eval sed '/^$\|^#/d' \"${COLLECTD_CONFIGFILE}\" | grep --count
'LoadPlugin[[:space:]]\+oracle') -ge 1 ] ; then
+ if [ $(sed '/^$\|^#/d' "${COLLECTD_CONFIGFILE}" | grep
'LoadPlugin[[:space:]]\+oracle' | wc -l) -ge 1 ] ; then
if [ -e /etc/env.d/50oracle-instantclient-basic ] ; then
. /etc/env.d/50oracle-instantclient-basic
export ORACLE_HOME