From 6fc6d689b3a754c1f3f26ea0b9d6ff048c9faa90 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 3 Apr 2005 11:37:43 +0000 Subject: add arpwatch and nocatsplash git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@539 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../arpwatch/patches/011_debian_opt_sendmail_path | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 package/arpwatch/patches/011_debian_opt_sendmail_path (limited to 'package/arpwatch/patches/011_debian_opt_sendmail_path') diff --git a/package/arpwatch/patches/011_debian_opt_sendmail_path b/package/arpwatch/patches/011_debian_opt_sendmail_path new file mode 100644 index 000000000..4b2014db3 --- /dev/null +++ b/package/arpwatch/patches/011_debian_opt_sendmail_path @@ -0,0 +1,163 @@ +Index: arpwatch/arpsnmp.8 +diff -u arpwatch/arpsnmp.8:1.1.1.1 arpwatch/arpsnmp.8:1.1.1.1.4.1 +--- arpwatch/arpsnmp.8:1.1.1.1 Tue Apr 17 13:31:36 2001 ++++ arpwatch/arpsnmp.8 Tue Apr 17 13:49:16 2001 +@@ -30,7 +30,12 @@ + ] [ + .B -f + .I datafile ++] [ ++.B -s ++.I sendmail_path + ] ++.br ++.ti +8 + .I file + [ + .I ... +@@ -54,6 +59,13 @@ + flag is used to set the ethernet/ip address database filename. + The default is + .IR arp.dat . ++.LP ++The ++.B -s ++flag is used to specify the path to the sendmail program. ++Any program that takes the option -odi and then text from stdin ++can be substituted. This is useful for redirecting reports ++to log files instead of mail. (Debian specific) + .LP + Note that an empty + .I arp.dat +Index: arpwatch/arpsnmp.c +diff -u arpwatch/arpsnmp.c:1.1.1.1.2.1 arpwatch/arpsnmp.c:1.1.1.1.2.1.2.1 +--- arpwatch/arpsnmp.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001 ++++ arpwatch/arpsnmp.c Tue Apr 17 13:49:16 2001 +@@ -67,6 +67,7 @@ + __dead void usage(void) __attribute__((volatile)); + + char *prog; ++char *path_sendmail = PATH_SENDMAIL; + + extern int optind; + extern int opterr; +@@ -81,6 +82,7 @@ + char options[] = + "d" + "f:" ++ "s:" + ; + + if ((cp = strrchr(argv[0], '/')) != NULL) +@@ -109,6 +111,10 @@ + arpfile = optarg; + break; + ++ case 's': ++ path_sendmail = optarg; ++ break; ++ + default: + usage(); + } +@@ -188,6 +194,7 @@ + char usage[] = + "[-d] " + "[-f datafile] " ++ "[-s sendmail_path] " + "file [...]\n" + ; + +Index: arpwatch/arpwatch.8 +diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.4.1 +--- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001 ++++ arpwatch/arpwatch.8 Tue Apr 17 13:49:16 2001 +@@ -44,6 +44,12 @@ + .B -r + .I file + ] ++.br ++.ti +8 ++[ ++.B -s ++.I sendmail_path ++] + .ad + .SH DESCRIPTION + .B Arpwatch +@@ -93,6 +99,13 @@ + of reading from the network. In this case, + .B arpwatch + does not fork. ++.LP ++The ++.B -s ++flag is used to specify the path to the sendmail program. ++Any program that takes the option -odi and then text from stdin ++can be substituted. This is useful for redirecting reports ++to log files instead of mail. (Debian specific) + .LP + Note that an empty + .I arp.dat +Index: arpwatch/arpwatch.c +diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.2.1 +--- arpwatch/arpwatch.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001 ++++ arpwatch/arpwatch.c Tue Apr 17 13:49:16 2001 +@@ -106,6 +106,7 @@ + #endif + + char *prog; ++char *path_sendmail = PATH_SENDMAIL; + + int can_checkpoint; + int swapped; +@@ -160,6 +161,7 @@ + "n:" + "N" + "r:" ++ "s:" + ; + + if (argv[0] == NULL) +@@ -210,6 +212,10 @@ + rfilename = optarg; + break; + ++ case 's': ++ path_sendmail = optarg; ++ break; ++ + default: + usage(); + } +@@ -761,7 +767,8 @@ + "[-f datafile] " + "[-i interface] " + "[-n net[/width]] " +- "[-r file] " ++ "[-r file]\n\t" ++ "[-s sendmail_path] " + "\n" + ; + +Index: arpwatch/report.c +diff -u arpwatch/report.c:1.1.1.1 arpwatch/report.c:1.1.1.1.4.1 +--- arpwatch/report.c:1.1.1.1 Tue Apr 17 13:31:37 2001 ++++ arpwatch/report.c Tue Apr 17 13:49:16 2001 +@@ -235,6 +235,7 @@ + report(register char *title, register u_int32_t a, register u_char *e1, + register u_char *e2, register time_t *t1p, register time_t *t2p) + { ++ extern char *path_sendmail; + register char *cp, *hn; + register int fd, pid; + register FILE *f; +@@ -242,7 +243,7 @@ + char *fmt = "%20s: %s\n"; + char *watcher = WATCHER; + char *watchee = WATCHEE; +- char *sendmail = PATH_SENDMAIL; ++ char *sendmail = path_sendmail; + char *unknown = ""; + char buf[132]; + static int init = 0; -- cgit v1.2.3