Olivieri <[EMAIL PROTECTED]>
Bcc:
Subject: [PATCH] cgred fixes and enhancements
Reply-To: [EMAIL PROTECTED]
Hi,
cgred checks for cgrulesengd in /bin instead of /usr/bin. This patch
fixes that problem. We check for libcgroup*.so in /lib, but on 64 bit
platforms it is installed in /lib64 or /usr/lib64, hence I removed
that check.
I've also added logic to classify all tasks after cgrulesengd has
started. This helps my shell start in the correct place and the rest
of my utilities as well, irrespective of when cgred started (after
several applications have been launched).
Please review, comment
Index: scripts/init.d/cgred
===================================================================
--- scripts/init.d/cgred (revision 225)
+++ scripts/init.d/cgred (working copy)
@@ -36,13 +36,12 @@
prefix=/usr
exec_prefix=/usr
-bindir=/bin
+bindir=${exec_prefix}/bin
CGRED_BIN=${bindir}/cgrulesengd
# Sanity checks
[ -x $CGRED_BIN ] || exit 1
-[ -x /lib/libcgroup.so ] || exit 1
# Source function library & LSB routines
. /etc/rc.d/init.d/functions
@@ -75,6 +74,14 @@
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
echo "`pidof $processname`" > $pidfile
+
+ #
+ # classify everything after we started
+ #
+ for i in `ps -eL o tid`
+ do
+ cgclassify $i 2>/dev/null 1>/dev/null
+ done
}
stop()
--
Balbir
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel