diff options
Diffstat (limited to 'web/attachments/320396-nagios-plugins-subst.txt')
-rw-r--r-- | web/attachments/320396-nagios-plugins-subst.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/web/attachments/320396-nagios-plugins-subst.txt b/web/attachments/320396-nagios-plugins-subst.txt new file mode 100644 index 0000000..b04dea5 --- /dev/null +++ b/web/attachments/320396-nagios-plugins-subst.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | --- nagios-plugins-1.4.13/plugins-scripts/subst.in.orig 2009-03-31 13:59:58.000000000 +1100 | ||
2 | +++ nagios-plugins-1.4.13/plugins-scripts/subst.in 2009-03-31 14:01:30.000000000 +1100 | ||
3 | @@ -62,11 +62,14 @@ | ||
4 | # subst will replace the fully qualified command with whatever is | ||
5 | # returned from the which subroutine | ||
6 | # | ||
7 | -/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { | ||
8 | - match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); | ||
9 | - c=substr($0,RSTART,RLENGTH); | ||
10 | - sub(c,which(c,path)); | ||
11 | -} | ||
12 | +# REMOVED: had collateral dammage of also replacing library paths: | ||
13 | +# use lib "/usr/lib/nagios/plugins" ==> use lib "nagios/plugins", | ||
14 | +# this is wrong, and provides no real benefit for executables | ||
15 | +#/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { | ||
16 | +# match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); | ||
17 | +# c=substr($0,RSTART,RLENGTH); | ||
18 | +# sub(c,which(c,path)); | ||
19 | +#} | ||
20 | |||
21 | { | ||
22 | print; | ||