Created attachment 201869 [details]
add custom startup options to /etc/rc.d/rpcbind
just like mountd, lockd, statd and nfsd, rpcbind supports the -h flag to bind to a specific address.
The rc.d scripts for all the components mentioned above support adding custom startup flags in /etc/rc.conf, except rpcbind, where this is missing.
I propose extending the /etc/rc.d/rpcbind script as detailed in the attached patch.
I'll take this PR.
Are you sure this is needed? It already works without the patch.
slippy# grep rpcbind /etc/rc.conf
rpcbind_program="/usr/sbin/rpcbind" # path to rpcbind, if you want a different one.
rpcbind_flags="-L" # Flags to rpcbind (if enabled).
slippy# ps auxww | grep rpcbind | grep -v grep
root 1527 0.0 0.0 11520 2016 - Ss 13:09 0:00.09 /usr/sbin/rpcbind -L
(In reply to Cy Schubert from comment #2)
You are right. I think I got confused because of another issue (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235623).
I was looking into reasons why rpcbind would be listening on INADDR_ANY on my box, so I thought the -h <address> flag might not be passed on.
And there was the fact, that the xyz_flags stuff is present explicitly in e.g. /etc/rc.d/nfsd, but not in /etc/rc.d/rpcbind.
A look in
would have shown me.
No worries. But thanks for bringing this to our attention. There are scripts that set rc_flags extraneously. I'll put together a revision to remove the tautology in the other scripts.
Checked. The other rc scripts do the right thing, there is no low hanging fruit.