This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Kilobyte's profile picture

[CraftOS 1.4] Custom OS - Daemons, Login system and more

Started by Kilobyte, 30 August 2012 - 04:01 PM
Kilobyte #1
Posted 30 August 2012 - 06:01 PM
Hey together,

I'm proudly presenting my patched CraftOS.

This is born in the computercraft irc. It started with Whi7eRabb1t asking if it was possible to prevent bypassing his login script using a disk. I promised him to look at the problem and this was born.

Features:
adds config file on the computer to ignore the startup file on diskdrives attached to the computer
setup wizard for new placed computers
loading apis from apis/ not only rom/apis/ on system start
adds daemons
also implements a fully functional multiuser system.

Known issues:
any user can access the file /patch/users and give themseles permissions. they can also see all passwords there. this should be fixed in next release.
rednet.open will output "function: xxxxxx". the fix is ready and will be in next update. you can also mannually fix it by deleting the line print(runRoutine) from lua/rom/daemons/rednet.

There is a lot more planned (like file access permissions). if you have any ideas what to add, tell me. i'm usually in computercraft irc with the nickname Kilobyte

Download:
1.0.0 Build 8 for CraftOS 1.4

Changes:
SpoilerBuild 5:
added: Setup wizard
added: loading apis from /apis
Build 6:
added: daemons
Build 7:
fixed: config now saves properly (i hope at least)
Build 8:
added: Login system
changed: directory after login is now /home/<username> (alias ~/)
changed: home/end keys work now in read() method
changed: after logging in is executed first /startup and then ~/.login

Installaton:
1. Backup your Computercraft zip (or folder if you unzipped it)
2. Drop contents of download zip into Computercraft zip/folder
3. Delete the file lua/rom/apis/rednet from your computercraft zip/folder. if you don't do this your computer may not boot or rednet can refuse to work
4. Reload world or restart server. (with folder install a restart of the ingame computer my be enough)
5. It will tell you everything important when you open up the computer

Important: for SMP this hast be on the server only. Only for SSP you need it on the client.
CoLDarkness #2
Posted 30 August 2012 - 06:31 PM
Let me give you some code.


easy = 1
newbie = ***
if easy == 1 and newbie == 0 then
print("Sorry bro but this is really simple.")
elseif easy == 1 and newbie == 1 then
print("Nice code bro keep it up!")
end
Leo Verto #3
Posted 30 August 2012 - 08:55 PM
[string "code"]:2: unexpected symbol
Kilobyte #4
Posted 31 August 2012 - 01:32 PM
Let me give you some code.
 easy = 1 newbie = *** if easy == 1 and newbie == 0 then print("Sorry bro but this is really simple.") elseif easy == 1 and newbie == 1 then print("Nice code bro keep it up!") end 
This release is just a first very basic patch. there is a lot more to come. i especially plan a fully unctional multiuser system
lum2008 #5
Posted 31 August 2012 - 01:48 PM
thank u for this awwwwsome addons .. keep going and i'm still waiting for another Cool STUFF !
Kilobyte #6
Posted 01 September 2012 - 02:40 PM
Ok, just released Build 8 after doing a whole lot of coding.
one more thing that is not in the changelog:
if you want your computer to skip the login and continue directly with executing startup run the program 'setupautologin'. (root permissions required!)
to reverse that type 'deluser autologin'.
if you want to log in normally again, there is an option while the computer boots for it (just watch console during boot progress)