1
0
mirror of https://github.com/kepler155c/opus synced 2024-11-05 08:26:16 +00:00
opus/sys/extensions/5.network.lua
kepler155c@gmail.com e6ed08315e transition to kernel
2018-01-21 06:09:25 -05:00

25 lines
398 B
Lua

local kernel = _G.kernel
local os = _G.os
_G.network = { }
local function startNetwork()
kernel.run({
title = 'Net daemon',
path = 'sys/apps/netdaemon.lua',
hidden = true,
})
end
kernel.hook('device_attach', function(_, eventData)
if eventData[1] == 'wireless_modem' then
startNetwork()
end
end)
if _G.device.wireless_modem then
startNetwork()
os.pullEvent('network_up')
end