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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357827

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