]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
init tweaks
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sat, 8 Jul 2017 23:40:00 +0000 (19:40 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sat, 8 Jul 2017 23:40:00 +0000 (19:40 -0400)
Workaround cjson to sjson migration upstream with an ugly hack
Add an early init hook for framework plugins

init.lua

index 9270fb5da607a68aa4815b3a0c2ba148ce9a12f7..749a21a798fe4fc44f38151958ddc35b6217a7a1 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -1,5 +1,12 @@
--- DEPEND: gpio, node, rtctime?, tmr ; nwfnet, nwfnet-diag, nwfnet-go, telnetd
+-- DEPEND: file?, gpio, node, rtctime?, tmr ; nwfnet, nwfnet-diag, nwfnet-go, telnetd
 if rtctime then rtctime.set(0) end -- set time to 0 until someone corrects us
+
+-- XXX much of this framework calls cjson as such; that should be fixed
+if not cjson then _G.cjson = sjson end
+
+-- See if there's any early startup to do.
+if file and file.exists("init-early.lua") then dofile("init-early.lua") end
+
 local function goab()
        dofile("nwfnet-diag.lc")(true)
        dofile("diag.lc")