Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oldPull = os.pullEvent;
- os.pullEvent = os.pullEventRaw;
- term.clear()
- os.loadAPI("/.sys/crashfix")
- os.loadAPI("/.sys/bootloader")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- print("Press s to boot into Safe Mode")
- print("Press a to boot into advanced boot")
- print("Press o to boot into PowerOS")
- local event, key = os.pullEvent("key")
- if key == keys.s then
- bootloader.safe = true
- bootloader.os = false
- bootloader.advanced = false
- shell.run("/.sys/kernel")
- elseif key == keys.a then
- bootloader.os = false
- bootloader.advanced = true
- bootloader.safe = false
- shell.run("/.sys/kernel")
- elseif key == keys.o then
- bootloader.advanced = false
- bootloader.safe = false
- bootloader.os = true
- shell.run("/.sys/kernel")
- else
- os.reboot()
- end
- os.pullEvent = oldPull;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement