From 4662c6dee0b2f3ee065897aac616b6a8ad02b67e Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Mon, 19 Jan 2015 15:16:14 -0500 Subject: [PATCH] Add common.conf.d MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber Acked-by: Serge Hallyn --- config/templates/Makefile.am | 2 ++ config/templates/common.conf.d/Makefile.am | 6 ++++++ config/templates/common.conf.d/README | 6 ++++++ config/templates/common.conf.in | 3 +++ configure.ac | 1 + 5 files changed, 18 insertions(+) create mode 100644 config/templates/common.conf.d/Makefile.am create mode 100644 config/templates/common.conf.d/README diff --git a/config/templates/Makefile.am b/config/templates/Makefile.am index fdbf9d298..329f919b2 100644 --- a/config/templates/Makefile.am +++ b/config/templates/Makefile.am @@ -2,6 +2,8 @@ templatesconfigdir=@LXCTEMPLATECONFIG@ EXTRA_DIST = common.seccomp +SUBDIRS = common.conf.d + templatesconfig_DATA = \ archlinux.common.conf \ archlinux.userns.conf \ diff --git a/config/templates/common.conf.d/Makefile.am b/config/templates/common.conf.d/Makefile.am new file mode 100644 index 000000000..b97424905 --- /dev/null +++ b/config/templates/common.conf.d/Makefile.am @@ -0,0 +1,6 @@ +templatesconfigdir=@LXCTEMPLATECONFIG@/common.conf.d/ + +EXTRA_DIST = README + +templatesconfig_DATA = \ + README diff --git a/config/templates/common.conf.d/README b/config/templates/common.conf.d/README new file mode 100644 index 000000000..f7e7c22f2 --- /dev/null +++ b/config/templates/common.conf.d/README @@ -0,0 +1,6 @@ +This directory can be used by packages and users to dump LXC +configuration snippets which will then be used by all containers using +the common.conf configuration file (directly or indirectly). + +Configuration files must end with the .conf suffix and LXC will include +those in alphabetical order. diff --git a/config/templates/common.conf.in b/config/templates/common.conf.in index f01db082e..f22ef0c1f 100644 --- a/config/templates/common.conf.in +++ b/config/templates/common.conf.in @@ -46,3 +46,6 @@ lxc.cgroup.devices.allow = c 136:* rwm # Blacklist some syscalls which are not safe in privileged # containers lxc.seccomp = @LXCTEMPLATECONFIG@/common.seccomp + +# Lastly, include all the configs from @LXCTEMPLATECONFIG@/common.conf.d/ +lxc.include = @LXCTEMPLATECONFIG@/common.conf.d/ diff --git a/configure.ac b/configure.ac index 09cf9e22a..f0605a889 100644 --- a/configure.ac +++ b/configure.ac @@ -627,6 +627,7 @@ AC_CONFIG_FILES([ config/templates/centos.common.conf config/templates/centos.userns.conf config/templates/common.conf + config/templates/common.conf.d/Makefile config/templates/debian.common.conf config/templates/debian.userns.conf config/templates/fedora.common.conf -- 2.47.2