On Tue, Dec 8, 2009 at 7:04 PM, Jan Safranek <[email protected]> wrote: > Use cgclear on service cgconfig stop, it's much faster than manual group > removal. > > Signed-off-by: Jan Safranek <[email protected]> Acked-by: Dhaval Giani <[email protected]> > --- > > scripts/init.d/cgconfig.in | 40 +--------------------------------------- > 1 files changed, 1 insertions(+), 39 deletions(-) > > diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in > index 6e3bb86..4c3c2e8 100644 > --- a/scripts/init.d/cgconfig.in > +++ b/scripts/init.d/cgconfig.in > @@ -68,14 +68,6 @@ parse_mounts() { > return 0; > } > > -umount_fs() { > - for i in `seq 1 $maxindex` > - do > - umount ${MOUNTPOINT[$i]} > - rmdir ${MOUNTPOINT[$i]} > - done > -} > - > create_default_groups() { > declare defaultcgroup > > @@ -161,39 +153,9 @@ start() { > return 0 > } > > -move_all_to_init_class() { > - for i in `seq 1 $maxindex` > - do > - cd ${MOUNTPOINT[$i]} > - cat /proc/mounts | grep -wq ${MOUNTPOINT[$i]} > - if [ $? -ne 0 ] > - then > - log_failure_msg "resource control filesystem not mounted" > - exit 1 > - fi > - > - for i in `find . -depth -type d` > - do > - case $i in > - '.') > - ;; > - *) > - class=${i#./*} > - #log_progress_msg "Removing class $class" > - sed -nu p < ./$i/tasks > tasks > - rmdir $i > - ;; > - esac > - done > - cd - > /dev/null > - done > -} > - > - > stop() { > echo -n "Stopping cgconfig service: " > - move_all_to_init_class > - umount_fs > + cgclear > rm -f /var/lock/subsys/$servicename > log_success_msg > } > > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > Libcg-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libcg-devel >
-- Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
