group = {}
--- Returns information about a POSIX user group.
+-- @class function
+-- @name getgroup
-- @param group Group ID or name of a system user group
-- @return Table with information about the requested group
group.getgroup = posix.getgroup
luci.http.status(403, "Forbidden")
end
- uci = entry({"rpc", "uci"}, call("rpc_uci"))
- uci.sysauth = "root"
- uci.sysauth_authenticator = authenticator
+ if pcall(require, "luci.model.uci") then
+ uci = entry({"rpc", "uci"}, call("rpc_uci"))
+ uci.sysauth = "root"
+ uci.sysauth_authenticator = authenticator
+ end
fs = entry({"rpc", "fs"}, call("rpc_fs"))
fs.sysauth = "root"
fs.sysauth_authenticator = authenticator
- fs = entry({"rpc", "sys"}, call("rpc_sys"))
- fs.sysauth = "root"
- fs.sysauth_authenticator = authenticator
+ sys = entry({"rpc", "sys"}, call("rpc_sys"))
+ sys.sysauth = "root"
+ sys.sysauth_authenticator = authenticator
- fs = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
- fs.sysauth = "root"
- fs.sysauth_authenticator = authenticator
+ if pcall(require, "luci.model.ipkg") then
+ fs = entry({"rpc", "ipkg"}, call("rpc_ipkg"))
+ fs.sysauth = "root"
+ fs.sysauth_authenticator = authenticator
+ end
uci = entry({"rpc", "auth"}, call("rpc_auth"))
end