Hi Dhaval,

Dhaval Giani wrote:
>>>> 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.

Thank you for the patch.

I applied your patch to the latest code which is taken from git tree,
and it is working fine.


Thanks
Ken'ichi Ohmichi

> 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



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