summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/root/usr/bin/stat-genconfig
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-05-25 22:30:30 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-05-25 22:30:30 +0000
commit1da3c32a73b384e77b5958ac601a232f462d888d (patch)
tree33b5549d0da652e6745952586e309ffa08cfdb56 /applications/luci-statistics/root/usr/bin/stat-genconfig
parente207fce586ba5d5b515b92f0f3347aa750d507f9 (diff)
* luci/statistics: fix path to types.db in default config, adept stat-genconfig to new project name and updated config
Diffstat (limited to 'applications/luci-statistics/root/usr/bin/stat-genconfig')
-rwxr-xr-xapplications/luci-statistics/root/usr/bin/stat-genconfig28
1 files changed, 14 insertions, 14 deletions
diff --git a/applications/luci-statistics/root/usr/bin/stat-genconfig b/applications/luci-statistics/root/usr/bin/stat-genconfig
index 39532ca07..115eab1f9 100755
--- a/applications/luci-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-statistics/root/usr/bin/stat-genconfig
@@ -16,31 +16,31 @@ $Id$
]]--
-require("ffluci.model.uci")
-require("ffluci.sys.iptparser")
-require("ffluci.util")
+require("luci.model.uci")
+require("luci.sys.iptparser")
+require("luci.util")
-local ipt = ffluci.sys.iptparser.IptParser()
-local uci = ffluci.model.uci.Session()
+local ipt = luci.sys.iptparser.IptParser()
+local uci = luci.model.uci.Session()
local sections, names = uci:sections( "luci_statistics" )
function section( plugin )
- local config = sections[ "collectd_" .. plugin ] or sections["general"]
+ local config = sections[ "collectd_" .. plugin ] or sections["collectd"]
- if type(config) == "table" and ( plugin == "general" or config.enable == "1" ) then
+ if type(config) == "table" and ( plugin == "collectd" or config.enable == "1" ) then
local params = ""
if type( plugins[plugin] ) == "function" then
params = plugins[plugin]( config )
else
- params = config_generic( config, plugins[plugin][1], plugins[plugin][2], plugins[plugin][3], plugin == "general" )
+ params = config_generic( config, plugins[plugin][1], plugins[plugin][2], plugins[plugin][3], plugin == "collectd" )
end
- if plugin ~= "general" then
+ if plugin ~= "collectd" then
print( "LoadPlugin " .. plugin )
if params:len() > 0 then
@@ -113,7 +113,7 @@ function config_iptables( c )
v = sections[s][k]
if type(v) == "string" then
- if k == "options" then v = ffluci.util.split( v, "%s+", nil, true ) end
+ if k == "options" then v = luci.util.split( v, "%s+", nil, true ) end
search[k] = v
end
end
@@ -180,7 +180,7 @@ function _expand( s, n, nopad )
if type(s) == "string" then
local str = ""
- for i, v in ipairs( ffluci.util.split( s, "%s+", nil, true ) ) do
+ for i, v in ipairs( luci.util.split( s, "%s+", nil, true ) ) do
str = str .. _string( v, n, nopad )
end
@@ -228,7 +228,7 @@ end
plugins = {
- general = {
+ collectd = {
{ "BaseDir", "Include", "PIDFile", "PluginDir", "TypesDB", "Interval", "ReadThreads" },
{ },
{ }
@@ -333,10 +333,10 @@ plugins = {
}
-section("general")
+section("collectd")
for plugin in pairs(plugins) do
- if plugin ~= "general" then
+ if plugin ~= "collectd" then
section( plugin )
end
end