Page MenuHomeFreeBSD

rc: Fix kldxref script
AbandonedPublic

Authored by jlduran on Mar 17 2025, 8:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 8, 1:40 PM
Unknown Object (File)
Wed, May 6, 7:58 PM
Unknown Object (File)
Wed, May 6, 7:13 AM
Unknown Object (File)
Thu, Apr 30, 9:13 AM
Unknown Object (File)
Apr 5 2026, 3:38 AM
Unknown Object (File)
Jan 28 2026, 11:21 PM
Unknown Object (File)
Jan 28 2026, 9:59 PM
Unknown Object (File)
Dec 13 2025, 5:06 PM
Subscribers

Details

Reviewers
emaste
trasz
Group Reviewers
rc
Summary
  • Promote checking kldxref_clobber to a top-level guard, to avoid further processing if it is set to "NO" (the default)
  • Check if the module directory contains "*.ko" files, if it does, generate the linker.hints file in the module directory
  • Use $(...) notation instead of legacy backticks ...

Fixes: 2b55bea5380b ("Make /etc/rc.d/kldxref not print anything for directories that don't contain any kernel modules. This makes the common case completely silent, as it should be.")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62945
Build 59829: arc lint + arc unit

Event Timeline

I think this is fine. backticks and checkyesno moving are minor improvements (arguably not bugs).

I think the problem could also be fixed with [ "$(echo ${MODULE_DIR}/*.ko)" != "${MODULE_DIR}/*.ko" ] if we want to continue avoiding the extra process invocation. Is there a PR for it?

I think this is fine. backticks and checkyesno moving are minor improvements (arguably not bugs).

I think the problem could also be fixed with [ "$(echo ${MODULE_DIR}/*.ko)" != "${MODULE_DIR}/*.ko" ] if we want to continue avoiding the extra process invocation. Is there a PR for it?

No, I will open one first. I'll abandon this revision.
I was working on some sh improvements, and this rc script was generating noise.