made a way better login system, you can now exit the shell after logging in and you don't need to reboot the machine

This commit is contained in:
Izaya 2017-10-08 01:35:51 +11:00
parent c5307a7433
commit 110c3e5886
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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)