HomeFreeBSD

stand/lua: per-product conf if requested via product_vars

Description

stand/lua: per-product conf if requested via product_vars

If product_vars is set, it must be a space separated list of environment
variable names to walk through to guess the product. Each time a product can be
guessed (i.e., the corresponding variable is defined), prepend
/boot/loader.conf.d/PRODUCT/ to loader_conf_dirs.

It can be typically used as follow:

smbios.system.planar.maker="PLANAR_MAKER"
smbios.system.planar.product="PLANAR_PRODUCT"
smbios.system.product="PRODUCT"
uboot.m_product="M_PRODUCT"
product_vars="smbios.system.planar.maker smbios.system.planar.product smbios.system.product uboot.m_product"

to read files found in the following directories, in that order:

/boot/loader.conf.d/PLANAR_MAKER
/boot/loader.conf.d/PLANAR_PRODUCT
/boot/loader.conf.d/PRODUCT
/boot/loader.conf.d/M_PRODUCT

Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/759

The commit, revert, commit has been squashed dpwn
(cherry picked from commit c343eedc6db381ac76e489f8ae0304898b71c5db)
(cherry picked from commit 994865caf250ea2a59b7b842e44680931e8b19f6)
(cherry picked from commit 754cac4b283eb024a3a6a194130199c860e32ebf)

Details

Provenance
stephane.rochoy_stormshield.euAuthored on May 4 2023, 7:23 AM
impCommitted on Apr 16 2024, 7:54 PM
Parents
rGa975ee493d89: kboot: update copyright on these files.
Branches
Unknown
Tags
Unknown