From 52248755b18c5c8912c5c58910b87358beec84cd Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 15 May 2017 17:16:20 +1000 Subject: [PATCH] Added a basic init system. --- modules/util/sinit.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/util/sinit.lua diff --git a/modules/util/sinit.lua b/modules/util/sinit.lua new file mode 100644 index 0000000..a093ab0 --- /dev/null +++ b/modules/util/sinit.lua @@ -0,0 +1,17 @@ +do + if _OSVERSION and _BD then + print("Starting ".._OSVERSION.." built at ".._BD) + end + local f=fopen("boot:/init.cfg","rb") + if f then + local c="" + local nc=fread(f,2048) + while nc ~= nil and nc ~= "" do + c=c..nc + nc=fread(f,2048) + end + for l in c:gmatch("[^\n]+") do + print("[init] "..l) + end + end +end