1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-12-26 02:08:07 +11:00

added a --firstrun option to mtcfg to hide advanced settings

This commit is contained in:
Izaya 2018-08-04 05:49:48 +10:00
parent fc5f800e61
commit e4c70beae4

View File

@ -1,6 +1,7 @@
local event = require "event"
local serial = require "serialization"
local computer = require "computer"
local shell = require "shell"
local hostname = os.getenv("HOSTNAME")
local cfgfile = "/etc/minitel.cfg"
@ -14,6 +15,8 @@ cfg.rctime = 15
cfg.pctime = 30
cfg.sroutes = {}
local args, ops = shell.parse(...)
local function clear()
io.write("\27[2J\27[H")
end
@ -51,6 +54,10 @@ if not hostname then
event.pull("key_down")
end
if ops.firstrun then
print("Run mtcfg to configure advanced settings.")
end
local keytab = {}
for k,v in pairs(cfg) do
if type(v) ~= "table" then