summaryrefslogtreecommitdiffstats
path: root/web/attachments/422303-check_oracle-1.4.15-bashprofile.patch
blob: dfa7cee5bfe377866c9bd0d838711e03b93c2abf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- /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:"