[lxc-devel] [PATCH] Add common.conf.d

Michael Adam obnox at samba.org
Mon Jan 19 20:25:48 UTC 2015


Hi,

just two minor comments inline below,
looks good to me, otherwise.

Cheers - Michael

On 2015-01-19 at 15:16 -0500, Stéphane Graber wrote:
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
>  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 fdbf9d2..329f919 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 0000000..b974249
> --- /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 0000000..e17a3b3
> --- /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

Do you mean packages or packagers?

> +configuration snippets which will then be used by all containers using
> +the common.conf configuration file (directlry or indirectly).

directly

> +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 f01db08..f22ef0c 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 09cf9e2..f0605a8 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
> -- 
> 1.9.1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20150119/6579d398/attachment.sig>


More information about the lxc-devel mailing list