modules/rpc: Check for existence of external libraries
libs/sys: Small fix for API-Documentation
This commit is contained in:
parent
77756f08b4
commit
a0650b4ca9
2 changed files with 15 additions and 9 deletions
|
@ -207,6 +207,8 @@ end
|
||||||
group = {}
|
group = {}
|
||||||
|
|
||||||
--- Returns information about a POSIX user group.
|
--- Returns information about a POSIX user group.
|
||||||
|
-- @class function
|
||||||
|
-- @name getgroup
|
||||||
-- @param group Group ID or name of a system user group
|
-- @param group Group ID or name of a system user group
|
||||||
-- @return Table with information about the requested group
|
-- @return Table with information about the requested group
|
||||||
group.getgroup = posix.getgroup
|
group.getgroup = posix.getgroup
|
||||||
|
|
|
@ -33,21 +33,25 @@ function index()
|
||||||
luci.http.status(403, "Forbidden")
|
luci.http.status(403, "Forbidden")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if pcall(require, "luci.model.uci") then
|
||||||
uci = entry({"rpc", "uci"}, call("rpc_uci"))
|
uci = entry({"rpc", "uci"}, call("rpc_uci"))
|
||||||
uci.sysauth = "root"
|
uci.sysauth = "root"
|
||||||
uci.sysauth_authenticator = authenticator
|
uci.sysauth_authenticator = authenticator
|
||||||
|
end
|
||||||
|
|
||||||
fs = entry({"rpc", "fs"}, call("rpc_fs"))
|
fs = entry({"rpc", "fs"}, call("rpc_fs"))
|
||||||
fs.sysauth = "root"
|
fs.sysauth = "root"
|
||||||
fs.sysauth_authenticator = authenticator
|
fs.sysauth_authenticator = authenticator
|
||||||
|
|
||||||
fs = entry({"rpc", "sys"}, call("rpc_sys"))
|
sys = entry({"rpc", "sys"}, call("rpc_sys"))
|
||||||
fs.sysauth = "root"
|
sys.sysauth = "root"
|
||||||
fs.sysauth_authenticator = authenticator
|
sys.sysauth_authenticator = authenticator
|
||||||
|
|
||||||
|
if pcall(require, "luci.model.ipkg") then
|
||||||
fs = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
|
fs = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
|
||||||
fs.sysauth = "root"
|
fs.sysauth = "root"
|
||||||
fs.sysauth_authenticator = authenticator
|
fs.sysauth_authenticator = authenticator
|
||||||
|
end
|
||||||
|
|
||||||
uci = entry({"rpc", "auth"}, call("rpc_auth"))
|
uci = entry({"rpc", "auth"}, call("rpc_auth"))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue