Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this is the startup script for the C.S.P Device
- version = "1.0.0"
- settings.load(".settings")
- local w, h = term.getSize()
- function BootStart()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- print("Running Security Scan")
- print("===Security Scan Unavailable===")
- print("Security Scan Complete!")
- os.sleep(5)
- term.clear()
- term.setCursorPos(1,1)
- if settings.get("os_BootMode") == true then
- print("starting Quick Boot Process")
- QuickBoot()
- else
- print("starting full Boot Process")
- FullBoot()
- end
- end
- function FullBoot()
- print("Checking for Updates")
- os.sleep(6)
- if settings.get("Allow_OsUpdates") == true then
- shell.run("os/os_Programs/os_UpdateController","Boot")
- else
- print("This Version does not allow")
- print("Updating of OS")
- print("Please contact Adminstrator")
- print("to Enable this")
- end
- os.sleep(2)
- term.setBackgroundColor(colors.blue)
- term.clear()
- term.setCursorPos(1,1)
- if fs.exists("os/os_SystemFiles/setupCompleted") == true then
- print("Device Settings Detected")
- else
- print("Setup File not found")
- print("Starting Setup Program")
- os.sleep(3)
- shell.run( "pastebin","run","D9qE5rtF")--runs online Setup script
- end
- os.sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- BootEnd()
- end
- function QuickBoot()
- term.setBackgroundColor(colors.blue)
- term.clear()
- if fs.exists("os/os_SystemFiles/setupCompleted") == true then
- print("Device Settings Detected")
- else
- print("Setup File not found")
- print("Starting Setup Program")
- os.sleep(2)
- shell.run( "pastebin","run","D9qE5rtF")--runs online Setup script
- end
- os.sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- BootEnd()
- end
- function BootEnd()
- local Flag = paintutils.loadImage("os/os_SystemFiles/Images/NationalFlag01_Small")
- print("----=================----")
- print(os.date())
- print("Boot Completed")
- print("Starting Main Script")
- print("----=================----")
- paintutils.drawFilledBox(1,6,w,20,colors.white)
- paintutils.drawImage(Flag,1,7)
- os.sleep(8)
- term.clear()
- term.setCursorPos(1,1)
- local Tasks = {settings.get("os_startApps")}
- if Tasks[1] == "Example" then
- print("No Start List Found")
- else
- for i = 1, #Tasks do
- shell.run(shell.resolve(Tasks[i]))
- end
- end
- shell.run("os/os_Programs/os_startScreen",settings.get("os_LockScreenPassword"))
- end
- BootStart()
Add Comment
Please, Sign In to add comment