summaryrefslogtreecommitdiffhomepage
path: root/core/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/model')
-rw-r--r--core/src/model/ipkg.lua20
-rw-r--r--core/src/model/uci.lua8
-rw-r--r--core/src/model/uci/libuci.lua16
-rw-r--r--core/src/model/uci/wrapper.lua16
4 files changed, 30 insertions, 30 deletions
diff --git a/core/src/model/ipkg.lua b/core/src/model/ipkg.lua
index 3b149fb168..e95a2620a0 100644
--- a/core/src/model/ipkg.lua
+++ b/core/src/model/ipkg.lua
@@ -1,5 +1,5 @@
--[[
-FFLuCI - IPKG wrapper library
+LuCI - IPKG wrapper library
Description:
Wrapper for the ipkg Package manager
@@ -25,9 +25,9 @@ See the License for the specific language governing permissions and
limitations under the License.
]]--
-module("ffluci.model.ipkg", package.seeall)
-require("ffluci.sys")
-require("ffluci.util")
+module("luci.model.ipkg", package.seeall)
+require("luci.sys")
+require("luci.util")
ipkg = "ipkg"
@@ -88,7 +88,7 @@ function _lookup(act, pkg)
cmd = cmd .. " '" .. pkg:gsub("'", "") .. "'"
end
- return _parselist(ffluci.sys.exec(cmd .. " 2>/dev/null"))
+ return _parselist(luci.sys.exec(cmd .. " 2>/dev/null"))
end
-- Internal parser function
@@ -97,23 +97,23 @@ function _parselist(rawdata)
error("IPKG: Invalid rawdata given")
end
- rawdata = ffluci.util.split(rawdata)
+ rawdata = luci.util.split(rawdata)
local data = {}
local c = {}
local l = nil
for k, line in pairs(rawdata) do
if line:sub(1, 1) ~= " " then
- local split = ffluci.util.split(line, ":", 1)
+ local split = luci.util.split(line, ":", 1)
local key = nil
local val = nil
if split[1] then
- key = ffluci.util.trim(split[1])
+ key = luci.util.trim(split[1])
end
if split[2] then
- val = ffluci.util.trim(split[2])
+ val = luci.util.trim(split[2])
end
if key and val then
@@ -122,7 +122,7 @@ function _parselist(rawdata)
data[val] = c
elseif key == "Status" then
c.Status = {}
- for i, j in pairs(ffluci.util.split(val, " ")) do
+ for i, j in pairs(luci.util.split(val, " ")) do
c.Status[j] = true
end
else
diff --git a/core/src/model/uci.lua b/core/src/model/uci.lua
index ca5b232eb3..39354bed19 100644
--- a/core/src/model/uci.lua
+++ b/core/src/model/uci.lua
@@ -1,5 +1,5 @@
--[[
-FFLuCI - UCI mpdel
+LuCI - UCI mpdel
Description:
Generalized UCI model
@@ -23,16 +23,16 @@ See the License for the specific language governing permissions and
limitations under the License.
]]--
-module("ffluci.model.uci", package.seeall)
+module("luci.model.uci", package.seeall)
-- Default savedir
savedir = "/tmp/.uci"
-- Test whether to load libuci-Wrapper or /sbin/uci-Wrapper
if pcall(require, "uci") then
- Session = require("ffluci.model.uci.libuci").Session
+ Session = require("luci.model.uci.libuci").Session
else
- Session = require("ffluci.model.uci.wrapper").Session
+ Session = require("luci.model.uci.wrapper").Session
end
-- The default Session
diff --git a/core/src/model/uci/libuci.lua b/core/src/model/uci/libuci.lua
index b160dc10a3..9a1112500e 100644
--- a/core/src/model/uci/libuci.lua
+++ b/core/src/model/uci/libuci.lua
@@ -1,5 +1,5 @@
--[[
-FFLuCI - UCI libuci wrapper
+LuCI - UCI libuci wrapper
Description:
Wrapper for the libuci Lua bindings
@@ -24,19 +24,19 @@ limitations under the License.
]]--
-module("ffluci.model.uci.libuci", package.seeall)
+module("luci.model.uci.libuci", package.seeall)
require("uci")
-require("ffluci.util")
-require("ffluci.sys")
+require("luci.util")
+require("luci.sys")
-- Session class
-Session = ffluci.util.class()
+Session = luci.util.class()
-- Session constructor
function Session.__init__(self, savedir)
self.ucicmd = savedir and "uci -P " .. savedir or "uci"
- self.savedir = savedir or ffluci.model.uci.savedir
+ self.savedir = savedir or luci.model.uci.savedir
end
function Session.add(self, config, section_type)
@@ -152,7 +152,7 @@ end
function Session._uci(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
+ local res = luci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
if res:len() == 0 then
return nil
@@ -162,7 +162,7 @@ function Session._uci(self, cmd)
end
function Session._uci2(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
+ local res = luci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
if res:len() > 0 then
return false, res
diff --git a/core/src/model/uci/wrapper.lua b/core/src/model/uci/wrapper.lua
index 3aa3b5fd1d..e063b272c8 100644
--- a/core/src/model/uci/wrapper.lua
+++ b/core/src/model/uci/wrapper.lua
@@ -1,5 +1,5 @@
--[[
-FFLuCI - UCI wrapper library
+LuCI - UCI wrapper library
Description:
Wrapper for the /sbin/uci application, syntax of implemented functions
@@ -27,13 +27,13 @@ limitations under the License.
]]--
-module("ffluci.model.uci.wrapper", package.seeall)
+module("luci.model.uci.wrapper", package.seeall)
-require("ffluci.util")
-require("ffluci.sys")
+require("luci.util")
+require("luci.sys")
-- Session class
-Session = ffluci.util.class()
+Session = luci.util.class()
-- Session constructor
function Session.__init__(self, savedir)
@@ -104,7 +104,7 @@ Session.t_set = Session.set
function Session._uci(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
+ local res = luci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
if res:len() == 0 then
return nil
@@ -114,7 +114,7 @@ function Session._uci(self, cmd)
end
function Session._uci2(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
+ local res = luci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
if res:len() > 0 then
return false, res
@@ -124,7 +124,7 @@ function Session._uci2(self, cmd)
end
function Session._uci3(self, cmd)
- local res = ffluci.sys.execl(self.ucicmd .. " 2>&1 " .. cmd)
+ local res = luci.sys.execl(self.ucicmd .. " 2>&1 " .. cmd)
if res[1] and res[1]:sub(1, self.ucicmd:len()+1) == self.ucicmd..":" then
return nil, res[1]
end