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:
parent
c5307a7433
commit
110c3e5886
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user