From: Chris Date: Tue, 9 Mar 2010 16:04:46 +0000 (-0500) Subject: init script can miss default group X-Git-Tag: v0.36.2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcad7dc8d5e57b23948556dac22ec932d04e5e8c;p=thirdparty%2Flibcgroup.git init script can miss default group 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 Acked-by: Balbir Singh Signed-off-by: Dhaval Giani --- diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in index 261c7d8c..9cf2c9a8 100644 --- a/scripts/init.d/cgconfig.in +++ b/scripts/init.d/cgconfig.in @@ -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"