On Mon, Nov 8, 2010 at 1:53 PM, Jan Safranek <[email protected]> wrote: > '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 <[email protected]>
Acked-by: Dhaval Giani <[email protected]> > --- > > scripts/init.d/cgred.in | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in > index 4cea5a4..ba89aee 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 > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Libcg-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libcg-devel > ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
