Page MenuHomeFreeBSD

rc.d/nscd: Avoid using setvar
Needs ReviewPublic

Authored by tembun_bk.ru on Feb 3 2026, 8:38 PM.
Referenced Files
Unknown Object (File)
Wed, Mar 4, 2:21 AM
Unknown Object (File)
Sat, Feb 28, 8:26 AM
Unknown Object (File)
Tue, Feb 24, 2:56 AM
Unknown Object (File)
Mon, Feb 23, 1:14 AM
Unknown Object (File)
Feb 21 2026, 7:14 AM
Unknown Object (File)
Feb 19 2026, 6:18 AM
Unknown Object (File)
Feb 17 2026, 3:56 PM
Unknown Object (File)
Feb 9 2026, 9:21 PM
Subscribers

Details

Reviewers
0mp
markj
cy
Group Reviewers
Contributor Reviews (src)
Summary

setvar is a non-standard feature of sh(1) and thus is not portable.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tembun_bk.ru added a reviewer: cy.

I don't think there's any expectation that the rc scripts will be portable, but when there's no material difference (e.g. in performance, clarity, maintainability, etc.) I agree we should indeed prefer the portable way.

I don't think there's any expectation that the rc scripts will be portable, but when there's no material difference (e.g. in performance, clarity, maintainability, etc.) I agree we should indeed prefer the portable way.

I also think so. Besides, the rest of the rc scripts are using this construction instead of setvar. It lingers around only in two places: here and in rc.subr (https://reviews.freebsd.org/D55086).