Date: Mon, 16 Dec 2019 22:31:02 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 242673] net-mgmt/arpwatch: rc script breaks when arpwatch_interfaces contains a dot Message-ID: <bug-242673-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242673 Bug ID: 242673 Summary: net-mgmt/arpwatch: rc script breaks when arpwatch_interfaces contains a dot Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: leres@freebsd.org Reporter: dd@goboomtown.com Assignee: leres@freebsd.org Flags: maintainer-feedback?(leres@freebsd.org) Hi, I just installed the 3.0 update and found a bug. Here=E2=80=99s how we con= figure arpwatch on our firewalls: [dd@fw1 etc]$ grep arpwatch /etc/rc.conf arpwatch_enable=3D"YES" arpwatch_interfaces=3D"lagg0.6 lagg0.7 lagg0.10" Here=E2=80=99s what happened on start: [dd@fw1 dd]$ sudo service arpwatch start Starting arpwatch. Version 3.0 usage: arpwatch [-CdFNpqsvzZ] [-D arpdir] [-f datafile] [-i interface] [-P pidfile] [-w watcher@email] [-W watchee@email] [-n net[/width]] [-x net[/width]] [-r file] /usr/local/etc/rc.d/arpwatch: WARNING: failed to start arpwatch Starting arpwatch. Version 3.0 usage: arpwatch [-CdFNpqsvzZ] [-D arpdir] [-f datafile] [-i interface] [-P pidfile] [-w watcher@email] [-W watchee@email] [-n net[/width]] [-x net[/width]] [-r file] /usr/local/etc/rc.d/arpwatch: WARNING: failed to start arpwatch Starting arpwatch. Version 3.0 usage: arpwatch [-CdFNpqsvzZ] [-D arpdir] [-f datafile] [-i interface] [-P pidfile] [-w watcher@email] [-W watchee@email] [-n net[/width]] [-x net[/width]] [-r file] /usr/local/etc/rc.d/arpwatch: WARNING: failed to start arpwatch Turns out it was a simple bug in the `eval` of the rc.d/arpwatch script.=20 Here=E2=80=99s what fixed it for me: [dd@fw1 etc]$ diff -u rc.d/arpwatch.bad rc.d/arpwatch --- rc.d/arpwatch.bad 2019-12-16 02:02:32.000000000 -0800 +++ rc.d/arpwatch 2019-12-16 12:33:12.376475000 -0800 @@ -47,7 +47,8 @@ if [ $cmd =3D=3D start ]; then prep_datfile ${fn} fi - eval options=3D\$arpwatch_${interface}_options + options_interface=3D`echo ${interface} | tr '.' '_'` + eval options=3D\$arpwatch_${options_interface}_options command_args=3D"-i ${interface} -f ${fn} -P ${pidfile} ${options}" } My fix is probably a bit primitive, but should help someone make the perman= ent fix. Thanks, Daniel --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242673-7788>