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
This commit is contained in:
Kyle Evans 2020-02-12 16:09:01 +00:00
parent 57d7e4cc2c
commit 17f0dc77a4

View File

@ -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);
}
}