fs.sysauth = "root"
fs.sysauth_authenticator = authenticator
- fs = entry({"rpc", "sys"}, call("rpc_sys"))
- fs.sysauth = "root"
- fs.sysauth_authenticator = authenticator
-
- fs = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
- fs.sysauth = "root"
- fs.sysauth_authenticator = authenticator
+ sys = entry({"rpc", "sys"}, call("rpc_sys"))
+ sys.sysauth = "root"
+ sys.sysauth_authenticator = authenticator
+
+ ipkg = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
+ ipkg.sysauth = "root"
+ ipkg.sysauth_authenticator = authenticator
uci = entry({"rpc", "auth"}, call("rpc_auth"))
end
end
function rpc_uci()
+ if not pcall(require, "luci.model.uci") then
+ luci.http.status(404, "Not Found")
+ return nil
+ end
local uci = require "luci.controller.rpc.uci"
local jsonrpc = require "luci.jsonrpc"
local http = require "luci.http"
end
function rpc_ipkg()
+ if not pcall(require, "luci.model.ipkg") then
+ luci.http.status(404, "Not Found")
+ return nil
+ end
local ipkg = require "luci.model.ipkg"
local jsonrpc = require "luci.jsonrpc"
local http = require "luci.http"