Page MenuHomeFreeBSD

freebsd-update(8): Use kern.module_path
ClosedPublic

Authored by fernape on Mon, Apr 15, 12:20 PM.
Tags
None
Referenced Files
F82546553: D44797.id137399.diff
Tue, Apr 30, 3:03 AM
Unknown Object (File)
Sat, Apr 27, 7:29 AM
Unknown Object (File)
Fri, Apr 26, 8:38 PM
Unknown Object (File)
Fri, Apr 26, 5:11 AM
Unknown Object (File)
Sun, Apr 21, 7:34 AM
Unknown Object (File)
Tue, Apr 16, 7:22 PM
Unknown Object (File)
Mon, Apr 15, 12:25 PM
Subscribers

Details

Summary

Instead of tailored configuration files to look for module_path entries.

Reported by: kevans@

Test Plan

Just try freebsd-update fetch upgrade

(yes, without the -r so the process will abort after the information message)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei added inline comments.
usr.sbin/freebsd-update/freebsd-update.sh
677

The following is from x86_64 QEMU VM:

# sysctl kern.module_path | cut -f2 -d\" | tr ";" "|"
/boot/kernel|/boot/modules|/boot/dtb|/boot/dtb/overlays

IIUC, 3rd party modules are not going to be installed into /boot/kernel . I'm not familiar with dtb parts, but I'd ask for confirmation if 3rd party modules will be installed into /boot/dtb or `/boot/dtb/overlays' ?

usr.sbin/freebsd-update/freebsd-update.sh
677

Likely not, but if they are then the same caveat applies -- the kernel and dtb are generally pretty closely coupled, and there's some risk if you end up upgrading one without the other.

Also, the cut step of the pipe can go away; use sysctl -n kern.module_path to omit the sysctl name and just get the value

679–680
This revision is now accepted and ready to land.Mon, Apr 15, 4:10 PM
usr.sbin/freebsd-update/freebsd-update.sh
677

Likely not, but if they are then the same caveat applies -- the kernel and dtb are generally pretty closely coupled, and there's some risk if you end up upgrading one without the other.

Looks sane :)

Also, the cut step of the pipe can go away; use sysctl -n kern.module_path to omit the sysctl name and just get the value

usr.sbin/freebsd-update/freebsd-update.sh
679–680

Why? An empty sysctl is likely wrong, but loader.conf doesn't need any notion of a default because /boot/loader should always be passing it into the kernel for it to set it...

  • freebsd-update(8): Use kern.module_path
  • Address imp's comment.
This revision now requires review to proceed.Tue, Apr 16, 4:28 PM
usr.sbin/freebsd-update/freebsd-update.sh
680–682

An empty kern.module_path should not happen. So does it ( an empty kern.module_path ) deserve an informative message ? Just in case ...

  • Add warning message when kern.module_path is empty
This revision is now accepted and ready to land.Thu, Apr 18, 2:36 PM
This revision was automatically updated to reflect the committed changes.

Thank you all for the review.