]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Fix broken cgred
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 16 Dec 2008 17:20:11 +0000 (17:20 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 16 Dec 2008 17:20:11 +0000 (17:20 +0000)
From: Balbir Singh <balbir@linux.vnet.ibm.com>

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 <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@237 4f4bb910-9a46-0410-90c8-c897d4f1cd53

scripts/init.d/cgred

index 3d9fe2aa80fe1869aecdc34d767ff59548241c5f..ee9fc40ec6c32975a1962d0c67c09179b1393211 100644 (file)
@@ -38,11 +38,10 @@ prefix=/usr
 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 @@ CGRED_BIN=${bindir}/cgrulesengd
 # 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 @@ start()
 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