Skip to content

Commit

Permalink
Add cgroup.pattern global configuration option
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
chris-se authored and stgraber committed Sep 10, 2013
1 parent d0386d6 commit 6e16552
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions configure.ac
Expand Up @@ -260,6 +260,12 @@ AC_ARG_WITH([rootfs-path],
[--with-rootfs-path=dir],
[lxc rootfs mount point]
)], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
# cgroup pattern specification
AC_ARG_WITH([cgroup-pattern],
[AC_HELP_STRING(
[--with-cgroup-pattern=pattern],
[pattern for container cgroups]
)], [], [with_cgroup_pattern=['/lxc/%n']])

# Container log path. By default, use $lxcpath.
AC_MSG_CHECKING([Whether to place logfiles in container config path])
Expand Down Expand Up @@ -303,6 +309,7 @@ AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks")
AS_AC_EXPAND(LXCINITDIR, "$libexecdir")
AS_AC_EXPAND(LOGPATH, "$with_log_path")
AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"])

# Check for some standard kernel headers
AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
Expand Down
3 changes: 2 additions & 1 deletion src/lxc/Makefile.am
Expand Up @@ -100,7 +100,8 @@ AM_CFLAGS=-I$(top_srcdir)/src \
-DLOGPATH=\"$(LOGPATH)\" \
-DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
-DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
-DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\"
-DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
-DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\"

if ENABLE_APPARMOR
AM_CFLAGS += -DHAVE_APPARMOR
Expand Down
1 change: 1 addition & 0 deletions src/lxc/utils.c
Expand Up @@ -225,6 +225,7 @@ const char *lxc_global_config_value(const char *option_name)
{ "lvm_vg", DEFAULT_VG },
{ "zfsroot", DEFAULT_ZFSROOT },
{ "lxcpath", LXCPATH },
{ "cgroup.pattern", DEFAULT_CGROUP_PATTERN },
{ NULL, NULL },
};
static const char *values[sizeof(options) / sizeof(options[0])] = { 0 };
Expand Down

0 comments on commit 6e16552

Please sign in to comment.