Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255431 - sys-power/pm-utils-1.2.3: patch for adapting "stopservice" function to Gentoo
Summary: sys-power/pm-utils-1.2.3: patch for adapting "stopservice" function to Gentoo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL: http://lists.freedesktop.org/archives...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 20:25 UTC by Pacho Ramos
Modified: 2009-01-18 20:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pm-utils-1.2.3-functions.patch (pm-utils-1.2.3-functions.patch,359 bytes, patch)
2009-01-18 20:26 UTC, Pacho Ramos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2009-01-18 20:25:47 UTC
I have been already discussed about this in upstream mailling list and attached patch (from it) seems to work fine. It simply prepares "servicerestart" function for looking for "started" instead of "running" when running /etc/init.d/* status

Thanks a lot :-)

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2009-01-18 20:26:10 UTC
Created attachment 178922 [details, diff]
pm-utils-1.2.3-functions.patch
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-01-18 20:30:37 UTC
what does it fix exactly ?
Comment 3 Pacho Ramos gentoo-dev 2009-01-18 20:38:40 UTC
Sorry for the unproper description

I have done a quirk for restarting hdparm service when resuming from hibernate/suspend. I tried to use "stopservice" and "restartservice" functions from /usr/lib/pm-utils/functions, the problem is that current stopservice functions looks like the following:
        if service "$1" status 2>/dev/null | grep -c -q running; then
                touch "${STORAGEDIR}/service:$1"
                service "$1" stop
        fi

It searches for "running", but, under Gentoo (at least with baselayout-1, I don't know with -2), status reports "started" instead

The attached patch will make it look for both outputs (upstream is already aware of this http://lists.freedesktop.org/archives/pm-utils/2009-January/001866.html , and, as read just now, they have already accepted it :-))

This way, function will exit properly and work as expected :-)

Regards
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-01-18 20:53:47 UTC
added to 1.2.3-r1. Thanks for reporting.