summaryrefslogtreecommitdiffstats
path: root/web/attachments/320775-debian-subst.txt
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/320775-debian-subst.txt')
-rw-r--r--web/attachments/320775-debian-subst.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/web/attachments/320775-debian-subst.txt b/web/attachments/320775-debian-subst.txt
new file mode 100644
index 0000000..65e28ea
--- /dev/null
+++ b/web/attachments/320775-debian-subst.txt
@@ -0,0 +1,57 @@
1diff -urNad sid2~/plugins-scripts/subst.in sid2/plugins-scripts/subst.in
2--- sid2~/plugins-scripts/subst.in 2005-08-31 00:11:42.000000000 +0200
3+++ sid2/plugins-scripts/subst.in 2005-10-07 22:37:45.000000000 +0200
4@@ -1,35 +1,9 @@
5 #!/usr/bin/awk
6
7-function which(c,path) {
8- cmd = "test -x " c;
9-
10- if (system(cmd)==0) {
11- return c;
12- }
13-
14- sub(/\/.*\//,"",c);
15- for (dir in path) {
16- cmd = "test -x " path[dir] "/" c;
17- if (system(cmd)==0) {
18- return path[dir] "/" c;
19- }
20- }
21-
22-
23- return c;
24-}
25-
26 # used to replace "use lib utils.pm" with "use lib @libexecdir"
27 #
28 function led() {
29- led1 = "@libexecdir@";
30- led2 = "@exec_prefix@";
31- led3 = "@prefix@";
32- if ( match(led1, /^\$\{exec_prefix\}/ ) != 0 ) {
33- return "\"" led3 "/libexec\" " ;
34-
35- }
36- return "\"" led1 "\"" ;
37+ return "\"/usr/lib/nagios/plugins\"" ;
38 }
39
40 BEGIN {
41@@ -58,16 +32,6 @@
42 sub(/\=.*$/,"='@with_trusted_path@' # autoconf-derived");
43 }
44
45-# If a script contains a reference to a fully qualified command,
46-# subst will replace the fully qualified command with whatever is
47-# returned from the which subroutine
48-#
49-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
50- match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
51- c=substr($0,RSTART,RLENGTH);
52- sub(c,which(c,path));
53-}
54-
55 {
56 print;
57 } \ No newline at end of file