Created attachment 272517 [details] Moving the rc_flags variable assignment Upgraded a NFS server from 14.4-RELEASE to 15.1-RELEASE and rpc.lockd and rpc.statd stopped responding to remote machines. The reason they stopped responding is the port they were talking on was not the predefined port I had listed in the firewall rules and added to the rpc_*_flags variables in /etc/rc.conf This is my setup: rpc_lockd_enable="YES" rpc_lockd_flags="-p 701" rpc_statd_enable="YES" rpc_statd_flags="-p 645" On a freshly installed 15.1-RELEASE, it would startup them w/o the -p <PORT> options. 100024 1 udp 901 status 100024 1 tcp 901 status 100021 0 udp 858 nlockmgr 100021 0 tcp 865 nlockmgr 100021 1 udp 858 nlockmgr 100021 1 tcp 865 nlockmgr 100021 3 udp 858 nlockmgr 100021 3 tcp 865 nlockmgr 100021 4 udp 858 nlockmgr 100021 4 tcp 865 nlockmgr pirzyk@qube:/etc/rc.d 21>p|g statd root 2436 0.9 0.1 276288 3012 - Ss 17:22 0:00.00 /usr/sbin/rpc.statd Found that the rpc_{statd|lockd}_flags was set right before the run_rc_command call, but in the /etc/rc.d/mountd script, it is set in the *_precmd() subroutine. Moved the call to set rc_flags= in both scripts to the *_precmd() subroutine and now it is working as expected: pirzyk@qube:/etc/rc.d 101>p|g -E 'statd|lockd' root 8777 0.0 0.1 14200 2988 - Ss 15:06 0:00.00 /usr/sbin/rpc.lockd -p 701 root 8891 0.0 0.1 276288 3016 - Is 15:06 0:00.00 /usr/sbin/rpc.statd -p 645
Created attachment 272518 [details] same patch but for /etc/rc.d/lockd
^Triage: this does not reflect the current content of these files. On my machine I have: : ${lockd_flags:="${rpc_lockd_flags}"} : ${statd_flags:="${rpc_statd_flags}"} for the lines you are trying to modify here. This change was done by netchild@FreeBSD.org 2026-06-27 13:44:33 +0000.
Hi Mark, I am not saying those lines don't exist, what I am saying is they are not in the right location anymore for what ever reason. as for the leading : (colon) I am not sure that is an artifact of how you are formatting the contents or is that in the file itself. If the latter, then I would ask why didn't the freebsd-update -r 15.1-RELASE upgrade process not update the /etc/rc.d/statd and /etc/rc.d/lockd files from what was in 14.4-RELEASE (-p7). If the former (i.e. a formatting style issue), then what I did was just move the location of where rc_flags got set into the {statd|lockd}_precmd() routine.
Oh and yes these are older files, the id lines show this: (statd) # FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp (lockd) # FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm
(In reply to Jim Pirzyk from comment #3) the colon? Please see the following commits: https://cgit.freebsd.org/src/commit/libexec/rc/rc.d/lockd?id=d05d60e958bca778ea193932facb026c48d7ca0b https://cgit.freebsd.org/src/commit/libexec/rc/rc.d/statd?id=d05d60e958bca778ea193932facb026c48d7ca0b That's what's in those files right now. Committed by netchild@ on 2026-06-27 13:44:33 +0000. That's what you need to rebase your diff against.
Um, the diff is against the 14.4-RELEASE-p7 version. If freebsd-update didn't replace that version with what was shipped with 15.1, it is mot my job to rebase the patch against something that failed.