Bug 102509

Summary: [patch] the rc script of net-mgmt/arpwatch does not work correctly when multiple interfaces are to be monitored
Product: Ports & Packages Reporter: Jordan Gordeev <jgordeev>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Jordan Gordeev 2006-08-25 19:40:24 UTC
The rc script of arpwatch sets the arpwatch_interfaces variable to an empty
value and then calls load_rc_config. But if _rc_conf_loaded is true when the rc
script is executed, and this happens upon reboot, the value of variable
arpwatch_interfaces is set by rc.conf, then it is cleared in the rc script and
then the call to load_rc_config does not reload its value. The result is that
if arpwatch_interfaces is set in /etc/rc.conf to a list of two or more
interfaces then upon reboot, the script misbehaves and only one process is
started.

Fix: The following simple fix solves the problem.


. /etc/rc.subr--4NHeE5gkhOIj0UHA02F3ayWEMExXtFDF8cb3dPMUMeIOomGg
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- arpwatch.old        Fri Aug 25 21:13:09 2006
+++ arpwatch    Fri Aug 25 21:13:41 2006
@@ -12,7 +12,6 @@
 #
 arpwatch_enable=${arpwatch_enable:-"NO"}
 arpwatch_dir="/usr/local/arpwatch/"
-arpwatch_interfaces=
How-To-Repeat: Install arpwatch, set arpwatch_enable="YES" and arwpatch_interfaces="fxp0 fxp1"
in /etc/rc.conf and reboot the machine. Then check thath only one arpwatch
process is running.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-08-25 19:40:34 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 thomasa 2006-08-26 05:55:12 UTC
I concur with this patch, please commit.

Thomas
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-08-26 06:32:57 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2006-08-28 17:23:24 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 5 Eugene Grosbein 2006-08-28 18:53:40 UTC
Hi!

There is one more issue with this script, it does not analyzes its
options for 'faststart' and 'restart' cases. For details please look at
http://www.freebsd.org/cgi/query-pr.cgi?pr=102600 that contains
more complete patch.

Eugene Grosbein
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2006-08-28 19:03:07 UTC
Eugene Grosbein p=ED=B9e v =FAt 29. 08. 2006 v 01:53 +0800:
> Hi!
>=20
> There is one more issue with this script, it does not analyzes its
> options for 'faststart' and 'restart' cases. For details please look at
> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D102600 that contains
> more complete patch.

Seen it.

The faststart issue seems to be already addressed in the port.

As for the PR, it's pending maintainer's approval/reaction.

--=20
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Angband in action! Constant escalation to new depths to find angrier,
meaner letters and more punctuation!
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2006-09-03 11:48:02 UTC
   ----- Transcript of session follows -----
... while talking to relay2.grosbein.pp.ru.:
>>> DATA
<<< 450 4.0.0 <eugen@grosbein.pp.ru>... You are still not in my white list. Please try later.
<eugen@grosbein.pp.ru>... Deferred: 450 4.0.0 <eugen@grosbein.pp.ru>... You are still not in my white list. Please try later.
<<< 503 5.0.0 Need RCPT (recipient)
Message could not be delivered for 5 days
Message will be deleted from queue