]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand/lua: per-product conf if requested via product_vars
authorStéphane Rochoy <stephane.rochoy@stormshield.eu>
Thu, 4 May 2023 07:23:47 +0000 (09:23 +0200)
committerWarner Losh <imp@FreeBSD.org>
Fri, 2 Feb 2024 19:04:57 +0000 (12:04 -0700)
commitc343eedc6db381ac76e489f8ae0304898b71c5db
treedbc39f42c1538bf87c208db3f09df5914655199a
parent994865caf250ea2a59b7b842e44680931e8b19f6
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
stand/defaults/loader.conf.5
stand/lua/config.lua