From 17f0dc77a4e511cd5b35e50bccf71e236c78c574 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 12 Feb 2020 16:09:01 +0000 Subject: [PATCH] lualoader: disable autoboot on high-level interpreter errors If we hit an error at this level, we are almost certainly not in any kind of sane state where autoboot can do the right thing. Instead of letting it try and probably failing, disable autoboot so they immediately get kicked into a loader prompt for manual remediation/diagnosis. Reviewed by: tsoome MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23611 --- stand/common/interp_lua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/common/interp_lua.c b/stand/common/interp_lua.c index f63bad03b486..4953caa35c5e 100644 --- a/stand/common/interp_lua.c +++ b/stand/common/interp_lua.c @@ -128,6 +128,7 @@ interp_init(void) errstr = errstr == NULL ? "unknown" : errstr; printf("Startup error in %s:\nLUA ERROR: %s.\n", filename, errstr); lua_pop(luap, 1); + setenv("autoboot_delay", "NO", 1); } }