summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-04-04 19:33:38 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-04-04 19:33:38 +0200
commit8da22949f86a3d3f06b71be7e21187b88fae769a (patch)
tree9d8653c92091b1791eccee12af9642431253367f /app-admin/collectd
parentsys-kernel/gentoo-sources: Remove old. (diff)
downloadgentoo-8da22949f86a3d3f06b71be7e21187b88fae769a.tar.gz
gentoo-8da22949f86a3d3f06b71be7e21187b88fae769a.tar.bz2
gentoo-8da22949f86a3d3f06b71be7e21187b88fae769a.zip
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@gentoo.org>
Diffstat (limited to 'app-admin/collectd')
-rw-r--r--app-admin/collectd/files/collectd.initd-r12
1 files changed, 1 insertions, 1 deletions
diff --git a/app-admin/collectd/files/collectd.initd-r1 b/app-admin/collectd/files/collectd.initd-r1
index a90ec507eefc..32510ffde9b0 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