Created attachment 187907 [details] svn diff agains PORTSDIR containing the new port The parpd daemon provide the missing ARP packets in non-broadcast multiple-access networks with overly strict first-hop security filters. WWW: https://lutz.donnerhacke.de/Projekte/parpd It may be useful for others, too.
Created attachment 187966 [details] updated svn diff
Fixed some bugs in the rc-script: - choose better REQUIRE target - dynamically computed name/rcvar breaks service(8) - fixed bug in default setting of configration
@lutz, are you still interested in porting this?
Of course, please continue. Can you please tell me, if there are any show stoppers, errors, or possible enhancements?
(In reply to lutz from comment #4) What I’d change would be ${MAN8PREFIX}/man/man8 to ${MANDIRS}/man8 I tried the rc-script inside poudriere and it gave can not find the configuration file
(In reply to Nathan from comment #5) > What I’d change would be ${MAN8PREFIX}/man/man8 to ${MANDIRS}/man8 No, it's correct as is. MANDIRS (as the name implies) can be multiple directories. +eval ": \${${name}_enable:='NO'}" +eval ": \${${name}_flags:=%%PREFIX%%/etc/${name}.conf}" +eval "config_file=\$${name}_flags" + +[ -s "$config_file" ] || err 1 "Missing configuration file '$config_file'" + +if get_pidfile_from_conf pidfile "$config_file"; then + pidfile="$_pidfile_from_conf" +else + err 1 "$config_file does not specify an pidfile" +fi This looks dubious to me. Can you put this in a start_precmd instead? Otherwise this LGTM.
To answer the question about deriving the configuration filename from the rc-script name: The typical use case for this daemon is to be run on various interfaces simultaneously. So different versions of this script need refer to different versions of the configuration file (and use the different PID file from those configs). That's why it is a global setting in the script, not only a startup one. OTOH the error message is a bad behavior. It is called every time the (unconfigured) script is invoked (i.e. during boot) Do you have a suggestions how to handle this?
I'm giving it back to the pool. I won't have time to look deeper into it. Sorry :-(
A commit references this bug: Author: tobik Date: Fri Jan 25 08:22:48 UTC 2019 New revision: 491134 URL: https://svnweb.freebsd.org/changeset/ports/491134 Log: New port: net/parpd The parpd daemon provide the missing ARP packets in non-broadcast multiple-access networks with overly strict first-hop security filters. WWW: https://lutz.donnerhacke.de/Projekte/parpd PR: 223594 Submitted by: lutz@donnerhacke.de Changes: head/net/Makefile head/net/parpd/ head/net/parpd/Makefile head/net/parpd/distinfo head/net/parpd/files/ head/net/parpd/files/parpd.in head/net/parpd/pkg-descr
FWIW, I still think the rc script is not quite right, but the script seems to work and the bug has been open for way too long and nobody has chimed in to help here, so committed. Thank you.