Page MenuHomeFreeBSD

rc: Fix kldxref script
AbandonedPublic

Authored by jlduran on Mar 17 2025, 8:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 7, 6:45 AM
Unknown Object (File)
Sep 17 2025, 11:49 PM
Unknown Object (File)
Sep 12 2025, 2:18 AM
Unknown Object (File)
Aug 11 2025, 12:44 AM
Unknown Object (File)
Jul 29 2025, 12:34 AM
Unknown Object (File)
Jul 12 2025, 5:44 AM
Unknown Object (File)
Jul 11 2025, 8:47 PM
Unknown Object (File)
Jul 6 2025, 9:59 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.