----- Original Message ----- > From: "Weng Meiling" <wengmeiling.w...@huawei.com> > To: libcg-devel@lists.sourceforge.net > Sent: Wednesday, August 7, 2013 1:08:35 PM > Subject: [Libcg-devel] [PATCH v2] cgred:cgred should start when cgroup is > mounted > > > From: Weng Meiling <wengmeiling.w...@huawei.com> > > If we mount the cgroup without the name cgroup like the following: > cpu on /cgroup/cpu type cgroup (rw,cpu) > > the cgred service will start failed, because it just check the name. > So changing cgred to check the mounted system's type instead of the name. > > v1 -> v2 > Using the right method to check cgroup filesystem. The first version > patch's method is wrong, so resend the second patch. > > Signed-off-by: Weng Meiling <wengmeiling.w...@huawei.com> Acked-by: Ivana Hutarova Varekova <varek...@redhat.com> > --- > scripts/init.d/cgred.in | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in > index ed757cf..247ec61 100644 > --- a/scripts/init.d/cgred.in > +++ b/scripts/init.d/cgred.in > @@ -73,7 +73,8 @@ start() > log_failure_msg "$servicename is already running with PID `cat > ${pidfile}`" > return 0 > fi > - if ! grep "^cgroup" /proc/mounts &>/dev/null; then > + num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l` > + if [ $num -eq 0 ]; then > echo > log_failure_msg $"Cannot find cgroups, is cgconfig service > running?" > return 1 > -- > 1.7.1 > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Libcg-devel mailing list > Libcg-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libcg-devel >
------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel