From 2126d3fd0d8b8d5227befe939ca2fd7ef1026207 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Sat, 8 Jul 2017 19:40:00 -0400 Subject: [PATCH] init tweaks Workaround cjson to sjson migration upstream with an ugly hack Add an early init hook for framework plugins --- init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9270fb5..749a21a 100644 --- 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") -- 2.50.1