From 417856ebd683109abfb9b3c7dc7c029d3931f55e Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 29 Jun 2020 15:31:12 +1000 Subject: [PATCH] modify the two services people actually use to work with the new service semantics --- service/getty.lua | 3 ++- service/minitel.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/service/getty.lua b/service/getty.lua index 6c71b6c..adceae2 100644 --- a/service/getty.lua +++ b/service/getty.lua @@ -37,7 +37,7 @@ local function spawnShell(fin,fout) io.input(fin) io.output(fout):setvbuf("no") print(_OSVERSION.." - "..tostring(math.floor(computer.totalMemory()/1024)).."K RAM") - return os.spawn(shell.interactive, "shell: "..tostring(fin)) + return os.spawn(function() local w,r = pcall(shell.interactive) if not w then syslog(r) end end, "shell: "..tostring(fin)) end local function allocate() @@ -77,3 +77,4 @@ function stop() os.kill(basepid) basepid = nil end +return {start=start,stop=stop} diff --git a/service/minitel.lua b/service/minitel.lua index 2431ef5..efbefde 100644 --- a/service/minitel.lua +++ b/service/minitel.lua @@ -271,3 +271,4 @@ function del_route(to) cfg.sroutes[to] = nil saveconfig() end +return {start=start,stop=stop,set=set,set_route=set_route,del_route=del_route}