c84d4924ef
Required to support Gentoo is the ability to bind mount a new shared directory. In order to support this, _lxc_container_bind_mounts has been created for use in per-distro variables. For Gentoo the new bind mounts allows the sharing of package data, shrinking both the container size and the time needed to install packages. Also needed was the creation of the `sysctl_path` variable as Gentoo installs sysctl to an alternate location. Change-Id: I8c20631aff9ee30289ef2f7f862ba0d4e1bb4569
17 lines
461 B
Django/Jinja
17 lines
461 B
Django/Jinja
#!/usr/bin/env bash
|
|
set -ev
|
|
|
|
# Generate the lxc container create prep commands
|
|
{{ lxc_container_commands }}
|
|
|
|
{% for item in lxc_container_default_bind_mounts | union(_lxc_container_bind_mounts) | union(lxc_container_bind_mounts) %}
|
|
{% if item['container_directory'] is defined %}
|
|
# Create dir "{{ item['container_directory'] }}"
|
|
mkdir -p "{{ item['container_directory'] }}"
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
# Run extra commands
|
|
{{ lxc_container_extra_commands }}
|