From: Jonathan Calmels Date: Fri, 8 Dec 2017 06:24:48 +0000 (-0800) Subject: lxc-oci: read configuration from oci.common.conf if available X-Git-Tag: lxc-3.0.0.beta1~98^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1689c7cf9078b1f4ed7e66e96c7f22af444497e6;p=thirdparty%2Flxc.git lxc-oci: read configuration from oci.common.conf if available Signed-off-by: Jonathan Calmels --- diff --git a/config/templates/Makefile.am b/config/templates/Makefile.am index 387c7a1d7..6598615b4 100644 --- a/config/templates/Makefile.am +++ b/config/templates/Makefile.am @@ -21,6 +21,7 @@ templatesconfig_DATA = \ gentoo.moresecure.conf \ gentoo.userns.conf \ nesting.conf \ + oci.common.conf \ opensuse.common.conf \ opensuse.userns.conf \ oracle.common.conf \ diff --git a/config/templates/oci.common.conf.in b/config/templates/oci.common.conf.in new file mode 100644 index 000000000..142cb5bf1 --- /dev/null +++ b/config/templates/oci.common.conf.in @@ -0,0 +1,3 @@ +# Uncomment the following if you want to use DHCP for OCI containers +#lxc.hook.start-host = @LXCHOOKDIR@/dhclient +#lxc.hook.stop = @LXCHOOKDIR@/dhclient diff --git a/configure.ac b/configure.ac index bf92f08db..ce3dda472 100644 --- a/configure.ac +++ b/configure.ac @@ -737,6 +737,7 @@ AC_CONFIG_FILES([ config/templates/gentoo.moresecure.conf config/templates/gentoo.userns.conf config/templates/nesting.conf + config/templates/oci.common.conf config/templates/opensuse.common.conf config/templates/opensuse.userns.conf config/templates/oracle.common.conf diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in index 95777e086..cac818186 100755 --- a/templates/lxc-oci.in +++ b/templates/lxc-oci.in @@ -313,6 +313,10 @@ if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ] && [ -e "${LXC_TEMP echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/userns.conf" >> "${LXC_CONF_FILE}" fi +if [ -e "${LXC_TEMPLATE_CONFIG}/oci.common.conf" ]; then + echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/oci.common.conf" >> "${LXC_CONF_FILE}" +fi + echo "lxc.uts.name = ${LXC_NAME}" >> "${LXC_CONF_FILE}" # set the hostname cat < ${LXC_ROOTFS}/etc/hostname