Page MenuHomeFreeBSD

rc.d/nscd: Avoid using setvar
Needs ReviewPublic

Authored by temcbun_gmail.com on Feb 3 2026, 8:38 PM.
Referenced Files
F156941205: D55091.id.diff
Sun, May 17, 12:45 PM
F156829895: D55091.id171108.diff
Sat, May 16, 6:33 PM
Unknown Object (File)
Thu, May 14, 8:56 AM
Unknown Object (File)
Wed, May 13, 4:18 PM
Unknown Object (File)
Mon, May 11, 2:01 PM
Unknown Object (File)
Mon, May 11, 4:38 AM
Unknown Object (File)
Sat, May 9, 4:29 PM
Unknown Object (File)
Sat, May 9, 4:22 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

temcbun_gmail.com 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).