--- /usr/lib64/nagios/plugins/check_oracle 2011-08-29 15:39:13.000000000 +0200 +++ /usr/lib64/nagios/plugins/check_oracle-bashprofile 2011-08-29 15:49:30.000000000 +0200 @@ -12,6 +12,12 @@ . $PROGPATH/utils.sh +# workaround for sudo -u foo kinda calls and the ensueing env problem +USERHOMEDIR=`grep "^$USER" /etc/passwd | cut -d: -f6` +if [ -e $USERHOMEDIR/.bash_profile ]; then + . $USERHOMEDIR/.bash_profile +fi + print_usage() { echo "Usage:"