mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 23:48:39 +01:00
luci-app-lxc: Allow versioned images
I makes quite some sense to provide user the choice between various versions of the distribution to install into LXC. Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user