diff --git a/modules/applications/login.lua b/modules/applications/login.lua index 6f2ed24..768a70e 100644 --- a/modules/applications/login.lua +++ b/modules/applications/login.lua @@ -12,3 +12,14 @@ function login() return true end end +function loginmanager(sI) + spawn("login manager: "..sI or os.getenv("sI"), function() + if sI then os.setenv("sI",sI) end + while true do + login() + local _,nshell = pcall(loadfile,os.getuattr(os.getuid(),"shell")) + if type(nshell) ~= "function" then nshell = shell end + pcall(nshell,sI) + print(" ") + end +end) end diff --git a/modules/setup.lua b/modules/setup.lua index 833d5a9..39928d8 100644 --- a/modules/setup.lua +++ b/modules/setup.lua @@ -22,7 +22,7 @@ if component.list("gpu")() and component.list("screen")() and component.list("ke log(v[1],v[2],v[3],v[4]) tty(v[2],v[3],v[1]) kbd(v[4],v[1]) - luash(v[1]) + loginmanager(v[1]) end elseif nshd then nshd(23)