From cae98cf683ddd1421f4b66bb6aa7099ca6da94ef Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Mon, 21 Jul 2025 10:14:00 -0700 Subject: [PATCH] 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 --- stand/common/install.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/common/install.c b/stand/common/install.c index 249eca1648f..d07c4c6fc62 100644 --- a/stand/common/install.c +++ b/stand/common/install.c @@ -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);