Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Clear terminal - remove POST screen
- term.clear()
- term.setCursorPos(1, 1)
- -- Branding <3
- print("Celect Boot Manager")
- write("\"Celect\" a kernel: ")
- -- Celect kernel!
- local selection = read()
- -- Does the kernel exist?
- if fs.exists("/boot/kernel/"..selection) then
- print("Booting to kernel "..selection.."...")
- shell.run("/boot/kernel/"..selection, "celect")
- else
- print("Kernel "..selection.." does not exist.")
- end
- -- Want to reboot?
- write("Do you wish to reboot? (Y|n) ")
- local selection = read()
- if selection == "n" or selection == "N" then
- os.shutdown()
- else
- os.reboot()
- end
- print("Oops! An error occurred, rebooting...")
- sleep(1)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment