diff --git a/utils/luci-app-lxc/files/controller/lxc.lua b/utils/luci-app-lxc/files/controller/lxc.lua index 6c28d4159f..3d1b23df85 100644 --- a/utils/luci-app-lxc/files/controller/lxc.lua +++ b/utils/luci-app-lxc/files/controller/lxc.lua @@ -78,7 +78,10 @@ function lxc_create(lxc_name, lxc_template) return luci.http.write("1") end - local target = _G.DISTRIB_TARGET:match('([^/]+)') + local f = io.popen('uname -m', 'r') + local target = f:read('*a') + f:close() + target = target:gsub("^%s*(.-)%s*$", "%1") local lxc_dist = lxc_template:gsub("(.*):(.*)", '%1') local lxc_release = lxc_template:gsub("(.*):(.*)", '%2')