summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-06 20:11:15 +0000
committerSteven Barth <steven@midlink.org>2008-08-06 20:11:15 +0000
commit76982655fa433edd885bbb80bbe74e82fca527e2 (patch)
tree98b1f8cfff0bedaf13795779710123f0194dffc1 /modules
parentb1b0c085de7483c5a778f0056a97da14e87b7f16 (diff)
Moved luci.sys.exec, luci.sys.execl and luci.sys.bigendian to luci.util
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/controller/admin/system.lua2
-rw-r--r--modules/admin-full/luasrc/controller/admin/uci.lua2
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua3
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua2
-rw-r--r--modules/admin-mini/luasrc/controller/mini/system.lua2
-rw-r--r--modules/admin-mini/luasrc/controller/mini/uci.lua2
6 files changed, 7 insertions, 6 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua
index 8e3a3d799..9abdb2aba 100644
--- a/modules/admin-full/luasrc/controller/admin/system.lua
+++ b/modules/admin-full/luasrc/controller/admin/system.lua
@@ -189,7 +189,7 @@ function action_backup()
luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write)
elseif reset then
luci.template.render("admin_system/applyreboot")
- luci.sys.exec("mtd -r erase rootfs_data")
+ luci.util.exec("mtd -r erase rootfs_data")
else
luci.template.render("admin_system/backup", {reset_avail = reset_avail})
end
diff --git a/modules/admin-full/luasrc/controller/admin/uci.lua b/modules/admin-full/luasrc/controller/admin/uci.lua
index d2acdeca1..215889f85 100644
--- a/modules/admin-full/luasrc/controller/admin/uci.lua
+++ b/modules/admin-full/luasrc/controller/admin/uci.lua
@@ -77,7 +77,7 @@ function action_apply()
-- Search for post-commit commands
for cmd, i in pairs(run) do
- output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n"
+ output = output .. cmd .. ":" .. luci.util.exec(cmd) .. "\n"
end
end
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
index 20adcdf10..f85eb5219 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
@@ -13,6 +13,7 @@ $Id$
]]--
require("luci.model.uci")
require("luci.sys")
+require("luci.util")
m = Map("dhcp", "DHCP")
@@ -46,7 +47,7 @@ s:option(Value, "netmask", translate("netmask")).optional = true
s:option(Flag, "force").optional = true
-for i, line in pairs(luci.sys.execl("dnsmasq --help dhcp")) do
+for i, line in pairs(luci.util.execl("dnsmasq --help dhcp")) do
k, v = line:match("([^ ]+) +([^ ]+)")
s:option(Value, "dhcp"..k, v).optional = true
end
diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
index d463157d1..de2261919 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
@@ -33,7 +33,7 @@ t:value("prism2")
--[[
require("luci.sys")
local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
-for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do
+for driver in luci.util.execl(c)[1]:gmatch("[^ ]+") do
t:value(driver)
end
]]--
diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua
index ef1489b9b..0df4f8cc4 100644
--- a/modules/admin-mini/luasrc/controller/mini/system.lua
+++ b/modules/admin-mini/luasrc/controller/mini/system.lua
@@ -62,7 +62,7 @@ function action_backup()
luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write)
elseif reset then
luci.template.render("mini/applyreboot")
- luci.sys.exec("mtd -r erase rootfs_data")
+ luci.util.exec("mtd -r erase rootfs_data")
else
luci.template.render("mini/backup", {reset_avail = reset_avail})
end
diff --git a/modules/admin-mini/luasrc/controller/mini/uci.lua b/modules/admin-mini/luasrc/controller/mini/uci.lua
index b56a70287..4eceae629 100644
--- a/modules/admin-mini/luasrc/controller/mini/uci.lua
+++ b/modules/admin-mini/luasrc/controller/mini/uci.lua
@@ -74,7 +74,7 @@ function action_apply()
-- Search for post-commit commands
for cmd, i in pairs(run) do
- output = output .. cmd .. ":" .. luci.sys.exec(cmd) .. "\n"
+ output = output .. cmd .. ":" .. luci.util.exec(cmd) .. "\n"
end
end