]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-oci: read configuration from oci.common.conf if available
authorJonathan Calmels <jcalmels@nvidia.com>
Fri, 8 Dec 2017 06:24:48 +0000 (22:24 -0800)
committerJonathan Calmels <jcalmels@nvidia.com>
Tue, 19 Dec 2017 23:18:28 +0000 (15:18 -0800)
Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
config/templates/Makefile.am
config/templates/oci.common.conf.in [new file with mode: 0644]
configure.ac
templates/lxc-oci.in

index 387c7a1d716267a0a5f387d05d3e75fd974836fa..6598615b4548ead17b29952b958293853fa88d4f 100644 (file)
@@ -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 (file)
index 0000000..142cb5b
--- /dev/null
@@ -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
index bf92f08db3e4b4495f6c2cb7321c95b409a16f7c..ce3dda47201f5cb8ea1677c33ca4a0ab0b0fff73 100644 (file)
@@ -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
index 95777e086bc96db955a51d8bd62b7d76634e7791..cac818186e6f135cd03e5bf2fcd7ef91b91f3169 100755 (executable)
@@ -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 <<EOF > ${LXC_ROOTFS}/etc/hostname