Code

check_oracle does not need a valid ORACLE_HOME if called with --db. Thanks to Jason...
authorMatthias Eble <psychotrahe@users.sourceforge.net>
Sun, 27 May 2007 14:49:54 +0000 (14:49 +0000)
committerMatthias Eble <psychotrahe@users.sourceforge.net>
Sun, 27 May 2007 14:49:54 +0000 (14:49 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1719 f882894a-f735-0410-b71e-b25c423dba1c

THANKS.in
plugins-scripts/check_oracle.sh

index b35c43817d0660575c753c9ae6b5aff5fb26679a..5db38471eff425fa37b529db60f192fa3cf87a1b 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -220,3 +220,4 @@ Matthias Flacke
 Emil Michles
 Ask Bjoern Hansen
 Enrico Scholz
+Jason Martin
index 02ca11147b86cefde247b098cfca1486483223ce..56962e37ccc0093b29d0aea68eb45e63fde51145 100755 (executable)
@@ -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