diff options
Diffstat (limited to 'System')
| -rw-r--r-- | System/boot.lua | 23 | ||||
| -rw-r--r-- | System/desktop.lua | 2 | ||||
| -rw-r--r-- | System/post-setup.lua | 26 | ||||
| -rw-r--r-- | System/recovery/main.lua | 4 | ||||
| -rw-r--r-- | System/recovery/reset.lua | 2 | ||||
| -rw-r--r-- | System/recovery/transfer.lua | 2 |
6 files changed, 25 insertions, 34 deletions
diff --git a/System/boot.lua b/System/boot.lua index 4b3227f..35d212b 100644 --- a/System/boot.lua +++ b/System/boot.lua @@ -14,28 +14,25 @@ ]]-- local version = "1.0 Alpha 2" -local desktop = "/system/desktop.lua" +local desktop = "/System/desktop.lua" term.clear() term.setCursorPos(1,1) print("Starting up bits-UI ".. version .."...") -sleep(1) print(_HOST) -sleep(1) if term.isColor() then term.setTextColor(colors.green) print("[OK] Advanced Computer is detected...") else print("[ERROR] You need a advanced computer in order to make the UI functional...") - sleep(3) + sleep(2) os.shutdown() end -sleep(1) if fs.exists(desktop) then term.setTextColor(colors.green) @@ -47,9 +44,7 @@ else os.shutdown() end -sleep(1) - -if fs.exists("/home") then +if fs.exists("/Home") then term.setTextColor(colors.green) print("[OK] Home has been found...") else @@ -67,24 +62,20 @@ else print("[OK] Etc directory has been created...") end -sleep(1) - -if fs.exists("/home/.config") then +if fs.exists("/Home/.config") then term.setTextColor(colors.green) print("[OK] Config has been found...") else - config = io.open("/home/.config", "w") + config = io.open("/Home/.config", "w") config:close() term.setTextColor(colors.blue) print("[INFO] Config has not been found!") print("[INFO] You will be sent to the post installation setup...") sleep(2) - shell.run("/system/post-setup.lua") + shell.run("/System/post-setup.lua") end - -sleep(1) term.setTextColor(colors.green) print("[DONE] Boot sequence has been completed...") term.setTextColor(colors.white) -sleep(1) +sleep(3) shell.run(desktop)
\ No newline at end of file diff --git a/System/desktop.lua b/System/desktop.lua index fe6cbb6..27b7e07 100644 --- a/System/desktop.lua +++ b/System/desktop.lua @@ -13,7 +13,7 @@ GNU General Public License for more details. ]]-- -os.loadAPI("/system/apis/flib.lua") +os.loadAPI("/System/apis/flib.lua") local backgroundColour = 32768 local backgroundImage = "/home/.background" local panelColour = 8192 diff --git a/System/post-setup.lua b/System/post-setup.lua index 18f289f..94c9d65 100644 --- a/System/post-setup.lua +++ b/System/post-setup.lua @@ -12,9 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ]]-- -os.loadAPI("/system/apis/sha256.lua") -os.loadAPI("/system/apis/json.lua") -local config = "/home/.config" +os.loadAPI("/System/apis/sha256.lua") +os.loadAPI("/System/apis/json.lua") +local config = "/Home/.config" term.clear() term.setCursorPos(1,1) @@ -22,7 +22,7 @@ term.setTextColor(colors.white) print("Welcome to the bits-UI Post Setup!") sleep(2) -print("Please enter your password.") +--[[print("Please enter your password.") --print("(Don't set your real password in servers.)") local passPath = "/etc/passwd.pwd" @@ -40,25 +40,25 @@ end sleep(3) term.clear() term.setCursorPos(1,1) -term.setTextColor(colors.white) +term.setTextColor(colors.white)]]-- print("Copying files to local user.") -fs.makeDir("/home/Documents") -fs.makeDir("/home/Downloads") -fs.makeDir("/home/Pictures") +fs.makeDir("/Home/Documents") +fs.makeDir("/Home/Downloads") +fs.makeDir("/Home/Pictures") -if fs.exists("/system/skel/README.txt") then - shell.run("copy", "/system/skel/README.txt", "/home/Documents") +if fs.exists("/System/skel/README.txt") then + shell.run("copy", "/System/skel/README.txt", "/Home/Documents") else print("[ERROR] Unable to find README.txt...") end -if fs.exists("/system/skel/.background") then - shell.run("copy", "/system/skel/.background", "/home") +if fs.exists("/System/skel/.background") then + shell.run("copy", "/System/skel/.background", "/Home") else print("[ERROR] Unable to find the background...") end sleep(1) print("Finished copying files.") sleep(2) -shell.run("/system/desktop.lua")
\ No newline at end of file +shell.run("/System/desktop.lua")
\ No newline at end of file diff --git a/System/recovery/main.lua b/System/recovery/main.lua index 10fbe18..15c51aa 100644 --- a/System/recovery/main.lua +++ b/System/recovery/main.lua @@ -21,9 +21,9 @@ sleep(2) print("Do you want to either reset or transfer?") local input = read(); if input == "reset" then - shell.run("/system/recovery/reset.lua") + shell.run("/System/recovery/reset.lua") elseif input == "transfer" then - shell.run("/system/recovery/transfer.lua") + shell.run("/System/recovery/transfer.lua") else os.reboot() end
\ No newline at end of file diff --git a/System/recovery/reset.lua b/System/recovery/reset.lua index a8c8cf1..c96a304 100644 --- a/System/recovery/reset.lua +++ b/System/recovery/reset.lua @@ -23,7 +23,7 @@ print("Are you sure you want to reset bits-UI? (y/n)") local input = read() if input == "y" then print("Erasing all user stored data...") - fs.delete("/home") + fs.delete("/Home") fs.delete("/etc/passwd.pwd") sleep(2) print("Erased all data...") diff --git a/System/recovery/transfer.lua b/System/recovery/transfer.lua index b1b98f1..996d4b0 100644 --- a/System/recovery/transfer.lua +++ b/System/recovery/transfer.lua @@ -19,7 +19,7 @@ term.setTextColor(colors.white) print("Welcome to the bits-UI transfer!")
sleep(2)
if fs.exists("/disk") then
- shell.run("copy", "/home", "/disk")
+ shell.run("copy", "/Home", "/disk")
shell.run("copy", "/etc/passwd.pwd", "/disk")
else
print("You need a floppy disk to copy over data.")
|
