On Fri, Apr 03, 2009 at 12:09:52PM +0530, Dhaval Giani wrote:
> On Fri, Apr 03, 2009 at 11:36:18AM +0530, Balbir Singh wrote:
> > * Ken'ichi Ohmichi <[email protected]> [2009-04-03 13:02:26]:
> > 
> > > 
> > > Hi,
> > > 
> > > I am testing libcgroup on x86_64 fedora11 alpha.
> > > I found that 'cgred' service does not work, because it fails on
> > > the following check.
> > > 
> > > /etc/init.d/cgred:
> > >  41 # Sanity checks
> > >  42 [ -x $CGRED_BIN ] || exit 1
> > > 
> > > $CGRED_BIN is the full path of 'cgrulesengd' command, and it is
> > > "/usr/bin/cgrulesengd" in /etc/init.d/cgred. But 'cgrulesengd'
> > > command is installed to
> > > (by rpm command) : /sbin/cgrulesengd
> > > (by make install): /usr/local/sbin/cgrulesengd
> > > So they do not match.
> > > 
> > > What am I doing wrong ?
> > >
> > 
> > Could you please try with ./configure --prefix=/usr. /sbin/cgrulesengd
> > looks like a recent changed. Jan, Dhaval? The scripts need to be
> > updated as well.
> > 
> 
> My bad, I should have noticed that. Jan and I were discussing it, since
> cgrulesengd needs superuser privileges, we moved it to /sbin. We totally
> forgot about the script correction :(. Will send out a patch soon
> (eveningish) unless someone beats me to it.

Sorry for the delay, some other issues grabbed my attention.

I have patch here, tested, but not sure if it is the right fix, it is
more like a workaround. If it is fine, I will repost with proper
changelog and SOB.


diff --git a/scripts/init.d/cgred b/scripts/init.d/cgred
index fa824df..11b626d 100644
--- a/scripts/init.d/cgred
+++ b/scripts/init.d/cgred
@@ -32,14 +32,8 @@
 #                      cgroups to classify processes
 ### END INIT INFO
 
-prefix=/usr
-exec_prefix=/usr
-bindir=/bin
-
-CGRED_BIN=${exec_prefix}/${bindir}/cgrulesengd
-
-# Sanity checks
-[ -x $CGRED_BIN ] || exit 1
+PATH=$PATH:/sbin/:/usr/sbin
+CGRED_BIN=cgrulesengd
 
 # Source function library & LSB routines
 . /etc/rc.d/init.d/functions
-- 
regards,
Dhaval

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to