Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Doggy OS First Time Setup
- -- Function to create a directory and write a password to a file
- function setupAdministrator()
- print("Welcome to Doggy OS First Time Setup")
- -- Ask for a password
- write("Enter the password for the administrator: ")
- local password = read("*")
- -- Create the directory
- fs.makeDir("/disk/user/administrator")
- -- Create and write the password to password.txt
- local file = fs.open("/disk/user/administrator/password.txt", "w")
- file.write(password)
- file.close()
- print("Setup complete. Doggy OS is ready for use.")
- end
- -- Load the GUI
- function loadGUI()
- shell.run("/disk/os/gui")
- end
- -- Main program
- if not fs.exists("/disk/user/administrator") then
- setupAdministrator()
- end
- loadGUI()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement