fix iproute2 dependency for openswan
[openwrt.git] / package / arpwatch / patches / 011_debian_opt_sendmail_path
1 Index: arpwatch/arpsnmp.8
2 diff -u arpwatch/arpsnmp.8:1.1.1.1 arpwatch/arpsnmp.8:1.1.1.1.4.1
3 --- arpwatch/arpsnmp.8:1.1.1.1 Tue Apr 17 13:31:36 2001
4 +++ arpwatch/arpsnmp.8 Tue Apr 17 13:49:16 2001
5 @@ -30,7 +30,12 @@
6 ] [
7 .B -f
8 .I datafile
9 +] [
10 +.B -s
11 +.I sendmail_path
12 ]
13 +.br
14 +.ti +8
15 .I file
16 [
17 .I ...
18 @@ -54,6 +59,13 @@
19 flag is used to set the ethernet/ip address database filename.
20 The default is
21 .IR arp.dat .
22 +.LP
23 +The
24 +.B -s
25 +flag is used to specify the path to the sendmail program.
26 +Any program that takes the option -odi and then text from stdin
27 +can be substituted. This is useful for redirecting reports
28 +to log files instead of mail. (Debian specific)
29 .LP
30 Note that an empty
31 .I arp.dat
32 Index: arpwatch/arpsnmp.c
33 diff -u arpwatch/arpsnmp.c:1.1.1.1.2.1 arpwatch/arpsnmp.c:1.1.1.1.2.1.2.1
34 --- arpwatch/arpsnmp.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001
35 +++ arpwatch/arpsnmp.c Tue Apr 17 13:49:16 2001
36 @@ -67,6 +67,7 @@
37 __dead void usage(void) __attribute__((volatile));
38
39 char *prog;
40 +char *path_sendmail = PATH_SENDMAIL;
41
42 extern int optind;
43 extern int opterr;
44 @@ -81,6 +82,7 @@
45 char options[] =
46 "d"
47 "f:"
48 + "s:"
49 ;
50
51 if ((cp = strrchr(argv[0], '/')) != NULL)
52 @@ -109,6 +111,10 @@
53 arpfile = optarg;
54 break;
55
56 + case 's':
57 + path_sendmail = optarg;
58 + break;
59 +
60 default:
61 usage();
62 }
63 @@ -188,6 +194,7 @@
64 char usage[] =
65 "[-d] "
66 "[-f datafile] "
67 + "[-s sendmail_path] "
68 "file [...]\n"
69 ;
70
71 Index: arpwatch/arpwatch.8
72 diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.4.1
73 --- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001
74 +++ arpwatch/arpwatch.8 Tue Apr 17 13:49:16 2001
75 @@ -44,6 +44,12 @@
76 .B -r
77 .I file
78 ]
79 +.br
80 +.ti +8
81 +[
82 +.B -s
83 +.I sendmail_path
84 +]
85 .ad
86 .SH DESCRIPTION
87 .B Arpwatch
88 @@ -93,6 +99,13 @@
89 of reading from the network. In this case,
90 .B arpwatch
91 does not fork.
92 +.LP
93 +The
94 +.B -s
95 +flag is used to specify the path to the sendmail program.
96 +Any program that takes the option -odi and then text from stdin
97 +can be substituted. This is useful for redirecting reports
98 +to log files instead of mail. (Debian specific)
99 .LP
100 Note that an empty
101 .I arp.dat
102 Index: arpwatch/arpwatch.c
103 diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.2.1
104 --- arpwatch/arpwatch.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001
105 +++ arpwatch/arpwatch.c Tue Apr 17 13:49:16 2001
106 @@ -106,6 +106,7 @@
107 #endif
108
109 char *prog;
110 +char *path_sendmail = PATH_SENDMAIL;
111
112 int can_checkpoint;
113 int swapped;
114 @@ -160,6 +161,7 @@
115 "n:"
116 "N"
117 "r:"
118 + "s:"
119 ;
120
121 if (argv[0] == NULL)
122 @@ -210,6 +212,10 @@
123 rfilename = optarg;
124 break;
125
126 + case 's':
127 + path_sendmail = optarg;
128 + break;
129 +
130 default:
131 usage();
132 }
133 @@ -761,7 +767,8 @@
134 "[-f datafile] "
135 "[-i interface] "
136 "[-n net[/width]] "
137 - "[-r file] "
138 + "[-r file]\n\t"
139 + "[-s sendmail_path] "
140 "\n"
141 ;
142
143 Index: arpwatch/report.c
144 diff -u arpwatch/report.c:1.1.1.1 arpwatch/report.c:1.1.1.1.4.1
145 --- arpwatch/report.c:1.1.1.1 Tue Apr 17 13:31:37 2001
146 +++ arpwatch/report.c Tue Apr 17 13:49:16 2001
147 @@ -235,6 +235,7 @@
148 report(register char *title, register u_int32_t a, register u_char *e1,
149 register u_char *e2, register time_t *t1p, register time_t *t2p)
150 {
151 + extern char *path_sendmail;
152 register char *cp, *hn;
153 register int fd, pid;
154 register FILE *f;
155 @@ -242,7 +243,7 @@
156 char *fmt = "%20s: %s\n";
157 char *watcher = WATCHER;
158 char *watchee = WATCHEE;
159 - char *sendmail = PATH_SENDMAIL;
160 + char *sendmail = path_sendmail;
161 char *unknown = "<unknown>";
162 char buf[132];
163 static int init = 0;
This page took 0.043706 seconds and 5 git commands to generate.