hns - 日記自動生成システム - Version 2.19.7

void GraphicWizardsLair( void ); //

otsune GWL
FreeBSD, AfterEffects, RETAS, animo, DigitalAnime, Linux, Mac OS, Win2k

[Who is otsune?] [title] [message] [Policy] [注目エントリー] [top]
Twitter Status :


Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい

検索式:

先月 2003年09月 来月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30


2003年09月23日(火) [長年日記]

#12 [unix] arpwatchのdaemontool patchをportsにまとめてみた

--- Makefile.orig    Tue May 13 02:41:35 2003
+++ Makefile    Tue Sep 23 21:56:53 2003
@@ -34,6 +34,6 @@
		${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/arpwatch/.;  \
	done
	${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${PREFIX}/arpwatch/.
-	${INSTALL_SCRIPT} ${FILESDIR}/arpwatch.sh ${PREFIX}/etc/rc.d/.
+	${INSTALL_SCRIPT} ${FILESDIR}/arpwatch.sh.sample ${PREFIX}/etc/rc.d/.

 .include <bsd.port.mk>
--- pkg-plist.orig   Thu Aug 23 23:45:02 2001
+++ pkg-plist   Tue Sep 23 21:57:06 2003
@@ -5,7 +5,7 @@
 arpwatch/d.awk
 arpwatch/e.awk
 arpwatch/p.awk
-etc/rc.d/arpwatch.sh
+etc/rc.d/arpwatch.sh.sample
 @unexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat
 @exec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat
 @dirrm arpwatch
files/patch-ag
--- arpwatch.c  Sat Oct 14 11:07:35 2000
+++ arpwatch.c  Tue Sep 23 21:53:53 2003
@@ -107,6 +107,8 @@
 
 char *prog;
 
+char *Watcher = NULL;
+
 int can_checkpoint;
 int swapped;
 int nobogons;
@@ -153,6 +155,7 @@
        register char *interface, *rfilename;
        struct bpf_program code;
        char errbuf[PCAP_ERRBUF_SIZE];
+       int nofork = 0;
 
        if (argv[0] == NULL)
                prog = "arpwatch";
@@ -170,9 +173,12 @@
        interface = NULL;
        rfilename = NULL;
        pd = NULL;
-       while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
+       while ((op = getopt(argc, argv, "dFf:i:m:n:Nr:")) != EOF)
                switch (op) {
 
+               case 'F':
+                       nofork = 1;
+                       break;
                case 'd':
                        ++debug;
 #ifndef DEBUG
@@ -202,6 +208,10 @@
                        rfilename = optarg;
                        break;
 
+               case 'm':
+                       Watcher = optarg;
+                       break;
+
                default:
                        usage();
                }
@@ -229,7 +239,7 @@
                }
 
                /* Drop into the background if not debugging */
-               if (!debug) {
+               if (!debug && !nofork) {
                        pid = fork();
                        if (pid < 0) {
                                syslog(LOG_ERR, "main fork(): %m");
@@ -750,7 +760,7 @@
        extern char version[];
 
        (void)fprintf(stderr, "Version %s\n", version);
-       (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
-           " [-n net[/width]] [-r file]\n", prog);
+       (void)fprintf(stderr, "usage: %s [-dNF] [-f datafile] [-i interface]"
+           " [-m email] [-n net[/width]] [-r file]\n", prog);
        exit(1);
 }
files/patch-aj
--- arpwatch.8  Mon Oct  9 05:31:28 2000
+++ arpwatch.8  Tue Sep 23 21:52:18 2003
@@ -27,7 +27,7 @@
 .na
 .B arpwatch
 [
-.B -dN
+.B -dNF
 ] [
 .B -f
 .I datafile
@@ -38,6 +38,9 @@
 .br
 .ti +8
 [
+.B -m
+.I email
+] [
 .B -n
 .IR net [/ width
 ]] [
@@ -61,6 +64,11 @@
 .IR stderr .
 .LP
 The
+.B -F
+flag is used to prevent detaching. It is useful to run arpwatch from
+daemontools.
+.LP
+The
 .B -f
 flag is used to set the ethernet/ip address database filename.
 The default is
@@ -69,6 +77,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
Permalink: http://www.otsune.com/diary/2003/09/23/12.html#2003092312
trackback
このエントリーを含むはてなブックマーク del.icio.us livedoor Clip View blog reactions
Last Updated 2003-09-23 00:00:00 By otsune