|Summary:||rpcbind script in /etc/rc.d lacks support for custom startup params|
|Product:||Base System||Reporter:||Martin Waschbüsch <martin>|
|Component:||conf||Assignee:||Cy Schubert <cy>|
|Status:||Closed Not A Bug|
|Severity:||Affects Some People||CC:||cy, rc|
Description Martin Waschbüsch 2019-02-09 15:09:24 UTC
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.
Comment 1 Cy Schubert 2019-02-10 19:10:55 UTC
I'll take this PR.
Comment 2 Cy Schubert 2019-02-10 19:40:31 UTC
Are you sure this is needed? It already works without the patch. slippy# grep rpcbind /etc/rc.conf rpcbind_enable="YES" 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 slippy#
Comment 3 Martin Waschbüsch 2019-02-10 19:53:31 UTC
(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 man rc.conf would have shown me. Apologies!
Comment 4 Cy Schubert 2019-02-10 19:59:40 UTC
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.
Comment 5 Cy Schubert 2019-02-10 20:08:36 UTC
Checked. The other rc scripts do the right thing, there is no low hanging fruit.