Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script acts as a Boot Adminstrator
- version = "1.0.0"
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- local function MainMenu()
- Clear()
- print("BOOT MANAGER")
- print("--VERSION--"..version)
- print("////OPTIONS////")
- print(" 1- [Logs]")
- print(" 2- [Boot Files]")
- print(" 3- [Update Boot Loader]")
- print(" 4- [Reboot]")
- print(" 5- [Continue Boot up]")
- local Selected = -1
- repeat
- local event, key = os.pullEvent("key")
- Selected = key
- until key == keys.one or key == keys.two or key == keys.three or key == keys.four or key == keys.five
- if Selected == keys.one then
- DisplayLogs()
- elseif Selected == keys.two then
- BootFileMenu()
- elseif Selected == keys.three then
- shell.run(".Boot_BootUpdater")
- elseif Selected == keys.four then
- os.reboot()
- elseif Selected == keys.five then
- shell.run(".Boot_TaskRunner")
- end
- end
- local function DisplayLogs()
- Clear()
- local file = fs.open("BootLogs","r")
- print(file.readAll)
- file.close()
- print("Press Enter to Return to Menu")
- repeat
- local event, key = os.pullEvent("key")
- until key == keys.enter
- MainMenu()
- end
- local function BootFileMenu()
- Clear()
- print("---FILES---")
- print("these are the files ran during Boot, in this order")
- print("//////////////////////////////////////////////////")
- local file = fs.open(".Boot_BootFile")
- print(BootFile.readAll)
- file.close()
- print("//////////////////////////////////////////////////")
- print("Press Enter to return to menu")
- repeat
- local event, key = os.pullEvent("key")
- until key == keys.enter
- MainMenu()
- end
- MainMenu()
Advertisement
Add Comment
Please, Sign In to add comment