1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Add a -m option to specify the mail address to be used.

Bump PORTREVISION.

PR:		25288
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
This commit is contained in:
Brian Somers 2001-02-22 22:56:40 +00:00
parent 82c7f9761b
commit e77bf460a2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38620
24 changed files with 588 additions and 40 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a10
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,12 +1,39 @@
--- arpwatch.c.orig Sat Oct 14 04:07:35 2000
+++ arpwatch.c Wed Nov 22 08:40:40 2000
@@ -251,7 +251,7 @@
--- arpwatch.c.orig Thu Feb 22 22:47:29 2001
+++ arpwatch.c Thu Feb 22 22:47:29 2001
@@ -107,6 +107,8 @@
char *prog;
+char *Watcher = NULL;
+
int can_checkpoint;
int swapped;
int nobogons;
@@ -170,7 +172,7 @@
interface = NULL;
rfilename = NULL;
pd = NULL;
- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
+ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
switch (op) {
case 'd':
@@ -202,6 +204,10 @@
rfilename = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
}
@@ -751,6 +757,6 @@
- openlog(prog, 0, LOG_DAEMON);
+ openlog(prog, LOG_PID, LOG_DAEMON);
if (chdir(arpdir) < 0) {
syslog(LOG_ERR, "chdir(%s): %m", arpdir);
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
- " [-n net[/width]] [-r file]\n", prog);
+ " [-m email] [-n net[/width]] [-r file]\n", prog);
exit(1);
}

View File

@ -0,0 +1,20 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
+++ report.c Thu Feb 22 22:47:29 2001
@@ -70,6 +70,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+extern char *Watcher;
+
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
@@ -240,7 +242,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
- char *watcher = WATCHER;
+ char *watcher = Watcher ? Watcher : WATCHER;
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";

View File

@ -0,0 +1,39 @@
--- arpsnmp.c.orig Mon Jan 18 01:47:40 1999
+++ arpsnmp.c Thu Feb 22 22:47:29 2001
@@ -68,6 +68,8 @@
char *prog;
+char *Watcher;
+
extern int optind;
extern int opterr;
extern char *optarg;
@@ -90,7 +92,7 @@
}
opterr = 0;
- while ((op = getopt(argc, argv, "df:")) != EOF)
+ while ((op = getopt(argc, argv, "df:m:")) != EOF)
switch (op) {
case 'd':
@@ -105,6 +107,10 @@
arpfile = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
@@ -184,6 +190,6 @@
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr,
- "usage: %s [-d] [-f datafile] file [...]\n", prog);
+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
exit(1);
}

View File

@ -0,0 +1,25 @@
--- arpwatch.8.orig Sun Oct 8 21:31:28 2000
+++ arpwatch.8 Thu Feb 22 22:47:29 2001
@@ -38,6 +38,9 @@
.br
.ti +8
[
+.B -m
+.I email
+] [
.B -n
.IR net [/ width
]] [
@@ -69,6 +72,12 @@
The
.B -i
flag is used to override the default interface.
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
The
.B -n

View File

@ -0,0 +1,25 @@
--- arpsnmp.8.orig Sun Sep 17 21:34:48 2000
+++ arpsnmp.8 Thu Feb 22 22:47:29 2001
@@ -30,6 +30,9 @@
] [
.B -f
.I datafile
+] [
+.B -m
+.I email
]
.I file
[
@@ -54,6 +57,12 @@
flag is used to set the ethernet/ip address database filename.
The default is
.IR arp.dat .
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
Note that an empty
.I arp.dat

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a10
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,12 +1,39 @@
--- arpwatch.c.orig Sat Oct 14 04:07:35 2000
+++ arpwatch.c Wed Nov 22 08:40:40 2000
@@ -251,7 +251,7 @@
--- arpwatch.c.orig Thu Feb 22 22:47:29 2001
+++ arpwatch.c Thu Feb 22 22:47:29 2001
@@ -107,6 +107,8 @@
char *prog;
+char *Watcher = NULL;
+
int can_checkpoint;
int swapped;
int nobogons;
@@ -170,7 +172,7 @@
interface = NULL;
rfilename = NULL;
pd = NULL;
- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
+ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
switch (op) {
case 'd':
@@ -202,6 +204,10 @@
rfilename = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
}
@@ -751,6 +757,6 @@
- openlog(prog, 0, LOG_DAEMON);
+ openlog(prog, LOG_PID, LOG_DAEMON);
if (chdir(arpdir) < 0) {
syslog(LOG_ERR, "chdir(%s): %m", arpdir);
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
- " [-n net[/width]] [-r file]\n", prog);
+ " [-m email] [-n net[/width]] [-r file]\n", prog);
exit(1);
}

View File

@ -0,0 +1,20 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
+++ report.c Thu Feb 22 22:47:29 2001
@@ -70,6 +70,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+extern char *Watcher;
+
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
@@ -240,7 +242,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
- char *watcher = WATCHER;
+ char *watcher = Watcher ? Watcher : WATCHER;
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";

View File

@ -0,0 +1,39 @@
--- arpsnmp.c.orig Mon Jan 18 01:47:40 1999
+++ arpsnmp.c Thu Feb 22 22:47:29 2001
@@ -68,6 +68,8 @@
char *prog;
+char *Watcher;
+
extern int optind;
extern int opterr;
extern char *optarg;
@@ -90,7 +92,7 @@
}
opterr = 0;
- while ((op = getopt(argc, argv, "df:")) != EOF)
+ while ((op = getopt(argc, argv, "df:m:")) != EOF)
switch (op) {
case 'd':
@@ -105,6 +107,10 @@
arpfile = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
@@ -184,6 +190,6 @@
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr,
- "usage: %s [-d] [-f datafile] file [...]\n", prog);
+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
exit(1);
}

View File

@ -0,0 +1,25 @@
--- arpwatch.8.orig Sun Oct 8 21:31:28 2000
+++ arpwatch.8 Thu Feb 22 22:47:29 2001
@@ -38,6 +38,9 @@
.br
.ti +8
[
+.B -m
+.I email
+] [
.B -n
.IR net [/ width
]] [
@@ -69,6 +72,12 @@
The
.B -i
flag is used to override the default interface.
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
The
.B -n

View File

@ -0,0 +1,25 @@
--- arpsnmp.8.orig Sun Sep 17 21:34:48 2000
+++ arpsnmp.8 Thu Feb 22 22:47:29 2001
@@ -30,6 +30,9 @@
] [
.B -f
.I datafile
+] [
+.B -m
+.I email
]
.I file
[
@@ -54,6 +57,12 @@
flag is used to set the ethernet/ip address database filename.
The default is
.IR arp.dat .
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
Note that an empty
.I arp.dat

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a10
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,12 +1,39 @@
--- arpwatch.c.orig Sat Oct 14 04:07:35 2000
+++ arpwatch.c Wed Nov 22 08:40:40 2000
@@ -251,7 +251,7 @@
--- arpwatch.c.orig Thu Feb 22 22:47:29 2001
+++ arpwatch.c Thu Feb 22 22:47:29 2001
@@ -107,6 +107,8 @@
char *prog;
+char *Watcher = NULL;
+
int can_checkpoint;
int swapped;
int nobogons;
@@ -170,7 +172,7 @@
interface = NULL;
rfilename = NULL;
pd = NULL;
- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
+ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
switch (op) {
case 'd':
@@ -202,6 +204,10 @@
rfilename = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
}
@@ -751,6 +757,6 @@
- openlog(prog, 0, LOG_DAEMON);
+ openlog(prog, LOG_PID, LOG_DAEMON);
if (chdir(arpdir) < 0) {
syslog(LOG_ERR, "chdir(%s): %m", arpdir);
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
- " [-n net[/width]] [-r file]\n", prog);
+ " [-m email] [-n net[/width]] [-r file]\n", prog);
exit(1);
}

View File

@ -0,0 +1,20 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
+++ report.c Thu Feb 22 22:47:29 2001
@@ -70,6 +70,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+extern char *Watcher;
+
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
@@ -240,7 +242,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
- char *watcher = WATCHER;
+ char *watcher = Watcher ? Watcher : WATCHER;
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";

View File

@ -0,0 +1,39 @@
--- arpsnmp.c.orig Mon Jan 18 01:47:40 1999
+++ arpsnmp.c Thu Feb 22 22:47:29 2001
@@ -68,6 +68,8 @@
char *prog;
+char *Watcher;
+
extern int optind;
extern int opterr;
extern char *optarg;
@@ -90,7 +92,7 @@
}
opterr = 0;
- while ((op = getopt(argc, argv, "df:")) != EOF)
+ while ((op = getopt(argc, argv, "df:m:")) != EOF)
switch (op) {
case 'd':
@@ -105,6 +107,10 @@
arpfile = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
@@ -184,6 +190,6 @@
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr,
- "usage: %s [-d] [-f datafile] file [...]\n", prog);
+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
exit(1);
}

View File

