diff options
| author | Andrew Lee <alee14498@gmail.com> | 2019-07-15 13:12:04 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@gmail.com> | 2019-07-15 13:12:04 -0400 |
| commit | bc294508b9d6566add6605bb7da09d3f6b74f9bb (patch) | |
| tree | 2dc2e09e6aa5e3edcc98e1a22217ac61c702c4a6 /system/post-setup.lua | |
| parent | a3e41759b761898f24b9e8b7c5e0679ca273df07 (diff) | |
| download | bits-UI-bc294508b9d6566add6605bb7da09d3f6b74f9bb.tar.gz bits-UI-bc294508b9d6566add6605bb7da09d3f6b74f9bb.tar.bz2 bits-UI-bc294508b9d6566add6605bb7da09d3f6b74f9bb.zip | |
Corrections and new API!
Diffstat (limited to 'system/post-setup.lua')
| -rw-r--r-- | system/post-setup.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/system/post-setup.lua b/system/post-setup.lua index 1e6bfe0..9ff14d6 100644 --- a/system/post-setup.lua +++ b/system/post-setup.lua @@ -38,12 +38,18 @@ print("Welcome to the bits-UI Post Setup!") sleep(2) print("Please enter your password.") print("(Don't set your real password in servers.)") + local passPath = "/etc/passwd.pwd" -local passwd = read(" ") -local insertPasswd = fs.open(passPath, "a") -insertPasswd.writeLine(passwd) -insertPasswd.close() -print("Thanks, I will save that.") +if fs.exists(passPath) then + print("[INFO] Password file exists! Skipping.") + sleep(2) +else + local passwd = read(" ") + local insertPasswd = fs.open(passPath, "a") + insertPasswd.writeLine(passwd) + insertPasswd.close() + print("Thanks, I will save that.") +end sleep(1) shell.run("/system/desktop.lua")
\ No newline at end of file |
