Page MenuHomeFreeBSD

D45889.id140600.diff
No OneTemporary

D45889.id140600.diff

diff --git a/stand/lua/core.lua b/stand/lua/core.lua
--- a/stand/lua/core.lua
+++ b/stand/lua/core.lua
@@ -542,6 +542,23 @@
end
end
+-- Sanity check the boot loader revision
+local loader_major = 3
+
+function core.loaderTooOld()
+ return loader.version == nil or loader.version < 3 * 1000
+end
+
+if core.loaderTooOld() then
+ print("**********************************************************************")
+ print("**********************************************************************")
+ print("***** *****")
+ print("***** BOOT LOADER IS TOO OLD. PLEASE UPGRADE. *****")
+ print("***** *****")
+ print("**********************************************************************")
+ print("**********************************************************************")
+end
+
recordDefaults()
hook.register("config.reloaded", core.clearCachedKernels)
return core
diff --git a/stand/lua/core.lua.8 b/stand/lua/core.lua.8
--- a/stand/lua/core.lua.8
+++ b/stand/lua/core.lua.8
@@ -218,6 +218,10 @@
If there is one element, this returns the front element and an empty table.
This will not operate on truly associative tables; numeric indices are
required.
+.It Fn core.loaderTooOld
+Returns true if the loader is too old.
+Specifically, this means, is the loader old enough to require one or more
+workarounds in the current lua base modules.
.El
.Sh SEE ALSO
.Xr loader.conf 5 ,

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 24, 9:48 AM (22 m, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32069326
Default Alt Text
D45889.id140600.diff (1 KB)

Event Timeline