@ -0,0 +1,25 @@
--- arpwatch.8.orig Sun Oct 8 21:31:28 2000
+++ arpwatch.8 Thu Feb 22 22:47:29 2001
@@ -38,6 +38,9 @@
.br
.ti +8
[
+.B -m
+.I email
+] [
.B -n
.IR net [/ width
]] [
@@ -69,6 +72,12 @@
The
.B -i
flag is used to override the default interface.
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
The
.B -n

View File

@ -0,0 +1,25 @@
--- arpsnmp.8.orig Sun Sep 17 21:34:48 2000
+++ arpsnmp.8 Thu Feb 22 22:47:29 2001
@@ -30,6 +30,9 @@
] [
.B -f
.I datafile
+] [
+.B -m
+.I email
]
.I file
[
@@ -54,6 +57,12 @@
flag is used to set the ethernet/ip address database filename.
The default is
.IR arp.dat .
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
Note that an empty
.I arp.dat

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a10
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,12 +1,39 @@
--- arpwatch.c.orig Sat Oct 14 04:07:35 2000
+++ arpwatch.c Wed Nov 22 08:40:40 2000
@@ -251,7 +251,7 @@
--- arpwatch.c.orig Thu Feb 22 22:47:29 2001
+++ arpwatch.c Thu Feb 22 22:47:29 2001
@@ -107,6 +107,8 @@
char *prog;
+char *Watcher = NULL;
+
int can_checkpoint;
int swapped;
int nobogons;
@@ -170,7 +172,7 @@
interface = NULL;
rfilename = NULL;
pd = NULL;
- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
+ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
switch (op) {
case 'd':
@@ -202,6 +204,10 @@
rfilename = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
}
@@ -751,6 +757,6 @@
- openlog(prog, 0, LOG_DAEMON);
+ openlog(prog, LOG_PID, LOG_DAEMON);
if (chdir(arpdir) < 0) {
syslog(LOG_ERR, "chdir(%s): %m", arpdir);
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
- " [-n net[/width]] [-r file]\n", prog);
+ " [-m email] [-n net[/width]] [-r file]\n", prog);
exit(1);
}

View File

@ -0,0 +1,20 @@
--- report.c.orig Sun Oct 1 00:41:10 2000
+++ report.c Thu Feb 22 22:47:29 2001
@@ -70,6 +70,8 @@
#define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+extern char *Watcher;
+
static int cdepth; /* number of outstanding children */
static char *fmtdate(time_t);
@@ -240,7 +242,7 @@
register FILE *f;
char tempfile[64], cpu[64], os[64];
char *fmt = "%20s: %s\n";
- char *watcher = WATCHER;
+ char *watcher = Watcher ? Watcher : WATCHER;
char *watchee = WATCHEE;
char *sendmail = PATH_SENDMAIL;
char *unknown = "<unknown>";

View File

@ -0,0 +1,39 @@
--- arpsnmp.c.orig Mon Jan 18 01:47:40 1999
+++ arpsnmp.c Thu Feb 22 22:47:29 2001
@@ -68,6 +68,8 @@
char *prog;
+char *Watcher;
+
extern int optind;
extern int opterr;
extern char *optarg;
@@ -90,7 +92,7 @@
}
opterr = 0;
- while ((op = getopt(argc, argv, "df:")) != EOF)
+ while ((op = getopt(argc, argv, "df:m:")) != EOF)
switch (op) {
case 'd':
@@ -105,6 +107,10 @@
arpfile = optarg;
break;
+ case 'm':
+ Watcher = optarg;
+ break;
+
default:
usage();
}
@@ -184,6 +190,6 @@
(void)fprintf(stderr, "Version %s\n", version);
(void)fprintf(stderr,
- "usage: %s [-d] [-f datafile] file [...]\n", prog);
+ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
exit(1);
}

View File

@ -0,0 +1,25 @@
--- arpwatch.8.orig Sun Oct 8 21:31:28 2000
+++ arpwatch.8 Thu Feb 22 22:47:29 2001
@@ -38,6 +38,9 @@
.br
.ti +8
[
+.B -m
+.I email
+] [
.B -n
.IR net [/ width
]] [
@@ -69,6 +72,12 @@
The
.B -i
flag is used to override the default interface.
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
The
.B -n

View File

@ -0,0 +1,25 @@
--- arpsnmp.8.orig Sun Sep 17 21:34:48 2000
+++ arpsnmp.8 Thu Feb 22 22:47:29 2001
@@ -30,6 +30,9 @@
] [
.B -f
.I datafile
+] [
+.B -m
+.I email
]
.I file
[
@@ -54,6 +57,12 @@
flag is used to set the ethernet/ip address database filename.
The default is
.IR arp.dat .
+.LP
+The
+.B -m
+flag specifies the address that will receive the emails.
+The default is
+.IR root .
.LP
Note that an empty
.I arp.dat