diff --git a/utils/luci-app-lxc/files/controller/lxc.lua b/utils/luci-app-lxc/files/controller/lxc.lua index f3f5d07ba7..6c28d4159f 100644 --- a/utils/luci-app-lxc/files/controller/lxc.lua +++ b/utils/luci-app-lxc/files/controller/lxc.lua @@ -80,7 +80,10 @@ function lxc_create(lxc_name, lxc_template) local target = _G.DISTRIB_TARGET:match('([^/]+)') - local data = conn:call("lxc", "create", { name = lxc_name, template = "download", args = { "--server", url, "--no-validate", "--dist", lxc_template, "--release", "bb", "--arch", target } } ) + local lxc_dist = lxc_template:gsub("(.*):(.*)", '%1') + local lxc_release = lxc_template:gsub("(.*):(.*)", '%2') + + local data = conn:call("lxc", "create", { name = lxc_name, template = "download", args = { "--server", url, "--no-validate", "--dist", lxc_dist, "--release", lxc_release, "--arch", target } } ) luci.http.write(data) end diff --git a/utils/luci-app-lxc/files/view/lxc.htm b/utils/luci-app-lxc/files/view/lxc.htm index 1376968e3b..db216fc28e 100644 --- a/utils/luci-app-lxc/files/view/lxc.htm +++ b/utils/luci-app-lxc/files/view/lxc.htm @@ -47,7 +47,7 @@ Author: Petar Koretic