1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-22 19:27:42 +00:00

transition to kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-21 17:22:59 -05:00
parent e6ed08315e
commit 8451c94abe
7 changed files with 48 additions and 196 deletions

View File

@@ -38,6 +38,7 @@ local function loadApplications()
local requirements = {
turtle = function() return turtle end,
advancedTurtle = function() return turtle and term.isColor() end,
advanced = function() return term.isColor() end,
pocket = function() return pocket end,
advancedPocket = function() return pocket and term.isColor() end,
advancedComputer = function() return not turtle and not pocket and term.isColor() end,
@@ -45,6 +46,14 @@ local function loadApplications()
applications = Util.readTable('sys/etc/app.db')
if fs.exists('usr/etc/apps') then
local dbs = fs.list('usr/etc/apps')
for _, db in pairs(dbs) do
local apps = Util.readTable('usr/etc/apps/' .. db) or { }
Util.merge(applications, apps)
end
end
if fs.exists(REGISTRY_DIR) then
local files = fs.list(REGISTRY_DIR)
for _,file in pairs(files) do

View File

@@ -13,7 +13,7 @@ if not device.wireless_modem then
return
end
print('Net daemon started')
print('Net daemon starting')
for _,file in pairs(fs.list('sys/network')) do
local fn, msg = Util.run(_ENV, 'sys/network/' .. file)
@@ -28,6 +28,7 @@ Event.on('device_detach', function()
end
end)
print('Net daemon started')
os.queueEvent('network_up')
Event.pullEvents()

View File

@@ -328,7 +328,7 @@ function shell.openTab( ... )
elseif sPath ~= nil then
return _ENV.multishell.launch(Util.shallowCopy(sandboxEnv), "sys/apps/shell", sCommand, table.unpack(tWords, 2))
else
_G.printError( "No such program" )
return false, "No such program"
end
end
end