made the login setup saner.

This commit is contained in:
Izaya 2017-09-14 16:21:32 +10:00
parent 64d3958451
commit 61bf854539
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,6 @@ spawn("lua shell",function()
_ENV = shutil.genenv()
coroutine.yield()
log(pcall(login))
print("\f"..MOTD)
print(_VERSION)
while true do
write((os.getenv("PWD") or "").."> ")

View File

@ -1,8 +1,9 @@
function login()
local un,pw,cc = "","",false
print(MOTD)
if #os.users() > 0 then
repeat
io.write("\f"..MOTD.."\n"..net.id.." login: ")
io.write(net.id.." login: ")
un = io.read()
io.write("Password: ")
pw = io.read("*")