If the template definition is not found there created group have default
kernel setting.
-
+To create a hierarchy of configuration files, use \fB/etc/cgrules.d\fR directory.
.SH EXAMPLES
.nf
.PD .1v
.TP 20
.B /etc/cgrules.conf
-.TP
+.RS 6
default libcgroup configuration file
-.PD .
+.RE
+.TP 20
+.B /etc/cgrules.d
+.RS 6
+default libcgroup configuration files directory
+.RE
+.PD
.SH SEE ALSO
-cgconfig.conf (5), cgclassify (1), cgred.conf (5)
+cgconfig.conf (5), cgclassify (1), cgred.conf (5), cgrules.d (5)
.SH BUGS
--- /dev/null
+.\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
+.\" Written by Jan Chaloupka <jchaloup@redhat.com>
+
+.TH CGRULES.D 5 2014-07-14 "Linux" "libcgroup Manual"
+.SH NAME
+cgrules.d \- libcgroup configuration files directory
+.SH DESCRIPTION
+.B "cgrules.d"
+configuration files directory is used by
+.B libcgroups
+and contains additional configuration files with the same syntax as
+\fBcgconfig.conf\fR (5).
+
+Files are parsed in an arbitrary order.
+If the cache is disabled, the searching algorithm of \fBcgrulesengd\fR (8)
+tries the first match.
+If there are two rules which match the criteria for a given process,
+and each rule is in a separate file, then there is no guarantee which one
+is chosen. If you want to control the given order of the rules, put them
+in one configuration file.
+
+
+\fB/etc/cgconfig.conf\fR is parsed as the first file. After success,
+all files from /etc/cgconfig.d are parsed as well (in an arbitrary order).
+If some file from the directory ends up with a parsing error,
+the process is stopped. With cache enabled, all successfully processed
+rules
+are kept in the cache. With cache disabled,
+matching is stopped and ends with a 'not found' result.
+
+If \fB/etc/cgrules.d\fR is empty, \fBcgrulesengd\fR (8) acts
+in a backwards compatibility mode.
+
+.SH FILES
+.LP
+.PD .1v
+.TP 20
+.B /etc/cgrules.d
+.RS 4
+default libcgroup configuration files directory
+.RE
+.B /etc/cgconfig.conf
+.RS 4
+default libcgroup configuration file
+.RE
+.PD .
+
+
+.SH SEE ALSO
+cgconfig.conf (5), cgrulesengd (8)
.SH DESCRIPTION
\fBcgrulesengd\fR is a daemon, which distributes processes to control groups. When
any process changes its effective UID or GID, \fBcgrulesengd\fR inspects the list
-of rules loaded from the \fIcgrules.conf\fR file and moves the process to
-the appropriate control group.
+of rules loaded from the \fIcgrules.conf\fR file and files in \fIcgrules.d\fR
+(see \fBcgrules.d\fR (5) for potential conflicts) directory
+and moves the process to the appropriate control group.
-The list of rules is read during the daemon startup is are cached in the daemon's memory.
+The list of rules is read during the daemon startup and cached in the daemon's memory.
The daemon reloads the list of rules when it receives SIGUSR2 signal.
The daemon reloads the list of templates when it receives SIGUSR1 signal.
.PD .1v
.TP
.B /etc/cgrules.conf
-.TP
+.RS 6
the default libcgroup configuration file
+.RE
+.B /etc/cgrules.d
+.RS 6
+the default libcgroup configuration files directory
+.RE
.TP
.B /etc/cgconfig.conf
+.RS 6
the default templates file
+.RE
.TP
.B /etc/cgconfig.d/
+.RS 6
the default templates directory
+.RE
.SH SEE ALSO
-cgrules.conf (5)
+cgrules.conf (5), cgrules.d (5)