Skip to content

Migrate packages requiring kernel modules to modules-load.d #9

Description

@sighook

Background

Some packages (e.g. openvpn, fuse, cdrtools) currently instruct users to edit /etc/rc.modules to load required kernel modules. This is fragile and inconsistent.

Zeppe‑Lin provides modules-load(8), a declarative system. Packages can ship a static config file in /lib/modules-load.d/ listing required modules. This ensures modules are loaded automatically at boot, while still allowing administrators to override or disable.

Goal

  • Each package that requires a kernel module must install a file:
    /lib/modules-load.d/<package>.conf
    
    containing the module name(s).
  • README files must be updated to use the standard template (below).
  • Reword instructions telling users to edit /etc/rc.modules (below).

Scope

  • Identify all packages that require kernel modules.
  • Add modules-load.<package>.conf to each.
  • Update package Pkgfiles to install the file into /lib/modules-load.d/<package>.conf.
  • Update README content with the standard template.

Standard README Template

REQUIREMENTS
============

Kernel Configuration
--------------------

<add if needed for custom kernel setups>

Kernel Module
-------------

This package needs the **<module_name>** kernel module.

It provides `/lib/modules-load.d/<package>.conf` for `modules-load(8)`.
The module will be loaded at boot.

- To override: copy to `/etc/modules-load.d/` and edit.
- To disable: symlink `/etc/modules-load.d/<package>.conf` to `/dev/null`.

Legacy `/etc/rc.modules` still works if you prefer manual loading.

Maintainers only replace <package> and <module_name>(s).

Candidate Packages (initial list)

  • openvpntun
  • fusefuse
  • wireguard-toolswireguard
  • v4l2loopbackv4l2loopback
  • net/tuntaptun
  • virtualboxvboxdrv, vboxnetflt, vboxnetadp
  • nfs-utilsnfsd
  • iscsi-toolsiscsi_tcp

Expand list with results from:

grep 'KERNEL MODULE' -R /usr/src/pkgsrc-* --include=README*

Acceptance Criteria

  • Installing a package automatically prepares its required modules for boot.
  • Removing a package cleans up its module requirement.
  • Administrators can override or disable via /etc/modules-load.d/.
  • README files are uniform and minimal.
  • No regressions in boot‑time module availability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    Status
    Packages

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions