aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-27 14:49:54 +0000
committerGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-27 14:49:54 +0000
commit1baf11d3af00e35a1540003232abd80ec92f4af0 (patch)
tree13593044d94a9cb7ba2b2ae6f1b1a74bafb16deb
parentbf9f0e9f8901f0e9e960e367941d2ab53435f641 (diff)
downloadmonitoring-plugins-1baf11d3af00e35a1540003232abd80ec92f4af0.tar.gz
check_oracle does not need a valid ORACLE_HOME if called with --db. Thanks to Jason Martin (#1505551)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1719 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--THANKS.in1
-rwxr-xr-xplugins-scripts/check_oracle.sh8
2 files changed, 6 insertions, 3 deletions
diff --git a/THANKS.in b/THANKS.in
index b35c4381..5db38471 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -220,3 +220,4 @@ Matthias Flacke
Emil Michles
Ask Bjoern Hansen
Enrico Scholz
+Jason Martin
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 02ca1114..56962e37 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -118,9 +118,11 @@ fi
# Last resort
[ -z "$ORACLE_HOME" -a -d $PROGPATH/oracle ] && ORACLE_HOME=$PROGPATH/oracle
-if [ -z "$ORACLE_HOME" -o ! -d "$ORACLE_HOME" ] ; then
- echo "Cannot determine ORACLE_HOME for sid $2"
- exit $STATE_UNKNOWN
+if [ "$cmd" != "--db" ]; then
+ if [ -z "$ORACLE_HOME" -o ! -d "$ORACLE_HOME" ] ; then
+ echo "Cannot determine ORACLE_HOME for sid $2"
+ exit $STATE_UNKNOWN
+ fi
fi
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib