stand/lua: Correct some trivial errors in config

An empty module_path to start with isn't ideal, but if all modules are
contained within a kernel directory (which is what we just tested) then it
isn't strictly an error. Don't assume that module_path has a value already.

When we fail to load the kernel, printing the result (which is guaranteed to
be nil) is not intended; print the name of the kernel.
This commit is contained in:
Kyle Evans 2018-02-17 04:22:36 +00:00
parent bcf48a159e
commit c990f0a990
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329428

View File

@ -297,7 +297,10 @@ function config.loadkernel()
-- succeeded add path to module_path
if res ~= nil then
loader.setenv("module_path", v..";"..module_path);
if module_path == nil then
loader.setenv("module_path", v..";"..
module_path);
end
return true;
end
end
@ -308,7 +311,7 @@ function config.loadkernel()
if res ~= nil then
return true;
else
print("Failed to load kernel '"..res.."'");
print("Failed to load kernel '"..kernel.."'");
return false;
end
end