install: allow ENV in metatags

The metatags file informs install of kernel and modules to load,
allow it to also case variables to be set in env.

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc
Differential Revision:	https://reviews.freebsd.org/D51446
This commit is contained in:
Simon J. Gerraty 2025-07-21 10:14:00 -07:00
parent ffc5ee0f57
commit cae98cf683

View file

@ -137,7 +137,9 @@ read_metatags(int fd)
}
*p++ = '\0';
if (strcmp(tag, "KERNEL") == 0)
if (strncmp(tag, "ENV_", 4) == 0)
setenv(&tag[4], val, 1);
else if (strcmp(tag, "KERNEL") == 0)
error = setpath(&inst_kernel, val);
else if (strcmp(tag, "MODULES") == 0)
error = setmultipath(&inst_modules, val);