]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Fixed cgconfigparser to allow configs with no 'mount' section
authorJan Safranek <jsafrane@redhat.com>
Fri, 20 May 2011 13:52:58 +0000 (15:52 +0200)
committerJan Safranek <jsafrane@redhat.com>
Mon, 30 May 2011 14:25:45 +0000 (16:25 +0200)
commitf739adaa4a0f59de374c2738b6b53cc324afd4c9
tree7c49e8406a09bf6d836e49725e612578a3c65ec9
parenta36f583f2d3e80d890ff15c32a6b6122bc9f93e6
Fixed cgconfigparser to allow configs with no 'mount' section

cgconfig service fails when something else mounts cgroup hierarchies during
boot (e.g. systemd). Therefore we should allow cgconfig.conf to have no
'mount' section -> it's up to admin to ensure that controllers are mounted as
needed.

Because 'group' section is already optional, with this patch cgconfigparser
will accept empty configuration file. This is probably the best default
config for distros with systemd.

Changelog:
  - fixed case with empty config file and no mounted controllers
  - reworked the if conditions to be more clear

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
doc/man/cgconfig.conf.5
src/config.c