cgred is broken, in that there are some checks that fail and we use
--config to start the daemon and that is not supported. We also use
-12 as the signal to killproc.

This patch fixes all of those issues

Signed-off-by: Balbir Singh <[email protected]>


Index: scripts/init.d/cgred
===================================================================
--- scripts/init.d/cgred        (revision 231)
+++ scripts/init.d/cgred        (working copy)
@@ -38,11 +38,10 @@
 exec_prefix=/usr
 bindir=/bin
 
-CGRED_BIN=${bindir}/cgrulesengd
+CGRED_BIN=${exec_prefix}/${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
@@ -51,7 +50,7 @@
 # Read in configuration options.
 if [ -f "/etc/cgred.d/cgred.conf" ] ; then
        . /etc/cgred.d/cgred.conf
-       OPTIONS="--config $CONFIG_FILE --log $LOG_FILE $NODAEMON $NOLOG"
+       OPTIONS="--log $LOG_FILE $NODAEMON $NOLOG"
 else
        OPTIONS=""
 fi
@@ -80,7 +79,7 @@
 stop()
 {
        echo -n $"Stopping CGroup Rules Engine Daemon..."
-       killproc -p $pidfile $processname -12
+       killproc -p $pidfile $processname -TERM
        RETVAL=$?
        echo
        if [ $RETVAL -eq 0 ] ; then

-- 
        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

Reply via email to