lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit d15b15b9515957a61b31aa085dbc5be0f2094d58
parent 36a5223bc26f8d2770e66e32d2e90bc09e31720a
Author: Petar Koretic <petar.koretic@sartura.hr>
Date:   Mon, 17 Nov 2014 16:31:54 +0100

luci-app-lxc: use ubus binding for lxc-create

Signed-off-by: Petar Koretic <petar.koretic@sartura.hr>

Diffstat:
Mutils/luci-app-lxc/files/controller/lxc.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/luci-app-lxc/files/controller/lxc.lua b/utils/luci-app-lxc/files/controller/lxc.lua @@ -80,9 +80,9 @@ function lxc_create(lxc_name, lxc_template) local target = _G.DISTRIB_TARGET:match('([^/]+)') - local res = os.execute("lxc-create -t download -n " .. lxc_name .. " -- --server=" .. url .. " --no-validate --dist " .. lxc_template .. " --release bb --arch " .. target) + local data = conn:call("lxc", "create", { name = lxc_name, template = "download", args = { "--server", url, "--no-validate", "--dist", lxc_template, "--release", "bb", "--arch", target } } ) - luci.http.write(tostring(res)) + luci.http.write(data) end function lxc_action(lxc_action, lxc_name)