From: Jan Safranek Date: Wed, 10 Nov 2010 15:09:55 +0000 (+0100) Subject: 'service cgred start' should print some meaningful error message when X-Git-Tag: v0.37.1~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915cb9e58c86307db7ef9f30cad1cb5f2ff102d6;p=thirdparty%2Flibcgroup.git 'service cgred start' should print some meaningful error message when there are no cgroups on the system. Before: Starting CGroup Rules Engine Daemon: [FAILED] After: Starting CGroup Rules Engine Daemon: Cannot find cgroups, is cgconfig service running? [FAILED] Signed-off-by: Jan Safranek Acked-by: Dhaval Giani --- diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in index 4cea5a47..ba89aee2 100644 --- a/scripts/init.d/cgred.in +++ b/scripts/init.d/cgred.in @@ -72,6 +72,11 @@ start() log_failure_msg "not configured" return 6 fi + if ! grep "^cgroup" /proc/mounts &>/dev/null; then + echo + log_failure_msg $"Cannot find cgroups, is cgconfig service running?" + return 1 + fi daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS RETVAL=$? echo