]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
init script can miss default group
authorChris <libcg@deksai.com>
Tue, 9 Mar 2010 16:04:46 +0000 (11:04 -0500)
committerDhaval Giani <dhaval.giani@gmail.com>
Thu, 11 Mar 2010 12:05:30 +0000 (13:05 +0100)
If there is a directive like *:httpd before * in the cgconfig file, all
processes end up being moved into the wrong group on cgconfig startup, and
the default group is never made. This fixes it for me:

Signed-off-by: Chris Tasma <chris@deksai.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
scripts/init.d/cgconfig.in

index 261c7d8c7e01c945bb877f302951a553b7e6e91e..9cf2c9a80f51ba7e4ad2ea175a434a95aa8b8310 100644 (file)
@@ -58,7 +58,7 @@ create_default_groups() {
         if [ -f /etc/cgrules.conf ]
         then
             read user ctrl defaultcgroup <<< \
-                `grep -m1 ^\* /etc/cgrules.conf`
+               `grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf`
             if [[ -n $defaultcgroup && $defaultcgroup = "*" ]]
             then
                 log_warning_msg "/etc/cgrules.conf incorrect"