Bug 235621 - rpcbind script in /etc/rc.d lacks support for custom startup params
Summary: rpcbind script in /etc/rc.d lacks support for custom startup params
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
Keywords: patch
Depends on:
Reported: 2019-02-09 15:09 UTC by Martin Waschbüsch
Modified: 2019-02-10 20:08 UTC (History)
2 users (show)

See Also:

add custom startup options to /etc/rc.d/rpcbind (477 bytes, patch)
2019-02-09 15:09 UTC, Martin Waschbüsch
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_committer 2019-02-10 19:10:55 UTC
I'll take this PR.
Comment 2 Cy Schubert freebsd_committer 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_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
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.

Comment 4 Cy Schubert freebsd_committer 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 freebsd_committer 2019-02-10 20:08:36 UTC
Checked. The other rc scripts do the right thing, there is no low hanging fruit.