Add more dependencies needed by download template and replace all, not just
first occurence of : or _ in template name with space in webui.
Signed-off-by: Michal Hrušecký <Michal.Hrusecky@nic.cz>
There was harcoded list of available images. Instead of it, LuCI LXC app will
now try to download list of available container images.
Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
As containers are basically virtual machines, it should not depend on the
build target but on the real hardware architecture. For example there is plenty
of ARM families (mvebu, sunxi, ...) but all armv7l arms should be able to run
armv7l containers.
Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
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>
Adjusting LuCI app for LXC to try to read path to your LXC containers from
configuration file and if not succeeding falling back to /srv/lxc to match
previous commit.
Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
Number of suggested rewrites:
* use lua ubus bindings instead of os.execute
* combine multiple actions to use same handler 'lxc_action' and pass
actions as arguments to consolidate code
* read openwrt version from lua directly
* start using String.prototype.format for string formatting
Also, drop 'rename' and 'clone' until they are fully functional on all
platforms.
Thanks Jo-Philipp for suggestions on how to improve the code.
Signed-off-by: Petar Koretic <petar.koretic@sartura.hr>