mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2025-02-17 12:06:01 +11:00
Actually actually actually fix service autostart
Bugfixing. Bugfixing never changes.
This commit is contained in:
parent
bed9f55d70
commit
5ddfb128cd
@ -276,9 +276,14 @@ rootAccess.securityPolicy = function (pid, proc, perm, req)
|
|||||||
end
|
end
|
||||||
-- Prepare for success
|
-- Prepare for success
|
||||||
onReg[perm] = onReg[perm] or {}
|
onReg[perm] = onReg[perm] or {}
|
||||||
table.insert(onReg[perm], function ()
|
local orp = onReg[perm]
|
||||||
finish()
|
local function kme()
|
||||||
end)
|
if finish then
|
||||||
|
finish()
|
||||||
|
finish = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(orp, kme)
|
||||||
pcall(neo.executeAsync, "svc-" .. appAct)
|
pcall(neo.executeAsync, "svc-" .. appAct)
|
||||||
-- Fallback "quit now"
|
-- Fallback "quit now"
|
||||||
local time = os.uptime() + 30
|
local time = os.uptime() + 30
|
||||||
@ -287,7 +292,15 @@ rootAccess.securityPolicy = function (pid, proc, perm, req)
|
|||||||
function f()
|
function f()
|
||||||
if finish then
|
if finish then
|
||||||
if os.uptime() >= time then
|
if os.uptime() >= time then
|
||||||
finish()
|
-- we've given up
|
||||||
|
if onReg[perm] == orp then
|
||||||
|
for k, v in ipairs(orp) do
|
||||||
|
if v == kme then
|
||||||
|
table.remove(orp, k)()
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
table.insert(todo, f)
|
table.insert(todo, f)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user