From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 6 13:10:15 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7444016A4F1 for ; Sun, 6 Aug 2006 13:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E004743D53 for ; Sun, 6 Aug 2006 13:10:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k76DAEgi077690 for ; Sun, 6 Aug 2006 13:10:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k76DAE1n077688; Sun, 6 Aug 2006 13:10:14 GMT (envelope-from gnats) Resent-Date: Sun, 6 Aug 2006 13:10:14 GMT Resent-Message-Id: <200608061310.k76DAE1n077688@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jordan Gordeev Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D2116A4E0 for ; Sun, 6 Aug 2006 13:07:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39A5343D45 for ; Sun, 6 Aug 2006 13:07:20 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k76D7JqN028792 for ; Sun, 6 Aug 2006 13:07:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k76D7Jur028790; Sun, 6 Aug 2006 13:07:19 GMT (envelope-from nobody) Message-Id: <200608061307.k76D7Jur028790@www.freebsd.org> Date: Sun, 6 Aug 2006 13:07:19 GMT From: Jordan Gordeev To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/101462: [patch] bug in rc script of net-mgmt/arpwatch when multiple interfaces should be monitored X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Aug 2006 13:10:15 -0000 >Number: 101462 >Category: ports >Synopsis: [patch] bug in rc script of net-mgmt/arpwatch when multiple interfaces should be monitored >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 06 13:10:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jordan Gordeev >Release: 6.1-RELEASE >Organization: >Environment: >Description: When the variable "arpwatch_interfaces" is set to a list of interfaces in /etc/rc.conf and "arpwatch_enable" is set to "YES" the rc script of arpwatch should start multiple copies of arpwatch, one for each interface. But upon reboot the rc script is normally called with "faststart" (not "start") as the sole argument, which the script does not handle correctly. As a result only one copy of arpwatch is started, with no arguments. >How-To-Repeat: Set the following in /etc/rc.conf: arpwatch_enable="YES" arpwatch_interfaces="fxp0 rl0" #a list of two or more interfaces Then reboot the machine. Alternatively try starting arpwatch with "/usr/local/etc/rc.d/arpwatch faststart" After the reboot verify that only one copy of arpwatch is running. >Fix: The simplest fix is to make the rc script handle "faststart" the same as "start". A patch follows. --- arpwatch.old Sun Aug 6 15:02:21 2006 +++ arpwatch Sun Aug 6 15:10:59 2006 @@ -63,7 +63,7 @@ ;; *) - if [ "$1" = "start" ]; then + if [ "$1" = "start" -o "$1" = "faststart" ]; then for interface in ${arpwatch_interfaces}; do eval options=\$arpwatch_${interface}_options command_args="-i ${interface} ${options} -f arp.${interface}.dat" Another fix is to rewrite the rc script or rewrite arpwatch so that single process monitors multiple interfaces. >Release-Note: >Audit-Trail: >Unformatted: