diff options
Diffstat (limited to 'web/attachments/320776-nagios-plugins-subst.patch')
-rw-r--r-- | web/attachments/320776-nagios-plugins-subst.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/web/attachments/320776-nagios-plugins-subst.patch b/web/attachments/320776-nagios-plugins-subst.patch new file mode 100644 index 0000000..9402d30 --- /dev/null +++ b/web/attachments/320776-nagios-plugins-subst.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | --- nagios-plugins-1.4.13/plugins-scripts/subst.in.orig 2009-04-02 11:42:29.000000000 +1100 | ||
2 | +++ nagios-plugins-1.4.13/plugins-scripts/subst.in 2009-04-02 11:43:39.000000000 +1100 | ||
3 | @@ -44,6 +44,16 @@ | ||
4 | /^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");} | ||
5 | /^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");} | ||
6 | |||
7 | +# If a script contains a reference to a fully qualified command, | ||
8 | +# subst will replace the fully qualified command with whatever is | ||
9 | +# returned from the which subroutine. run before changes to INC to add libexecdir | ||
10 | +# | ||
11 | +/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { | ||
12 | + match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); | ||
13 | + c=substr($0,RSTART,RLENGTH); | ||
14 | + sub(c,which(c,path)); | ||
15 | +} | ||
16 | + | ||
17 | # add to libexecdir to INC for perl utils.pm | ||
18 | /^use/ { if (/lib/) { if (/utils.pm|"."/ ) {sub(/utils.pm|"."/,led() )} } } | ||
19 | |||
20 | @@ -58,16 +68,6 @@ | ||
21 | sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived"); | ||
22 | } | ||
23 | |||
24 | -# If a script contains a reference to a fully qualified command, | ||
25 | -# subst will replace the fully qualified command with whatever is | ||
26 | -# returned from the which subroutine | ||
27 | -# | ||
28 | -/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// { | ||
29 | - match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/); | ||
30 | - c=substr($0,RSTART,RLENGTH); | ||
31 | - sub(c,which(c,path)); | ||
32 | -} | ||
33 | - | ||
34 | { | ||
35 | print; | ||
36 | } | ||