[Pm-utils] stopservice function doesn't work with gentoo

Dan Nicholson dbn.lists at gmail.com
Sun Jan 18 11:43:34 PST 2009


On Sun, Jan 11, 2009 at 02:21:44PM +0100, Pacho Ramos wrote:
> I have seen that stopservice function is looking for "running", while
> gentoo init.d scripts report "started". Would be nice if it would look
> for both words:
> 
> stopservice()
> {
>         if service "$1" status 2>/dev/null | grep -c -q running; then
>                 touch "${STORAGEDIR}/service:$1"
>                 service "$1" stop
>         fi
> }
> 
> 
> I have tried to patch myself but I have been unable to do so :'(, please
> let me know the proper solution for learning a bit
> 
> Thanks a lot

I believe the patch below should work.

--
Dan



More information about the Pm-utils mailing list